CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

wall clock time for each processor

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By openfoammaofnepo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2014, 05:43
Default wall clock time for each processor
  #1
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear All,

I am trying to know the wall clock time for each processor. For instance, the following code:

Code:
            // --- PIMPLE loop
            while (pimple.loop())
            {
                #include "UEqn.H"
                #include "YEEqn.H"

                // --- Pressure corrector loop
                while (pimple.correct())
                {
                    #include "pEqn.H"
                }

                if (pimple.turbCorr())
                {
                    turbulence->correct();
                }
            }
I would like to know for each processor, how long is the wall clock time to calculate the following:
Code:
 #include "UEqn.H"
I noticed that in the OF, we always use
Code:
runTime.elapsedClockTime()
to return the wall clock time for each time step, but this is not for one processor.

Does anybody know something about how to output the wall clock time for each processor?
OFFO
openfoammaofnepo is offline   Reply With Quote

Old   June 23, 2014, 06:47
Default
  #2
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
In Openfoam, I found that we can use the following two functions to the wall clock time and cpu time:

Code:
time_t Foam::clock::clockTimeIncrement() const
double Foam::cpuTime::cpuTimeIncrement() const
When I add them into the code, I need to test both - the wall clock time and cpu time time. But I found that if put these functions together like :

Code:
......
runTime.cpuTimeIncrement();
runTime.clockTimeIncrement();
......
In this case, the function clockTimeIncrement() always returns the zero wall clock time. This maybe caused by the fact that these two functions are executed consecutively, i.e. newTime_-LastTime = 0. So I cannot get the wall clocktime in this way.

Do you have some suggestions if I indeed to extract the both wall clock time and cputime? Thank you very much.
Tushar@cfd likes this.
openfoammaofnepo is offline   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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 19:35.