CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

The method of Checking the CPU time

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   April 18, 1999, 04:02
Default The method of Checking the CPU time
JunYoung Park
Posts: n/a
hi, I am a graduate student. I will compare the CPU time of serial and parallel program. But, I don't know how do calculating the cpu time in fortran language. please, let me know the method.
  Reply With Quote

Old   April 19, 1999, 11:28
Default Re: The method of Checking the CPU time
Tim Cowan
Posts: n/a
Are you wanting to embedd something into the source code which keeps track of the run time for you? Functions which handle this are typically platform/compiler dependent. On a PC with DVF you can use the CPU_TIME function. Call it twice, once to get the start time and once to get the finish time. You run time is then the difference between the two values. The syntax is as follows:


Under Unix, there are "better" ways to keep track of your run times that do not involve modifying your Fortran source code. Most Unix versions include a time function which can be used to keep track of the system and user time during your run.

Note that if the above do not help, the easiest thing to do is pull out you manuals or use the online help system and look for time functions...
  Reply With Quote

Old   April 19, 1999, 15:34
Default Re: The method of Checking the CPU time
Patrick Godon
Posts: n/a
Hi. In addition to the function mentioned by Tim in Fortran, each parallel software has also its own function to do the same task. For example if you use MPI (message passing interface) to write your parallel program in Fortran, MPI has its own call of time functions that also includes of course the processor id in it. So you might want to check that too, once you get there. As a first step you can also use these options where you don't have to change your Fortran programs (as Tim suggested), e.g. in unix (on a Sparc station / Sun) you will just run your job by entering: time job , where 'job' is your executable statement (your job name). This will return the total cpu time for your job to be completed, but it is of course less accurate than the fortran function. PG.
  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 125 July 1, 2015 21:09
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
Reversed Time Marching Method (RTMM) paillou FLUENT 0 July 12, 2011 06:45
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 00:36
On the reduction of cpu time lee Main CFD Forum 4 March 7, 1999 23:02

All times are GMT -4. The time now is 15:22.