The next step is to configure mpich for your particular computing environment. Mpich can be built for a variety of parallel computers and also for networks of workstations. Parallel computers supported include the IBM SP (using various communication options), the Intel Paragon and IPSC860, HP Exemplar, NEC SX-4, and IBM, SGI, HP, and Sun Multiprocessors. Workstations supported are the Sun4 family (both SunOS and Solaris), Hewlett-Packard, DEC 3000 and Alpha, IBM RS/6000 family, and SGI. Also supported are Intel x86-based PC clones running the LINUX or FreeBSD operating systems. Previous versions of mpich supported the Kendall Square KSR-1 and KSR-2, the Meiko CS-2, Thinking Machines CM-5, and nCube. New ports are always pending.
Configuration of mpich is done with the configure script contained in the top-level directory. This script is automatically generated by the Gnu autoconf program (version 1.6, not version 2) from the file configure.in, but you do not need to have autoconf yourself.
The configure script documents itself in the following way. If you type
configure -usageyou will get a complete list of arguments and their meanings. So the simplest way to document the options for configure is to just show its output here:
Usage: configure [--with-arch=ARCH_TYPE] [-comm=COMM_TYPE] [--with-device=DEVICE] [--with-mpe] [--without-mpe] [--disable-f77] [--disable-f90] [--with-f90nag] [--with-f95nag] [--disable-f90modules] [--enable-c++ ] [--disable-c++] [--enable-mpedbg] [--disable-mpedbg] [--enable-devdebug] [--disable-devdebug] [--enable-debug] [--disable-debug] [--enable-long-long] [--disable-long-long] [--enable-long-double] [--disable-long-double] [-prefix=INSTALL_DIR] [-c++[=C++_COMPILER] ] [noc++] [-opt=OPTFLAGS] [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER] [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER] [-c++linker=CC_LINKER] [-cflags=CFLAGS] [-fflags=FFLAGS] [-c++flags=CCFLAGS] [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS] [-f90=F90_COMPILER] [-f90flags=F90_FLAGS] [-f90inc=INCLUDE_DIRECTORY_SPEC_FORMAT_FOR_F90] [-f90linker=F90_LINKER] [-f90libpath=LIBRARY_PATH_SPEC_FORMAT_FOR_F90] [-lib=LIBRARY] [-mpilibname=MPINAME] [-mpe_opts=MPE_OPTS] [-make=MAKEPGM ] [-memdebug] [-ptrdebug] [-tracing] [-dlast] [-listener_sig=SIGNAL_NAME] [-usesysv] [-cross] [-pkt_size=LENGTH] [-adi_collective] [-automountfix=AUTOMOUNTFIX] [-noranlib] [-ar_nolocal] [-rsh=RSHCOMMAND] [-rshnol] [-noromio] [-file_system=FILE_SYSTEM] [-p4_opts=P4_OPTS] where ARCH_TYPE = the type of machine that MPI is to be configured for COMM_TYPE = communications layer or option to be used DEVICE = communications device to be used INSTALL_DIR = directory where MPI will be installed (optional) MPE_OPTS = options to pass to the mpe configure P4_OPTS = options to pass to the P4 configure (device=ch_p4) C++_COMPILER = default is to use xlC, g++, or CC (optional) OPTFLAGS = optimization flags to give the compilers (e.g. -g) CFLAGS = flags to give C compiler FFLAGS = flags to give Fortran compiler MAKEPGM = version of make to use LENGTH = Length of message at which ADI switches from short to long message protocol AUTOMOUNTFIX = Command to fix automounters RSHCOMMAND = Command to use for remote shell MPILIBNAME = Name to use instead of mpich in the name of the MPI library. If set, libMPILIBNAME will be used instead or libmpich. This can be used on systems with several different MPI implementations. FILE_SYSTEM = name of the file system ROMIO is to use. Currently supported values are nfs, ufs, pfs (Intel), piofs (IBM), hfs (HP), sfs (NEC), and xfs (SGI). SIGNAL_NAME = name of the signal for the P4 (device=ch_p4) device to use to indicate that a new connection is needed. By default, it is SIGUSR1. All arguments are optional, but if 'arch', 'comm', or 'prefix' arguments are provided, there must be only one. 'arch' must be specified before 'comm' if they both appear. Packages that may be included with MPICH --with-device=name - Use the named device for communication. Known names include ch_p4, ch_mpl, ch_shmem, and globus2. If not specified, a default is chosen. Special options for the device are specified after the device name, separated by a colon. E.g., --with-device=globus2:-flavor=mpi,nothreads --with-romio[=OPTIONS] - Use ROMIO to provide MPI-I/O from MPI-2 (default). The options include -file_system=FSTYPE, where fstype can be any combination of nfs, ufs, pfs (intel), piofs (IBM), hfs (HP), sfs (NEC), and xfs (SGI), combined with '+'. If romio is not included, the Fortran 90 modules cannot be built. --with-mpe - Build the MPE environment (default) --with-f90nag - Choose the NAG f90 compiler for Fortran (preliminary version intended for use *instead* of a Fortran 77 compiler) --with-f95nag - Choose the NAG f95 compiler for Fortran You can use --without-<featurename> to turn off a feature (except for device). Features that may be included with MPICH --enable-c++ - Build C++ interfaces to the MPI-1 routines (default) --enable-f77 - Build Fortran 77 interfaces to the MPI routines (default) --enable-weak-symbols - Use weak symbols for MPI/PMPI routines. This uses weak symbols, if available, for the profiling interface (default) --enable-debug - Enable support for debuggers to access message queues --enable-mpedbg - Enable the -mpedbg command-line argument (e.g., errors can start an xterm running a debugger). Only works with some workstation systems. --enable-sharedlib - Attempt to build shared libraries. Static --enable-sharedlib=dir libraries are always built. If a directory is specified, the shared libraries will be placed in that directory. This can be used to place the shared libraries in a uniform location in local disks on a cluster. --enable-f90modules - Build Fortran 90 module support (default if a Fortran 90 or 95 compiler is found). If ROMIO is not built, no Fortran 90 modules will be built. The following are intended for MPI implementors and debugging of configure --enable-strict - Try and build MPICH using strict options in Gnu gcc --enable-echo - Cause configure to echo what it does --enable-devdebug - Enable debugging code in the ADI. You can use --disable-<featurename> to turn off a feature. Notes on configure usage: The suggestions for GNU configure usage suggest that configure not be used to build different tools, only controlling some basics of the features enabled or the packages included. Our use of configure does not follow these rules because configure is too useful but we need the flexibility that allows the user to produce variations of MPICH. More notes on command-line parameters: You can select a different C and Fortran compiler by using the '-cc' and 'fc' switches. The environment variables 'CC' and 'FC' can also provide values for these but their settings may be overridden by the configure script. Using '-cc=$CC -fc=$FC' will force configure to use those compilers. If '-with-cross=file is given, use the file for cross compilation. The file should contain assignments of the form CROSS_SIZEOF_INT=4 for each cross compilation variable. The command egrep 'CROSS_[A-Z_]*=' configure | sed 's/=.*//g' will list each variable. The option '-opt' allows you to specify optimization options for the compilers (both C and Fortran). For example, '-opt=-O' chooses optimized code generation on many systems. '-optcc' and '-optf77' allow you to specify options for just the C or Fortran compilers. Use -cflags and -fflags for options not related to optimization. Note that the '-opt' options are not passed to the 'mpicc', 'mpif77', 'mpiCC', and 'mpif90' scripts. The '-opt' options are used only in building MPICH. The option '-lib' allows you to specify the location of a library that may be needed by a particular device. Most devices do NOT need this option; check the installation instructions for those that might. The option '-make' may be used to select an alternate make program. For example, on FreeBSD systems, -make=gnumake may be required because makes derived from BSD 4.4 do not support the include operation (instead using the form .include, unlike all other makes); this is used in the wrappergen utility. The option '--disable-short-longs' may be used to suppress support for the C types 'long long' (a common extension) and 'long double' (ANSI/ISO C) when they are the same size as 'long' and 'double' respectively. Some systems allow these long C types, but generate a warning message when they are used; this option may be used to suppress these messages (and support for these types). '--disable-long-long' disables just 'long long'; '--disable-long-double' disables just 'long double'. The option '-ar_nolocal' prevents the library archive command from attempting to use the local directory for temporary space. This option should be used when (a) there isn't much space (less than 20 MB) available in the partition where MPICH resides and (b) there is enough space in /tmp (or wherever ar places temporary files by default). The option '-noranlib' causes the 'ranlib' step (needed on some systems to build an object library) to be skipped. This is particularly useful on systems where 'ranlib' is optional (allowed but not needed; because it is allowed, configure chooses to use it just in case) but can fail (some 'ranlib's are implemented as scripts using 'ar'; if they don't use the local directory, they can fail (destroying the library in the process) if the temporary directory (usually '/tmp') does not have enough space. This has occured on some OSF systems. The option '-memdebug' enables extensive internal memory debugging code. This should be used only if you are trying to find a memory problem (it can be used to help find memory problems in user code as well). Running programs with the option '-mpidb memdump' will produce a summary, when 'MPI_Finalize' is called, of all unfreed memory allocated my MPI. For example, a user-created datatype that was not later freed would be reported. The option '-tracing' enables tracing of internal calls. This should be used only for debugging the MPICH implementation itself. The option '-dlast' enables tracing of the most recent operations performed by the device. These can be output when a signal (like SIGINT), error, or call to a special routine occurs. There is a performance penalty for this option, but it can be very useful for implementors attempting to debug problems. The option '-rsh' allows you to select an alternative remote shell command (by default, configure will use 'rsh' or 'remsh' from your 'PATH'). If your remote shell command does not support the '-l' option (some AFS versions of 'rsh' have this bug), also give the option '-rshnol'. These options are useful only when building a network version of MPICH (e.g., '--with-device=ch_p4'). Special Tuning Options: There are a number of options for tuning the behavoir of the ADI (Abstract Device Interface) which is the low-level message-passing interface. These should NOT be used unless you are sure you know what you are doing. The option '-pkt_size=LENGTH' allows you to choose the message length at which the ADI (Abstract Device Interface) switches from its short to long message format. LENGTH must be positive. The option '-adi_collective' allows the ADI to provide some collective operations in addition to the basic point-to-point operations. Currently, most systems do not support this option (it is ignored) and on the others it has not been extensively tested. Sample Configure Usage: To make for running on sun4's running SunOS with ch_p4 as the device, and with the installation directory equal to the current directory: ./configure --with-device=ch_p4 --with-arch=sun4 make Known devices are ch_nx (native Intel NX calls), ch_mpl (native IBM EUI or MPL calls), ch_p4 (p4) globus2 (Globus: globus_io/vMPI) ch_meiko (for Meiko CS2, using NX compatibility library), ch_shmem (for shared memory systems, such as SMPs), ch_lfshmem(for shared memory systems, such as SMPs; uses lock-free message buffers), ch_cenju3 (native NEC Cenju-3 calls) The following devices were supported with ADI-1, but are currently unsupported. Please contact us if you are interested in helping us support these devices: meiko (for Meiko CS2, using elan tport library), and nx (for Intel Paragon), t3d (for the Cray T3D, using Cray shmem library). ch_nc (native nCUBE calls, requires -arch=ncube), ch_cmmd (native TMC CM-5 CMMD calls) These are no longer distributed with the MPICH distribution. Known architectures include (case is important) sun4 (SUN OS 4.x) solaris (Solaris) solaris86 (Solaris on Intel platforms) hpux (HP UX) sppux (SPP UX) rs6000 (AIX for IBM RS6000) sgi (Silicon Graphics IRIX 4.x, 5.x or 6.x) sgi5 (Silicon Graphics IRIX 5.x on R4400's, for the MESHINE) IRIX (synonym for sgi) IRIX32 (IRIX with 32bit objects -32) IRIXN32 (IRIX with -n32) IRIX64 (IRIX with 64bit objects) alpha (DEC alpha) intelnx (Intel i860 or Intel Delta) paragon (Intel Paragon) tflops (Intel TFLOPS) meiko (Meiko CS2) CRAY (CRAY XMP, YMP, C90, J90, T90) cray_t3d (CRAY T3D) freebsd (PC clones running FreeBSD) netbsd (PC clones running NetBSD) LINUX (PC clones running LINUX) ksr (Kendall Square KSR1 and KSR2) EWS_UX_V (NEC EWS4800/360AD Series workstation. Untested.) UXPM (UXP/M. Untested.) uxpv (uxp/v. Untested.) SX_4_float0 (NEC SX-4; Floating point format float0 Conforms IEEE 754 standard. C: sizeof (int) = 4; sizeof (float) = 4 FORTRAN: sizeof (INTEGER) = 4; sizeof (REAL) = 4) SX_4_float1 (NEC SX-4; Floating point format float1 IBM floating point format. C: sizeof (int) = 4; sizeof (float) = 4 FORTRAN: sizeof (INTEGER) = 4; sizeof (REAL) = 4) SX_4_float2 (NEC SX-4; Floating point format float2 CRAY floating point format. C: sizeof (int) = 4; sizeof (float) = 8 FORTRAN: sizeof (INTEGER) = 8; sizeof (REAL) = 8) !!! WARNING !!! This version will not run together with FORTRAN routines. sizeof (INTEGER) != sizeof (int) SX_4_float2_int64 (NEC SX-4; Floating point format float2 and 64-bit int's) C: sizeof (int) = 8; sizeof (float) = 8 FORTRAN: sizeof (INTEGER) = 8; sizeof (REAL) = 8) Special notes: For SGI (--with-arch=IRIX) multiprocessors running the ch_p4 device, use -comm=ch_p4 to disable the use of the shared-memory p4 communication device, and -comm=shared to enable the shared-memory p4 communication device. The default is to enable the shared-memory communication device. Others may be recognized. Options acceptable by '-mpe_opts=' : ****** Options available in mpe/configure --enable-echo - Turn on strong echoing. The default is enable=no. " --enable-strict - Turn on strict compilation testing when using gcc" --enable-mpe_graphics - build X11 part of MPE graphics routines. If disabled then the MPE routines that make use of X11 graphics will NOT be built; this is appropriate for systems that either do not have the X11 include files or that do not support X11 graphics. The default value is enable=yes." --enable-mpedbg - Enable the -mpedbg command-line argument (e.g., errors can start an xterm running a debugger). Only works with some workstation systems when used with MPICH. The default is enable=yes" --enable-g - Turn on/off the debugging & diagnostic messages flags in MPE & SLOG-API code. The default is enable=no." --enable-f77 - Compile routines that require a Fortran compiler. If configuring with MPICH, the configure in the top-level MPICH directory will choose the appropriate value for you. The default is enable=yes." --enable-f2cmpilib - Indicates if this MPE build will make its own Fortran to C MPI wrapper library. The library is needed for profiling Fortran code in Non-MPICH platform. The default is enable=yes" --enable-mpich - Indicates if this MPE will be built as part of the MPICH build. The default is enable=no" --enable-checkMPI - Turn on/off the linking test for the MPI include files, MPI libraries and MPI_CC compiler. The default is enable=yes" --enable-checkMPIwtime - Turn on/off the linking test for the MPI_Wtime(). The default is enable=no" --with-mpelibname=MPE_LIBNAME - Set the MPE library name instead of the default 'mpe'. e.g. if MPE_LIBNAME='mpe_new', then the libraries generated will be libmpe_new.a, liblmpe_new.a, libtmpe_new.a and libampe_new.a." --with-flib_path_leader=FLIB_PATH_LEADER - This option shows how to specify a Fortran library path ." --with-cflags=MPE_CFLAGS - supply extra MPE CFLAGS to the CC compiler" --with-fflags=MPE_FFLAGS - supply extra MPE FFLAGS to the Fortran compiler" --enable-broken-procnull - Handle MPI implementations with buggy handling of MPI_PROC_NULL" --enable-build_include - Turn on/off the building of include files. The default is enable=yes. Disabling this option will render the Makefiles in contrib/* not usable" --with-mpicc=MPI_CC - C compiler used to compile MPI program and to create parallel executable, e.g. mpcc for IBM MPI" --with-mpif77=MPI_F77 - F77 compiler used to compile MPI program and to create parallel executable, mpxlf for IBM MPI" --with-mpiinc=MPI_INC - compiler's include flag with prefix -I used in the MPI implementation, usually it specifies where mpi.h and mpif.h are located, e.g. -I/pkgs/MPI/include" --with-mpilibs=MPI_LIBS - compiler's full library flags with prefix -L to the library path and prefix -l to the name of the libraries used in the MPI implementation, usually specify where MPI libraries is located. e.g. -L/pkgs/MPI/lib -lpmpich -lmpich" --with-f2cmpilibs=F2CMPI_LIBS - compiler's library flags for Fortran to C MPI wrapper library. Using this option disables building of MPE's internal Fortran to C MPI library, --disable-f2cmpilib. The library is needed for profiling MPI Fortran program. e.g. "-lfmpich" when MPE is building with MPICH. " --with-x use the X Window System" --enable-viewers - Enable the build of all the available log viewers. The default is enable=yes." ****** Options available in mpe/slog_api/configure --enable-strict - Turn on strict compilation testing when using gcc" --with-cc=SLOG_CC - pass the preferred CC compiler, e.g. --with-cc=xlc. This will overide the environmental variable CC." --with-cflags=SLOG_CFLAGS - pass extra CFLAGS to the CC compiler like optimization flags or special machine dependent flags, e.g. -64 for IRIX64 platform" --enable-g - Turn on/off the debugging and diagnostic code, default=disabled" --enable-build_include - Turn on/off the building of include files" --enable-build_man - Turn on/off the building of man files" --enable-build_html - Turn on/off the building of html files" ****** Options available in mpe/viewers/configure --enable-upshot - Build upshot which is the ALOG viewer if it exists. The default is enable=yes." --enable-nupshot - Build nupshot which is the ALOG viewer if it exists. The default is enable=yes." --enable-jumpshot2 - Build jumpshot-2 which is the CLOG viewer if it exists. The default is enable=yes." --enable-jumpshot3 - Build jumpshot-3 which is the SLOG viewer if it exists. The default is enable=yes." ****** Options available in mpe/viewers/jumpshot-2/configure --enable-echo - Turn on strong echoing. The default is enable=no. " --enable-softerror - Turn on soft error, i.e. instead of issuing MSG_ERROR, MSG_WARN + exit 0 are used. The default is enable=no." --enable-g - Turn on the debugging flags, -g, and uses jdb to run the GUI. The default is enable=no" --enable-checkversion - Turn on the Java version checking code. Disabling this option means user needs to set JAVA_LIBS and SWING_LIBS by hand. The default is enable=yes" --with-java=JAVA_HOME - The path of the top-level directory of the Java installation. If this option is not given, configure will try to locate java for you." --with-jflags=JFLAGS - supply java compiler flags, e.g. optimization flags, -O, to the java compiler" ****** Options available in mpe/viewers/jumpshot-3/configure --enable-echo - Turn on strong echoing. The default is enable=no. " --enable-softerror - Turn on soft error, i.e. instead of issuing MSG_ERROR, MSG_WARN + exit 0 are used. The default is enable=no." --enable-g - Turn on the debugging flags, -g, and uses jdb to run the GUI. The default is enable=no" --enable-checkversion - Turn on the Java version checking code. Disabling this option means user needs to set JAVA_LIBS and SWING_LIBS by hand. The default is enable=yes" --with-java=JAVA_HOME - The path of the top-level directory of the Java installation. If this option is not given, configure will try to locate java for you." --with-jflags=JFLAGS - supply java compiler flags, e.g. optimization flags, -O, to the java compiler" ****** Options available in mpe/viewers/upshot/configure --enable-echo - Turn on strong echoing. The default is enable=no. " --enable-softerror - Turn on soft error, i.e. instead of issuing MSG_ERROR, MSG_WARN + exit 0 are used. The default is enable=no." --with-tcldir=tcldir - The path to the tcl directory. Wish shell will be assumed to be at \$tcldir/bin/wish." --with-tkdir=tkdir - The path to the tk directory. Wish shell will be assumed to be at \$tkdir/bin/wish." --with-wish=wishloc - The path to the tcl/tk wish executable. If this option is not given, configure will try to locate wish for you."
Normally, you should use configure with as few arguments as you can. For example, setting the C compiler with -cc=xxx may require also setting -cflags=yyy; configure will (usually) choose both the compiler and flags appropriately. 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.
mpich is implemented using an abstract device specification (ADI), described in [7]. In some environments, this abstract device is configured to be the native communication subsystem of the machine. This is done with the device argument to configure. For the rest of the environments, a generic communication device is constructed using p4 [1,2] and that is used as the instantiation of the ADI. In these cases, use ch_p4 as the device.
The ARCH_TYPE specifies what kind of processor the compilations will take place on. Valid ones are listed above. For the IBM SP, the architecture type is rs6000. If not given, configure will attempt to determine the type.
Some machines have multiple communication options, which are specified with the comm argument. Currently, the ch_p4 device makes use of this. By selecting -comm=shared, a version of the ch_p4 device that permits the use of both shared memory and IP/TCP is built. This is particularly useful on clusters of symmetric multiprocessors.
A new device globus2 [4,6], based on the Globus run-time system [5] is currently available. Like the ch_p4 device, the Globus2 device is able to use multimethod communication on some platforms. For example, the IBM SP binary can communicate via IBM's MPI or TCP depending on which node it is communicating with. See http://www.globus.org for more details.
Some sample invocations of configure are shown below. In most cases,
the mpe libraries are also built (See User's Guide). To build
without the mpe libraries, configure with -without-mpe.
In many cases,
the detailed invocations below are the defaults, which you would get if you
invoked configure with no arguments. That is, a good general strategy
is to first try
./configureFirst, for massively parallel processors (MPPs) and multiprocessors:
configure --with-device=ch_p4 -arch=CRAY
configure --with-device=ch_shmem -arch=hpux
configure --with-device=ch_nx -arch=paragon
configure --with-device=ch_mpl -arch=rs6000
configure --with-device=ch_shmemConfigure 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 -arch=IRIX32 ./configure -arch=IRIXN32 ./configure -arch=IRIX64If it is necessary to specify the specific compiler options, they must be specified by setting the -cc and -fc options:
configure -arch=IRIX32 \ -cc="cc -32" \ -fc="f77 -32" \ -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.)configure -arch=IRIXN32 \ -cc="cc -n32 -mips4 -r10000" \ -fc="f77 -n32 -mips4 -r10000" \ -opt="-O2" \ --with-device=ch_shmem
configure -arch=IRIX64 \ -cc="cc -64 -mips4 -r10000" \ -fc="f77 -64 -mips4 -r10000" \ -opt="-O2" \ --with-device=ch_shmem
See the comments under SGI workstations for different 32 and 64 bit options.