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

Time in FORTRAN90

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2006, 08:43
Default Time in FORTRAN90
  #1
ganesh
Guest
 
Posts: n/a
Dear Friends,

I have a fortran90 program with different subroutines. I would like to know the time taken for execution of each subroutine. It would be nice if anyone could point out how this can be achieved.

Thanks in advance,

Regards,

Ganesh
  Reply With Quote

Old   July 6, 2006, 09:24
Default Re: Time in FORTRAN90
  #2
anonymous
Guest
 
Posts: n/a
real*4 :: t0, t1, elapsed

call cpu_time(t0) call RotineToBeTracked call cpu_time(t1)

elapsed = t1-t0
  Reply With Quote

Old   July 6, 2006, 12:02
Default Re: Time in FORTRAN90
  #3
ganesh
Guest
 
Posts: n/a
Dear Anonymous,

Thanks for the speedy reply. It has helped me a lot

Regards,

Ganesh
  Reply With Quote

Old   July 7, 2006, 02:20
Default Re: Time in FORTRAN90
  #4
andy
Guest
 
Posts: n/a
You probably want to use a program called a profiler. Look in your manual to find details. On Linux gprof is one such program.

Adding timing statements works but is the equivalent of using print statements to debug instead of using a debugger program.
  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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 06:55
Time step size and max iterations per time step pUl| FLUENT 33 October 23, 2020 22:50
Problems with simulating TurbFOAM barath.ezhilan OpenFOAM 13 July 16, 2009 05:55
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 03:32
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 00:36


All times are GMT -4. The time now is 13:18.