- publishing free software manuals
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
ISBN 0954612051
RRP £12.95 ($19.95)

Get a printed copy>>>

5.8.4.2 Types

MPI-1.1 structured types are supported, and walked exactly. The currently supported combiners are ‘MPI_COMBINER_NAMED’, ‘MPI_COMBINER_CONTIGUOUS’, ‘MPI_COMBINER_VECTOR’, ‘MPI_COMBINER_HVECTOR’ ‘MPI_COMBINER_INDEXED’, ‘MPI_COMBINER_HINDEXED’ and ‘MPI_COMBINER_STRUCT’. This should cover all MPI-1.1 types. The mechanism (function ‘walk_type’) should extend easily to cover MPI2 combiners.

MPI defines some named structured types (‘MPI_FLOAT_INT’, ‘MPI_DOUBLE_INT’, ‘MPI_LONG_INT’, ‘MPI_2INT’, ‘MPI_SHORT_INT’, ‘MPI_LONG_DOUBLE_INT’) which are pairs of some basic type and a C ‘int’. Unfortunately the MPI specification makes it impossible to look inside these types and see where the fields are. Therefore these wrappers assume the types are laid out as ‘struct { float val; int loc; }’ (for ‘MPI_FLOAT_INT’), etc, and act accordingly. This appears to be correct at least for Open MPI 1.0.2 and for Quadrics MPI.

If ‘strict’ is an option specified in ‘MPIWRAP_DEBUG’, the application will abort if an unhandled type is encountered. Otherwise, the application will print a warning message and continue.

Some effort is made to mark/check memory ranges corresponding to arrays of values in a single pass. This is important for performance since asking Valgrind to mark/check any range, no matter how small, carries quite a large constant cost. This optimisation is applied to arrays of primitive types (‘double’, ‘float’, ‘int’, ‘long’, ‘long long’, ‘short’, ‘char’, and ‘long double’ on platforms where ‘sizeof(long double) == 8’). For arrays of all other types, the wrappers handle each element individually and so there can be a very large performance cost.

ISBN 0954612051Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applicationsSee the print edition