Configure options


Up: Details Next: MPI and PMPI routines Previous: Details

The configure script documents itself in the following way. If you type

    configure -usage 
you will get a complete list of arguments and their meanings; these are also shown in Appendix Configure Usage . The most important options are
{ --prefix=dir}
The installation prefix. configure understands all of the usual GNU installation directory arguments, including --libdir and --mandir. We recommend that all users specify an installation directory with --prefix.

{ --with-device=devname}
Set the mpich device to use. devname must be the name of one of the directories in the mpid directory, such as ch_p4, ch_shmem, globus2, or ch_p4mpd.

{ --enable-g}
Add the -g option to the compile scripts. This is a prerequisite for using most debuggers, including dbx, and gdb.

{ --enable-debug}
Turn on support for the Totalview(c) Debugger. This allows Totalview to display information on message queues.

{ --enable-sharedlib}
Build both static and shared libraries for mpich. This supports only a few systems, including those using gcc (e.g., most Linux Beowulf systems).


In addition, configure makes use of environment variables such as MAKE, CC, FC, CFLAGS, and FFLAGS.

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.



Up: Details Next: MPI and PMPI routines Previous: Details


MPI and PMPI routines


Up: Configure options Next: Configuring mpich for use with threads Previous: Configure options

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.



Up: Configure options Next: Configuring mpich for use with threads Previous: Configure options


Configuring mpich for use with threads


Up: Configure options Next: Signals Previous: MPI and PMPI routines

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.



Up: Configure options Next: Signals Previous: MPI and PMPI routines


Signals


Up: Configure options Next: Alternate C Compilers Previous: Configuring mpich for use with threads

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.

    1. For a HP Exemplar, please get the official version from HP (formerly Convex). This was originally based on mpich, but has been tuned for better performance on the Exemplar. If for some reason you want to use the shared memory version of mpich on the HP, use
        configure --with-device=ch_shmem --with-arch=hpux 
    

    2. such as the Origin 2000. SGI's own MPI is highly tuned for these machines. If you do want to use mpich, use
        configure --with-device=ch_shmem  
    
    Configure attempts to determine the number of processors that are available; you can override this by setting the environment variable PROCESSOR_COUNT before running configure. Alternately, you can edit the file mpich/mpid/ch_shmem/shdef.h to adjust the maximum number of processors and memory that is used for communicating messages through shared memory. If you need to generate a particular version that corresponds to the -32, -n32, or -64 compiler/linker options on SGI, use the architectures IRIX32, IRIXN32, or IRIX64 respectively instead of SGI. Specifically, use the following for an R10000 or R12000 SGI:
        ./configure --with-arch=IRIX32 
        ./configure --with-arch=IRIXN32 
        ./configure --with-arch=IRIX64 
    
    If it is necessary to specify the specific compiler options, they must be specified by setting the CC and FC environment variables:
        setenv CC "cc -32" 
        setenv FC "f77 -32" 
        configure --with-arch=IRIX32 \ 
            -opt="-O2" \ 
            --with-device=ch_shmem 
     
        setenv CC "cc -n32 -mips4 -r10000" 
        setenv FC "f77 -n32 -mips4 -r10000" 
        configure --with-arch=IRIXN32 \ 
            -opt="-O2" \ 
            --with-device=ch_shmem 
     
        setenv CC "cc -64 -mips4 -r10000" 
        setenv FC "f77 -64 -mips4 -r10000" 
        configure --with-arch=IRIX64 \ 
            -opt="-O2" \ 
            --with-device=ch_shmem 
    
    (The optimization level is optional; -O2 has worked for some users. Be careful of aggressive optimization, particularly in the mpid/ch_shmem code.)

    See the comments under SGI workstations for different 32 and 64 bit options.

The configure option --enable-yield allows you to control how the ch_shmem device yields the processor when it is waiting for an incoming message. By default, it uses the POSIX function sched_yield if it is available. The option --enable-yield=dynamic allows you to use the environment variable MPICH_YIELD to control the choice of yield function. The value of MPICH_YIELD are
{ sched_yield}
Use POSIX sched_yield. This is the default, and is recommended.
{ select}
Use the select call. This should be used only for experimentation; in our tests, it has not worked well.
{ none}
Do not yield. This is appropriate when there are more than enough processors for the MPI environment and minimum latency is the overridding goal.



Up: Configure options Next: Alternate C Compilers Previous: Configuring mpich for use with threads