CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

The method of Checking the CPU time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 18, 1999, 05:02
Default The method of Checking the CPU time
  #1
JunYoung Park
Guest
 
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, 12:28
Default Re: The method of Checking the CPU time
  #2
Tim Cowan
Guest
 
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:

CALL CPU_TIME(x)

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, 16:34
Default Re: The method of Checking the CPU time
  #3
Patrick Godon
Guest
 
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

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
Reversed Time Marching Method (RTMM) paillou FLUENT 0 July 12, 2011 07:45
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 01: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 11:59.