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

time consuming of the linear solver

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

Like Tree1Likes
  • 1 Post By luckycfd

Reply
 
LinkBack Thread Tools Display Modes
Old   August 2, 2013, 06:09
Default time consuming of the linear solver
  #1
Member
 
Hassan
Join Date: Oct 2012
Location: Iran
Posts: 60
Rep Power: 4
luckycfd is on a distinguished road
Hi friend,

In order to calculate the total duration of the icoFoam progam, C++ profiling code( using clock() functions of the standard C library) has been inserted at the beginning and ending of the main() function of the icoFoam.C and this worked properly.
Now, for calculate the accumulation calculation time in the PCG solver class, what should I do?
I,m using this method for the PCG.C code in the PCG solver, but it dose not compile by wmak libso.
In other word, How can I calculate the total time consumed in this linear solver of the icoFoam solver for the cavity case?
immortality likes this.
luckycfd is offline   Reply With Quote

Old   August 3, 2013, 21:42
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
hi Hassan
What an interesting work!
But why you want to use clock() function while the solver shows the time has passed in terminal itself?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   August 4, 2013, 17:15
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,862
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by luckycfd View Post
Hi friend,

In order to calculate the total duration of the icoFoam progam, C++ profiling code( using clock() functions of the standard C library) has been inserted at the beginning and ending of the main() function of the icoFoam.C and this worked properly.
Now, for calculate the accumulation calculation time in the PCG solver class, what should I do?
I,m using this method for the PCG.C code in the PCG solver, but it dose not compile by wmak libso.
In other word, How can I calculate the total time consumed in this linear solver of the icoFoam solver for the cavity case?
Some time ago I developed a patch that collects that kind of information (automatically for linear solvers, for other parts of the code some instrumentation has to be added): Feature proposal: Application level profiling

I was informed at the time that this kind of information is unnecessary. Still use the patch for my OF-installations (only had to be modified slightly during the years) and find the information interesting
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 23, 2013, 06:29
Default final
  #4
Member
 
Hassan
Join Date: Oct 2012
Location: Iran
Posts: 60
Rep Power: 4
luckycfd is on a distinguished road
Hi friends,
Finally I could use the same C++ profiling code( using clock() functions of the standard C library) in PCG linear solver, and it worked properly.
Thank you all.

Regards,
Hassan.
luckycfd is offline   Reply With Quote

Reply

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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 26 July 24, 2014 05:30
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
PyFoam struggles with adopted solver AnjaMiehe OpenFOAM Running, Solving & CFD 2 January 26, 2013 07:50
Finally starting to explore OpenFOAM, questions on icoFoam solver... JasonG OpenFOAM Running, Solving & CFD 20 July 11, 2012 21:08
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56


All times are GMT -4. The time now is 14:59.