OpenFoam profiling the solver simpleFoam
Hi guys,
I am new to OpenFoam and I want to profile the simpleFoam solver. In order to this, I included -pg at EXE_INC and EXE_LIBS in the option file located in $FOAM_SOLVERS/incompressible/simpleFoam/Make/ After recompiling this solver, I run the pitzDaily case by: simpleFoam . pitzDaily (am already in the $FOAM_RUN/tutorials/simpleFoam directory) After that it takes a long time to finish the calculations. If I watch the gprof results, by: gprof $FOAM_APPBIN/simpleFoam gmon.out and watch the total execution time, it tells me it took almost 20 seconds to finish, but the real execution time took 190 seconds. (BTW i changed the endtime in the controlDict file to 200 in stead of 1000, otherwise it took to long to wait) My questions are: Should I include the -pg flag in more option files? and why is there a difference in the real execution time and the results of gprof? Greetings, Andre |
Anyone with ideas plz?
Anyone with ideas plz?
|
I recompiled OpenFoam with WM_
I recompiled OpenFoam with WM_COMPILE_OPTION=Prof to enable profiling.
Again, if i run simpleFoam . pitzDaily and profile the result, I find out that the real execution time takes 192 seconds, but Gprof profiles only 23 seconds. I am still wondering what the CPU is doing for 192-23 = 169 seconds. Can anyone help me with this? Thanks |
Is this somehow related with t
Is this somehow related with the ldl and math library that are included?
I would appreciate any kind of help. Thanks |
I have a feeling that I am tal
I have a feeling that I am talking to myself http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
Can anyone please give me some hints, or help me solving this issue. Thanks. |
192s is the wall-clock time of
192s is the wall-clock time of the profiling-enabled executable? How long does the executable without profiling run? My guess ist, that it would be approx 23 seconds. Maybe the 169s is the administrative effort of the profiling? (But I'm not an expert on profiling, I only know that a profiling executable runs significantly slower)
|
Have you tried valgrind/kcache
Have you tried valgrind/kcachegrind (which emulates your processor). Produces amazing pictures ;-)
|
Kcachegrind is indeed useful i
Kcachegrind is indeed useful if memory/cache usage must be investigated, but I want to profile for timing and to find out in which function most CPU-time is spend.
Thanks for the replies. |
Hi Andrea,
I think what Mattijs meant is to run your simulation using this command valgrind --tool=callgrind <executableName> then you can obtain block diagrams (along with its executable time) and graph using kcachegrind <callgrindFileName> Thanks and regards, Robert |
how to optimize simpleFoam solver in OpenFOAM
Hello,
I am trying to optimize simpleFoam solver in OpenFOAM. I have tried with the optimization flags available like O2, O3. The error here is that it is not able to include .h files which are included in the .C file. If suppose in simpleFoam.C file, the .h file included is fvCFD.H. It is not including that file. Even if I give the full path of that file from /home/...upto that file/fvCFD.H. Then, the next error is like, it will include that file, but in that fvCFD.H, we have again another number of .h files to include. So, how can we resolve this problem.. Any idea? |
All times are GMT -4. The time now is 18:12. |