   gprof and no time accumulated
  I have Fortran 90 code that I compile with both gfortran and g95 using the -pg switch so I can profile via gprof. However, when I examine the output from gprof, all the methods have a time of 0 Example:Flat profile:Each sample counts as 0.01 seconds.no time accumulated% cumulative self self totaltime seconds seconds calls Ts/call Ts/call name0.00 0.00 0.00 6125480 0.00 0.00 exav_0.00 0.00 0.00 3062740 0.00 0.00 fice_0.00 0.00 0.00 3062740 0.00 0.00 fvisc_0.00 0.00 0.00 3062740 0.00 0.00 wat_drain_0.00 0.00 0.00 2994652 0.00 0.00 watmix_0.00 0.00 0.00 23595 0.00 0.00 grdran_...There are no dependent libraries.Searching the net seems to indicate that this is either a threading issue (gprof doesn't play well with multithreaded apps, apparently) or that not enough time is spent in user space. I timed it with time and about 2min are spend in user space and about 30s in kernel so that isn't the reason. There is no explicit threading to my knowledge in this program (it's a Fortran scientific model) unless g95 or gfortran are doing something odd. I know sometimes the entry points can be modified to start somewhere odd and a child thread is spawned that acts as a main thread, but that doesn't seem to be the case from what I can tell.Any ideas? I'm at a complete loss.   
  Did you also compile with -g? And are the flags used in the compile step, not the link step?Might just be a g95 problem, try it with a C/C++ program. And then try OProfile, it doesn't require -pg.   ;  I've tried with and without -gI've tried g95 and gfortranI've used the flags in both link and compile, doesn't seem to matterQuote:OProfileThanks for the tip. I actually need something that will run in Cygwin...which leds to me the question, you don't think it is Cygwin that is screwing up gprof?//edit2apparently this is a known issue with cygwin 1.5.* and is supposed to be fixed in 1.7b. Does not appear to be the case. Back to square one.[Edited by - _Sigma on May 14, 2009 4:05:18 PM]