For Programmers: Free Programming Magazines  


Home > Archive > Fortran > September 2006 > profile g95









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author profile g95
beliavsky@aol.com

2006-09-27, 7:03 pm

I use mingw g95 on Windows XP. Is there a profiling tool to measure how
CPU time is consumed, or should I just sprinkle calls to the CPU_TIME
intrinsic in the code? If there is a tool that works only on Linux, I
could profile the code there -- I'd guess that the timings should be
similar.

Joost

2006-09-27, 7:03 pm


beliavsky@aol.com wrote:
> I use mingw g95 on Windows XP. Is there a profiling tool to measure how
> CPU time is consumed, or should I just sprinkle calls to the CPU_TIME
> intrinsic in the code? If there is a tool that works only on Linux, I
> could profile the code there -- I'd guess that the timings should be
> similar.


There has been a rather detailed mail in the gg95 google group :
HOWTO: execution time profiling with
g95/valgrind/callgrind/kcacheg=ADrind

http://groups.google.com/group/gg95...64d1ce9b8d80e/#

which describes a linux-only tool, which is, however very instructive
and very detailed (i.e. line by line timings). The standard tool, which
should also be available for mingw (but I can't test), is gprof. It
requires that the code is recompiled/linked with -pg. The executable
will generate a timing report (gmon.out) which can be transformed in
something more or less readable with gprof.

Cheers,

Joost

Tim Prince

2006-09-27, 7:03 pm

beliavsky@aol.com wrote:
> I use mingw g95 on Windows XP. Is there a profiling tool to measure how
> CPU time is consumed, or should I just sprinkle calls to the CPU_TIME
> intrinsic in the code? If there is a tool that works only on Linux, I
> could profile the code there -- I'd guess that the timings should be
> similar.
>

I guess gprof is disqualified; it should work on both cygwin and linux,
unless g95 fails to support gprof?
Herman D. Knoble

2006-09-28, 7:00 pm

Windows 2000 Resource Kit routine, TimeThis.exe will display
elapsed time for a command. This will be close to the CPU time
if no other apps are running during the timing. It works under
Windows XP.
http://www.microsoft.com/downloads/...&displaylang=en

If you don't mind doing a time subtract you can write a .bat file
to display elapsed time start and time end for a command:

echo off
rem Set the prompt to the time of day.
prompt $t$g
if exist %1.BAT GOTO CALLIT
echo on
%1 %2 %3 %4 %5 %6 %7 %8 %9
echo off
GOTO WRAPUP
:CALLIT
echo on
CALL %1 %2 %3 %4 %5 %6 %7 %8 %9
echo off
:WRAPUP
rem Restore the usual prompt.
prompt $p$g

On 27 Sep 2006 11:21:49 -0700, beliavsky@aol.com wrote:

-|I use mingw g95 on Windows XP. Is there a profiling tool to measure how
-|CPU time is consumed, or should I just sprinkle calls to the CPU_TIME
-|intrinsic in the code? If there is a tool that works only on Linux, I
-|could profile the code there -- I'd guess that the timings should be
-|similar.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com