HP-MPI User's Guide (11th Edition)
Understanding HP-MPI
Thread-compliant library
Chapter 3 57
Thread-compliant library
HP-MPI provides a thread-compliant library. By default, the non
thread-compliant library (libmpi) is used when running HP-MPI jobs.
Linking to the thread-compliant library is now required only for
applications that have multiple threads making MPI calls
simultaneously. In previous releases, linking to the thread-compliant
library was required for multithreaded applications even if only one
thread was making a MPI call at a time. See Table B-1 on page 280.
To link with the thread-compliant library on HP-UX and Linux systems,
specify the -libmtmpi option to the build scripts when compiling the
application.
To link with the thread-compliant library on Windows systems, specify
the -lmtmpi option to the build scripts when compiling the application.
Application types that no longer require linking to the thread-compliant
library include:
• Implicit compiler-generated parallelism (e.g. +O3 +Oparallel in
HP-UX)
• Thread parallel applications utilizing the HP MLIB math libraries
• OpenMP applications
• pthreads (Only if no two threads call MPI at the same time.
Otherwise, use the thread-compliant library for pthreads.)