|
[Sponsors] |
February 4, 2008, 08:16 |
OpenFoam profiling the solver simpleFoam
|
#1 |
New Member
Andre
Join Date: Mar 2009
Posts: 19
Rep Power: 17 |
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 |
|
February 6, 2008, 07:37 |
Anyone with ideas plz?
|
#2 |
New Member
Andre
Join Date: Mar 2009
Posts: 19
Rep Power: 17 |
Anyone with ideas plz?
|
|
February 11, 2008, 08:10 |
I recompiled OpenFoam with WM_
|
#3 |
New Member
Andre
Join Date: Mar 2009
Posts: 19
Rep Power: 17 |
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 |
|
February 27, 2008, 09:35 |
Is this somehow related with t
|
#4 |
New Member
Andre
Join Date: Mar 2009
Posts: 19
Rep Power: 17 |
Is this somehow related with the ldl and math library that are included?
I would appreciate any kind of help. Thanks |
|
March 10, 2008, 09:39 |
I have a feeling that I am tal
|
#5 |
New Member
Andre
Join Date: Mar 2009
Posts: 19
Rep Power: 17 |
I have a feeling that I am talking to myself
Can anyone please give me some hints, or help me solving this issue. Thanks. |
|
March 10, 2008, 12:01 |
192s is the wall-clock time of
|
#6 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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)
__________________
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 |
|
March 10, 2008, 14:34 |
Have you tried valgrind/kcache
|
#7 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Have you tried valgrind/kcachegrind (which emulates your processor). Produces amazing pictures ;-)
|
|
March 11, 2008, 10:36 |
Kcachegrind is indeed useful i
|
#8 |
New Member
Andre
Join Date: Mar 2009
Posts: 19
Rep Power: 17 |
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. |
|
April 7, 2011, 22:39 |
|
#9 |
Member
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16 |
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 |
|
April 29, 2017, 09:51 |
how to optimize simpleFoam solver in OpenFOAM
|
#10 |
New Member
Savita Mane
Join Date: Mar 2017
Posts: 4
Rep Power: 9 |
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? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SimpleFoam as Newtonian laminar flow solver | titio | OpenFOAM Running, Solving & CFD | 2 | March 8, 2013 05:44 |
Dimension change in solver like simpleFoam | booz | OpenFOAM Running, Solving & CFD | 2 | August 21, 2008 12:35 |
MPI profiling OpenFOAM damBreak3D application | mellanoxuser | OpenFOAM Pre-Processing | 0 | April 14, 2008 00:15 |
MPI profiling OpenFOAM damBreak3D application | mellanoxuser | OpenFOAM Running, Solving & CFD | 0 | April 14, 2008 00:04 |
SimpleFoam as laminar solver | anja | OpenFOAM Pre-Processing | 3 | April 5, 2007 10:28 |