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

time consuming of the linear solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By luckycfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2013, 05:09
Default time consuming of the linear solver
  #1
Member
 
Hassan
Join Date: Oct 2012
Location: Iran
Posts: 63
Rep Power: 13
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, 20:42
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 16:15
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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): http://www.cfd-online.com/Forums/ope...profiling.html

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, 05:29
Default final
  #4
Member
 
Hassan
Join Date: Oct 2012
Location: Iran
Posts: 63
Rep Power: 13
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


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


All times are GMT -4. The time now is 20:49.