Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    68

    gprof gofrtran


    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 --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 m using gprof GNU gprof (GNU Binutils for Ubuntu) 2.21.0.20110327

    i have compiled a file with this line
    Code:
    gfortran -g -pg test.f90
    when i run gprof , it fails
    Code:
    gprof ./a.out 
    gmon.out: No such file or directory
    i have write permission o the current folder , the file itself is pretty simple , contain nothing nearly just summing 2 numbers.

    why it is not running ?

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,260
    Hi.

    Did you execute the a.out file? ... cheers, drl
    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 )

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    68
    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

  4. #4
    Just Joined!
    Join Date
    Aug 2005
    Posts
    68
    at the same subject ,
    i m trying to make to run gprof on a project in fortran
    Code:
    pgf77  -byteswapio  -fast -O3 -r8 -g -pg -c phy_phypar.f
    and i repeat it for all the files needed
    then i link it
    Code:
    pgf77  -byteswapio  -fast -O3 -r8 -g -pg addflx.o atm2land.o
    stating all the files

    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 says
    Code:
    gmon.out: No such file or directory
    again what could it be wrong ?

  5. #5
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,260
    Hi.

    I don't have access to Portland Fortran, but the man pages seem to be available at many sites.
    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
    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:
    pgprof is a tool which analyzes data generated during exe- cution of specially compiled programs (using the -Mprof=func or -Mprof=lines compiler command ...

    -- ibid.
    Best wishes ... cheers, drl
    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 )

  6. #6
    Just Joined!
    Join Date
    Aug 2005
    Posts
    68
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •