# time consuming of the linear solver

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 2, 2013, 05:09 time consuming of the linear solver #1 Member   Hassan Join Date: Oct 2012 Location: Iran Posts: 63 Rep Power: 6 Sponsored Links 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.

 August 3, 2013, 20:42 #2 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,210 Rep Power: 19 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.

August 4, 2013, 16:15
#3
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,008
Rep Power: 43
Quote:
 Originally Posted by luckycfd 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

 September 23, 2013, 05:29 final #4 Member   Hassan Join Date: Oct 2012 Location: Iran Posts: 63 Rep Power: 6 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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post irishdave OpenFOAM Running, Solving & CFD 29 May 3, 2017 08:59 sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 07:47 AnjaMiehe OpenFOAM Running, Solving & CFD 2 January 26, 2013 07:50 JasonG OpenFOAM Running, Solving & CFD 20 July 11, 2012 20:08 fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56