|Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications|
by J. Seward, N. Nethercote, J. Weidendorfer and the Valgrind Development Team
Paperback (6"x9"), 164 pages
RRP £12.95 ($19.95)
5.8.1 Building and installing the MPI wrappers
The wrapper library will be built automatically if possible. Valgrind's configure script will look for a suitable ‘mpicc’ to build it with. This must be the same ‘mpicc’ you use to build the MPI application you want to debug. By default, Valgrind tries ‘mpicc’, but you can specify a different one by using the configure-time flag ‘--with-mpicc=’. Currently the wrappers are only buildable with ‘mpicc’s which are based on GNU ‘gcc’ or Intel's ‘icc’.
Check that the configure script prints a line like this:
checking for MPI2-compliant mpicc and mpi.h... yes, mpicc
If it says ‘... no’, your ‘mpicc’ has failed to compile and link a test MPI2 program.
If the configure test succeeds, continue in the usual way with ‘make’ and ‘make install’. The final install tree should then contain ‘libmpiwrap.so’.
Compile up a test MPI program (e.g., MPI hello-world) and try this:
LD_PRELOAD=$prefix/lib/valgrind/<platform>/libmpiwrap.so \ mpirun [args] $prefix/bin/valgrind ./hello
You should see something similar to the following
valgrind MPI wrappers 31901: Active for pid 31901 valgrind MPI wrappers 31901: Try MPIWRAP_DEBUG=help for possible options
repeated for every process in the group. If you do not see these, there is an build/installation problem of some kind.
The MPI functions to be wrapped are assumed to be in an ELF shared object with soname matching ‘libmpi.so*’. This is known to be correct at least for Open MPI and Quadrics MPI, and can easily be changed if required.
|ISBN 0954612051||Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications||See the print edition|