Results 1 to 6 of 6
i m using gfortran
Code:
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes ...
- 06-15-2011 #1Just Joined!
- Join Date
- Aug 2005
- Posts
- 65
gprof gofrtran
i m using gfortran
i m using gprof GNU gprof (GNU Binutils for Ubuntu) 2.21.0.20110327Code:Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
i have compiled a file with this line
when i run gprof , it failsCode:gfortran -g -pg test.f90
i have write permission o the current folder , the file itself is pretty simple , contain nothing nearly just summing 2 numbers.Code:gprof ./a.out gmon.out: No such file or directory
why it is not running ?
- 06-15-2011 #2Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
Did you execute the a.out file? ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 06-18-2011 #3Just Joined!
- Join Date
- Aug 2005
- Posts
- 65
i m really so sorry , somehow it is now working , i just modified the source and recompiled and it worked , but for ur question , yes the binary was working alone for sure , i tested before i run gprof , but now i m not quit sure
anyway , i repeat my sorry , thx
- 06-18-2011 #4Just Joined!
- Join Date
- Aug 2005
- Posts
- 65
at the same subject ,
i m trying to make to run gprof on a project in fortran
and i repeat it for all the files neededCode:pgf77 -byteswapio -fast -O3 -r8 -g -pg -c phy_phypar.f
then i link it
stating all the filesCode:pgf77 -byteswapio -fast -O3 -r8 -g -pg addflx.o atm2land.o
i m root so i have all permissions and i do have it , as above i have made -pg in compile and link , i ran the binary before i ran gprof , and it is working well .
but when i run gprof it saysagain what could it be wrong ?Code:gmon.out: No such file or directory
- 06-18-2011 #5Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
I don't have access to Portland Fortran, but the man pages seem to be available at many sites.
which suggests that the default data file name is not gmon.out. In fact, it is not clear that gprof is the appropriate command to use with pgf77 for profiling. You may need to read more on the man page or other pages relating to pgf77:pf[=filename]
Invoke the Profile Feedback Analyzer (PFA). This should be used in conjunction with the IPA. Use file as the name of the PFA file rather than the default pgprof.out name.
-- excerpt from man pgf77 at:
Manpage of pgf77
Best wishes ... cheers, drlpgprof is a tool which analyzes data generated during exe- cution of specially compiled programs (using the -Mprof=func or -Mprof=lines compiler command ...
-- ibid.Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 06-18-2011 #6Just Joined!
- Join Date
- Aug 2005
- Posts
- 65
i think i have get what is wrong
to use gprof , i have to run the program first , the execution will produce gmon , then i can run the command gprof , but actually i didn't made so , i was testing the binary then i was deleting everything , not noticing that it produce gmon , so i m just shy to say , the fault was mine
sorry again and thx for ur time


Reply With Quote