The configure script documents itself in the following way. If you type
configure -usageyou will get a complete list of arguments and their meanings; these are also shown in Appendix Configure Usage . The most important options are
Normally, you should use configure with as few arguments as you can. If you leave all arguments off, configure will usually guess the correct architecture (arch) unless you are in a cross-compiling environment, and will usually choose an appropriate device (device) as well. Where TCP/IP is an appropriate mechanism for communication, the TCP device (ch_p4) will be chosen by default.
The MPI standard requires that each routine be available with both the MPI and
PMPI prefix; for example, MPI_Send and PMPI_Send. Mpich
attempts to use weak symbols to provide this feature; this reduces the
size of the mpich library. You can force mpich to make separate
libraries for
the MPI and PMPI versions by adding the configure option
--disable-weak-symbols:
configure --disable-weak-symbols ...Some MPI routines are implemented in terms of other MPI routines. For example, in mpich, MPI_Bcast is implemented using MPI_Send. When weak symbols are used, even the PMPI versions of the routines are implemented using the MPI (not PMPI) versions. If you want the PMPI routines to only use the PMPI routines, use --disable-weak-symbols when configuring mpich. Note that this behavior may change in later releases.
The mpich implementation of MPI is currently not threadsafe. It may,
however, be possible to use mpich in a threaded application as long as all
mpich calls are made by a single thread. An example of this is
OpenMP used for loop parallelism, combined with MPI.
However, you may run into some
problems with signals. Many thread packages make use of signals such as
SIGUSR1 and/or SIGUSR2. By default, the ch_p4 device
uses SIGUSR1. If you are using mpich with a thread package that uses
SIGUSR1, you will need to reconfigure, adding the argument
-listenersig=SIGNAL NAME to the --with-device=ch_p4 line and
rebuild mpich. For example,
./configure --with-device=ch_p4:-listenersig=SIGUSR2 make
In general, users should avoid using signals with MPI programs. The manual page for MPI_Init describes the signals that are used by the MPI implementation; these should not be changed by the user.
Because Unix does not chain signals, there is the possibility that several packages will attempt to use the same signal, causing the program to fail. For example, by default, the ch_p4 device uses SIGUSR1; some thread packages also use SIGUSR1.
In a few cases, you can change the signal before calling MPI_Init. In those cases, your signal handler will be called after the mpich implementation acts on the signal. For example, if you want to change the behavior of SIGSEGV to print a message, you can establish such a signal handler before calling MPI_Init. With devices such as the ch_p4 device that handle SIGSEGV, this will cause your signal handler to be called after mpich processes it.