views:

89

answers:

2

I've got a scientific code running on my mac (I'm running snow leopard) , a code written in Fortran. I've been trying to get a profile of the run time of the code, but am having little success. It appears that gprof doesn't return any actual timings, just a count on how many times a subroutine was called. I looked around, this appears to be a common problem.

I tried Saturn, but it doesn't do 64 bit and I'm using external libraries, so that's a no go.

I also tried Shark, but the output of that is not really what I'm looking for, or at least I can't decipher it...

Anyways, just wondering if anyone knows of a profiler for the mac that works with Fortran? I'm using Intel's ifort to compile.

A: 

You should be able to use the Time Profiler in Instruments (part of the Developers tools). I've used it before for Fortran programs and been very impressed.

Barron
I was midway through a similar suggestion - looking on the internets it looks like some people have also had success creating custom dTrace probes for Fortran programs, that you should then be able to link to Instruments, if simple time profiling isn't good enough. Try 'dtrace fortran'.
JulesLt
I'll check it out, thanks for the tip!
Patrick
A: 

One workaround could be to convert the code to C (http://stackoverflow.com/questions/322846/convert-fortran-to-c-or-c) and then to profile it

Werner