CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   time consuming of the linear solver (http://www.cfd-online.com/Forums/openfoam-programming-development/121645-time-consuming-linear-solver.html)

luckycfd August 2, 2013 05:09

time consuming of the linear solver
 
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 August 3, 2013 20:42

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?

gschaider August 4, 2013 16:15

Quote:

Originally Posted by luckycfd (Post 443450)
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

luckycfd September 23, 2013 05:29

final
 
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.


All times are GMT -4. The time now is 16:26.