Richard,

a) which (free) profiling tools can you recommend? I watched the video lecture of Wolfgang about that topic, but was looking for more opinions! I want to see which parts of the code take time apart from the (already detailed) TimerOutput.

Use valgrind's callgrind tool. The introduction to step-22 shows an example of how this looks in practice.

valgrind is single-threaded, but you can call it for every process via
  mpirun -n 8 valgrind --tool callgrind ./step-40
for example, and it will simply profile all 8 instances.

There is also Intel's VTune tool, which is useful to profile communication issues, but I have not used it in many years and cannot say much about it.


b) If I use simply "mpirun -n 4 mycode" on a machine with 8 physical cores, why do both PETSc and Trilinos use 8 cores during the AMG setup and solve? I observed that using the htop command, even when using an off-the-shelf "step-40.release" as included in the library. Does anyone else see that? It looks something like this during the AMG setup and solve for "mpirun -n 8 step-40":
screenshot_trilinos_step40_mpirun_n_8.png
It might be linked to the installation on the server, where I used candi. On my local machine, however, this does not happen.

It may be that the AMG is using OpenMP under the hood. You will want to set the number of threads available to OpenMP to one. There is an environment variable for that that you need to set either in your .bashrc or, if you just want to do it once, on the command line before running the program.

Best
 W.


--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d35c8e0d-2ab5-0635-9eba-c73e526452d6%40colostate.edu.

Reply via email to