1\documentclass[dvipdfm,11pt]{article} 2\usepackage[dvipdfm]{hyperref} % Upgraded url package 3\parskip=.1in 4 5% Formatting conventions for contributors 6% 7% A quoting mechanism is needed to set off things like file names, command 8% names, code fragments, and other strings that would confuse the flow of 9% text if left undistinguished from preceding and following text. In this 10% document we use the LaTeX macro '\texttt' to indicate such text in the 11% source, which normally produces, when used as in '\texttt{special text}', 12% the typewriter font. 13 14% It is particularly easy to use this convention if one is using emacs as 15% the editor and LaTeX mode within emacs for editing LaTeX documents. In 16% such a case the key sequence ^C^F^T (hold down the control key and type 17% 'cft') produces '\texttt{}' with the cursor positioned between the 18% braces, ready for the special text to be typed. The closing brace can 19% be skipped over by typing ^e (go to the end of the line) if entering 20% text or ^C-} to just move the cursor past the brace. 21 22% LaTeX mode is usually loaded automatically. At Argonne, one way to 23% get several useful emacs tools working for you automatically is to put 24% the following in your .emacs file. 25 26% (require 'tex-site) 27% (setq LaTeX-mode-hook '(lambda () 28% (auto-fill-mode 1) 29% (flyspell-mode 1) 30% (reftex-mode 1) 31% (setq TeX-command "latex"))) 32 33% 34% When updating the version number of MPICH, make sure that you change *all* 35% instances of the version. Search for mpich- and check each match. Some 36% are within a verbatim statement and will need to be changed for each update. 37% 38 39\begin{document} 40\markright{MPICH Installer's Guide} 41\title{{\bf MPICH Installer's Guide}\thanks{This work was supported by the 42 Mathematical, Information, and Computational Sciences Division 43 subprogram of the Office of Advanced Scientific Computing Research, 44 SciDAC Program, Office of Science, U.S. Department of Energy, under 45 Contract DE-AC02-06CH11357.}\\ 46 Version %MPICH_VERSION%\\ 47 Mathematics and Computer Science Division\\ 48 Argonne National Laboratory} 49 50\author{ 51Abdelhalim Amer \and Pavan Balaji \and Sudheer Chunduri \and Giuseppe 52Congui \and Huansong Fu \and William Gropp \and Yanfei Guo \and 53Shintaro Iwasaki \and Travis Koehring \and Rob Latham \and Kavitha 54Madhu \and Kaiming Ouyang \and Ken Raffenetti \and Min Si \and Rajeev 55Thakur \and Rohit Zambre \and Hui Zhou 56} 57 58\maketitle 59\cleardoublepage 60 61\pagenumbering{roman} 62\tableofcontents 63\clearpage 64 65\pagenumbering{arabic} 66\pagestyle{headings} 67 68%% Here is a basic outline for the document. (Bill's original outline) 69 70%% 0. Quick start with ``best practices''. Each step has a reference to 71%% more detailed information later in the document. 72%% 1. Acquiring and unpacking. Using a ``fast'' directory location and 73%% VPATH 74%% 1a. Reporting problems 75%% 2. Choosing a device (defer a detailed discussion of each until later) 76%% 3. configure, make, and install. Always use --prefix 77%% show only basic options for configure 78%% 3a. Optional include of device-specific information 79%% 3b. Optional include of pm-specific information 80%% 3c. Optional ``fast'' version 81%% 3d. Shared libraries 82%% 4. Testing and benchmarking 83%% 4a. make testing 84%% 4b. Getting, building, and using mpptest and netpipe 85%% 5. Special options 86%% 6. Troubleshooting 87%% Appendix: 88%% A. Summary of configure options (particularly the enable and with options) 89 90 91\section{Introduction} 92\label{sec:intro} 93This manual describes how to obtain and install MPICH, the MPI 94implementation from Argonne National Laboratory. (Of course, if you are 95reading this, chances are good that you have already obtained it and 96found this document, among others, in its \texttt{doc} subdirectory.) 97This \emph{Guide} will explain how to install MPICH so that you and others can use it to 98run MPI applications. Some particular features are different 99if you have system administration privileges (can become ``root'' on a 100Unix system), and these are explained here. It is not necessary to have 101such privileges to build and install MPICH. In the event of problems, 102send mail to \texttt{discuss@mpich.org}. Once MPICH is 103installed, details on how to run MPI jobs are covered in the \emph{MPICH 104User's Guide}, found in this same \texttt{doc} subdirectory. 105 106MPICH has many options. We will first go through a recommended, 107``standard'' installation in a step-by-step fashion, and later describe 108alternative possibilities. 109 110 111\section{Quick Start} 112\label{sec:quick} 113 114In this section we describe a ``default'' set of installation steps. 115It uses the default set of configuration options, which builds the 116\texttt{nemesis} communication device and the \texttt{Hydra} process 117manager, for languages C, C++, Fortran-77, and Fortran-90 (if those 118compilers exist), with compilers chosen automatically from the user's 119environment, without tracing and debugging options. It uses the 120\texttt{VPATH} feature of \texttt{make}, so that the build process can 121take place on a local disk for speed. 122 123\subsection{Prerequisites} 124\label{sec:prerequisites} 125 126For the default installation, you will need: 127\begin{enumerate} 128\item A copy of the distribution, \texttt{mpich.tar.gz}. 129\item A C compiler. 130\item A Fortran-77, Fortran-90, and/or C++ compiler if you wish to write 131 MPI programs in any of these languages. 132\item Any one of a number of Unix operating systems, such as IA32-Linux. 133 MPICH is most extensively tested on Linux; there remain some 134 difficulties on systems to which we do not currently have access. Our 135 \texttt{configure} script attempts to adapt MPICH to new systems. 136\end{enumerate} 137Configure will check for these prerequisites and try to work around 138deficiencies if possible. (If you don't have Fortran, you will 139still be able to use MPICH, just not with Fortran applications.) 140 141 142\subsection{From A Standing Start to Running an MPI Program} 143\label{sec:steps} 144Here are the steps from obtaining MPICH through running your own 145parallel program on multiple machines. 146 147\begin{enumerate} 148\item 149Unpack the tar file. 150\begin{verbatim} 151 tar xfz mpich.tar.gz 152\end{verbatim} 153If your tar doesn't accept the z option, use 154\begin{verbatim} 155 gunzip -c mpich.tar.gz | tar xf - 156\end{verbatim} 157Let us assume that the directory where you do this is 158\texttt{/home/you/libraries}. It will now contain a subdirectory named 159\texttt{mpich-%MPICH_VERSION%}. 160 161\item 162Choose an installation directory (the default is \texttt{/usr/local/bin)}: 163\begin{verbatim} 164 mkdir /home/you/mpich-install 165\end{verbatim} 166It will be most convenient if this directory is shared by all of the 167machines where you intend to run processes. If not, you will have 168to duplicate it on the other machines after installation. Actually, if 169you leave out this step, the next step will create the directory for you. 170 171\item 172Choose a build directory. Building will proceed \emph{much} faster if 173your build directory is on a file system local to the machine on which 174the configuration and compilation steps are executed. It is preferable 175that this also be separate from the source directory, so that the 176source directories remain 177clean and can be reused to build other copies on other machines. 178\begin{verbatim} 179 mkdir /tmp/you/mpich-%MPICH_VERSION% 180\end{verbatim} 181 182\item 183Choose any configure options. See 184Section~\ref{sec:important-configure-options} for a description of the most 185important options to consider. 186 187\item 188Configure MPICH, specifying the installation directory, and running 189the \texttt{configure} script in the source directory: 190\begin{verbatim} 191 cd /tmp/you/mpich-%MPICH_VERSION% 192 /home/you/libraries/mpich-%MPICH_VERSION%/configure \ 193 -prefix=/home/you/mpich-install |& tee c.txt 194\end{verbatim} 195where the \texttt{$\backslash$} means that this is really one line. (On 196\texttt{sh} and its derivatives, use \verb+2>&1 | tee c.txt+ 197instead of \verb+|& tee c.txt+). Other configure options are 198described below. Check the \texttt{c.txt} file to make sure 199everything went well. Problems should be self-explanatory, but if not, 200send \texttt{c.txt} to \texttt{discuss@mpich.org}. 201The file \texttt{config.log} is created by \texttt{configure} and 202contains a record of the tests that \texttt{configure} performed. It 203is normal for some tests recorded in \texttt{config.log} to fail. 204 205\item 206Build MPICH: 207\begin{verbatim} 208 make |& tee m.txt (for csh and tcsh) 209 OR 210 make 2>&1 | tee m.txt (for bash and sh) 211\end{verbatim} 212This step should succeed if there were no problems with the preceding 213step. Check file \texttt{m.txt}. If there were problems, 214do a \texttt{make clean} and then run make again with \texttt{VERBOSE=1} 215\begin{verbatim} 216 make VERBOSE=1 |& tee m.txt (for csh and tcsh) 217 OR 218 make VERBOSE=1 2>&1 | tee m.txt (for bash and sh) 219\end{verbatim} 220and then send \texttt{m.txt} and \texttt{c.txt} to 221\texttt{discuss@mpich.org}. 222 223\item 224Install the MPICH commands: 225\begin{verbatim} 226 make install |& tee mi.txt 227\end{verbatim} 228This step collects all required executables and scripts in the \texttt{bin} 229subdirectory of the directory specified by the prefix argument to 230configure. 231 232(For users who want an install directory structure compliant to 233GNU coding standards (i.e., documentation files go to 234\texttt{\$\{datarootdir\}/doc/\$\{PACKAGE\}}, architecture independent 235read-only files go to \texttt{\$\{datadir\}/\$\{PACKAGE\}}), replace 236\texttt{make install} by 237 238\begin{verbatim} 239 make install PACKAGE=mpich-<versrion> 240\end{verbatim} 241 242and corresponding installcheck step should be 243 244\begin{verbatim} 245 make installcheck PACKAGE=mpich-<version> 246\end{verbatim} 247 248Setting PACKAGE in \texttt{make install} or \texttt{make installcheck} step 249is optional and unnecessary for typical MPI users.) 250 251\item 252Add the \texttt{bin} subdirectory of the installation directory to your path: 253\begin{verbatim} 254 setenv PATH /home/you/mpich-install/bin:$PATH 255\end{verbatim} 256for \texttt{csh} and \texttt{tcsh}, or 257\begin{verbatim} 258 export PATH=/home/you/mpich-install/bin:$PATH 259\end{verbatim} 260for \texttt{bash}, and 261\begin{verbatim} 262 PATH=/home/you/mpich-install/bin:$PATH 263 export PATH 264\end{verbatim} 265for \texttt{sh} (the \texttt{bash} syntax may work for more recent 266implementations of \texttt{sh}). % export var=value is an extension and 267 % is not in original sh 268Check that everything is in order at 269this point by doing 270\begin{verbatim} 271 which mpicc 272 which mpiexec 273\end{verbatim} 274All should refer to the commands in the \texttt{bin} subdirectory of your 275install directory. It is at this point that you will need to 276duplicate this directory on your other machines if it is not 277in a shared file system. % Just having NFS doesn't mean that directories 278 % are consistencly cross-mounted. 279 280\item Check that you can reach these machines with \texttt{ssh} or 281\texttt{rsh} without entering a password. You can test by doing 282 283\begin{verbatim} 284 ssh othermachine date 285\end{verbatim} 286 287or 288 289\begin{verbatim} 290 rsh othermachine date 291\end{verbatim} 292 293If you cannot get this to work without entering a password, you will 294need to configure \texttt{ssh} or \texttt{rsh} so that this can be 295done. 296 297\item Test the setup you just created: 298 299\begin{verbatim} 300 mpiexec -f machinefile -n <number> hostname 301\end{verbatim} 302 303The machinefile contains the list of hosts you want to run the 304executable on. 305 306\begin{verbatim} 307 % cat machinefile 308 host1 # Run 1 process on host1 309 host2:4 # Run 4 processes on host2 310 host3:2 # Run 2 processes on host3 311 host4:1 # Run 1 process on host4 312\end{verbatim} 313 314\item 315Now we will run an MPI job, using the \texttt{mpiexec} command as specified 316in the MPI standard. 317 318As part of the build process for MPICH, a simple program to compute the value 319of $\pi$ by numerical integration is created in the 320\texttt{mpich-%MPICH_VERSION%/examples} directory. If the current directory is the top 321level MPICH build directory, then you can run this program with 322\begin{verbatim} 323 mpiexec -n 5 -f machinefile ./examples/cpi 324\end{verbatim} 325The \texttt{cpi} example will tell you which hosts it is running on. 326 327There are many options for \texttt{mpiexec}, by which multiple 328executables can be run, hosts can be specified, separate command-line 329arguments and environment variables can be passed to different 330processes, and working directories and search paths for executables 331can be specified. Do 332\begin{verbatim} 333 mpiexec --help 334\end{verbatim} 335for details. A typical example is: 336\begin{verbatim} 337 mpiexec -f machinefile -n 1 ./main : -n 19 ./child 338\end{verbatim} 339to ensure that the process with rank 0 runs on your workstation. 340 341The arguments between `:'s in this syntax are called ``argument sets,'' 342since they apply to a set of processes. More argments are described in 343the \textit{User's Guide}. 344 345\end{enumerate} 346 347If you have completed all of the above steps, you have successfully 348installed MPICH and run an MPI example. 349 350% 351% DO NOT REMOVE THE FOLLOWING SECTION. IF NECESSARY, UPDATE IT. 352\subsection{Selecting the Compilers} 353\label{sec:compilers} 354The MPICH configure step will attempt to find the C, C++, and Fortran 355compilers for you, but if you either want to override the default or 356need to specify a compiler that configure doesn't recognize, you can 357specify them on the command line using these variables 358\begin{description} 359\item[CC]The C compiler. 360\item[CXX]The C++ compiler. Use \texttt{--disable-cxx} if you do not 361 want to build the MPI C++ interface 362\item[F77]The Fortran 77 compiler (for the original MPI Fortran 363 bindings). Use \texttt{--disable-f77} if you do not want to build 364 either the Fortran 77 or Fortran 90 MPI interfaces 365\item[FC]The Fortran 90 (or later) compiler. Use 366 \texttt{--disable-fc} if you do not want to build the Fortran 90 MPI 367 interfaces. Note that in previous versions of MPICH, the variable 368 name was \texttt{F90}. As Fortran has had 3 major releases since 369 Fortran 90 (95, 2003, and 2008), most tools, including those built 370 with GNU autotools, have or are changing to use \texttt{FC} instead 371 of \texttt{F90}. 372\end{description} 373For example, to select the Intel compilers instead of the GNU 374compilers on a system with both, use 375\begin{verbatim} 376 ./configure CC=icc CXX=icpc F77=ifort FC=ifort ... 377\end{verbatim} 378Note the use of the same Fortran compiler, \texttt{ifort}, for both 379Fortran 77 and Fortran 90; this is an increasingly common choice. 380 381\subsection{Compiler Optimization Levels} 382 383MPICH can be configured with two sets of compiler flags: 384\texttt{CFLAGS}, \texttt{CXXFLAGS}, \texttt{FFLAGS}, \texttt{FCFLAGS} 385(abbreviated as \texttt{xFLAGS}) and \texttt{MPICHLIB\_CFLAGS}, 386\texttt{MPICHLIB\_CXXFLAGS}, \texttt{MPICHLIB\_FFLAGS}, 387\texttt{MPICHLIB\_FCFLAGS} (abbreviated as \texttt{MPICHLIB\_xFLAGS}) 388for compilation; \texttt{LDFLAGS} and \texttt{MPICHLIB\_LDFLAGS} for linking. 389All these flags can be set as part of configure command or 390through environment variables. 391(\texttt{CPPFLAGS} stands for C preprocessor flags, which should NOT be set) 392 393Both \texttt{xFLAGS} and \texttt{MPICHLIB\_xFLAGS} affect the compilation 394of the MPICH libraries. However, only \texttt{xFLAGS} is appended to 395MPI wrapper scripts, \texttt{mpicc} and friends. 396 397MPICH libraries are built with default compiler optimization, \texttt{-O2}, 398which can be modified by \texttt{--enable-fast} configure option. For instance, 399\texttt{--disable-fast} disables the default optimization option. 400\texttt{--enable-fast=O<n>} sets default compiler optimization as 401\texttt{-O<n>} (note that this assumes that the compiler accepts this 402format). 403For more details of \texttt{--enable-fast}, see the output of 404\texttt{configure --help}. 405Any other complicated optimization flags for MPICH libraries have 406to be set throught \texttt{MPICHLIB\_xFLAGS}. \texttt{CFLAGS} and friends 407are empty by default. 408 409For example, to build a production MPICH environment with \texttt{-O3} for all 410language bindings, one can simply do 411 412\begin{verbatim} 413 ./configure --enable-fast=all,O3 414\end{verbatim} 415 416or 417 418\begin{verbatim} 419 ./configure --enable-fast=all MPICHLIB_CFLAGS=-O3 \ 420 MPICHLIB_FFLAGS=-O3 \ 421 MPICHLIB_CXXFLAGS=-O3 \ 422 MPICHLIB_FCFLAGS=-O3 423\end{verbatim} 424 425This will cause the MPICH libraries to be built with \texttt{-O3}, 426and \texttt{-O3} will 427not be included in the \texttt{mpicc} and other MPI wrapper script. 428 429\subsection{Common Non-Default Configuration Options} 430\label{sec:non-default} 431 432A brief discussion of some of the \texttt{configure} options is found in 433Section~\ref{configure-options}. Here we comment on some of the most 434commonly used options. 435% FIXME: This section needs much more work. 436 437\subsubsection{The Most Important Configure Options} 438\label{sec:important-configure-options} 439\begin{description} 440\item[--prefix]Set the installation directories for MPICH. 441\item[--enable-debuginfo]Provide access to the message queues for 442 debuggers such as Totalview. 443\item[--enable-g]Build MPICH with various debugging options. This is 444 of interest primarily to MPICH developers. The options 445\begin{verbatim} 446 --enable-g=dbg,mem,log 447\end{verbatim} 448 are recommended in that case. 449\item[--enable-fast]Configure MPICH for fastest performance at the 450 expense of error reporting and other program development aids. This 451 is recommended only for getting the best performance out of proven 452 production applications, and for benchmarking. 453\item[--enable-shared]Build MPICH with shared libraries. 454 MPICH will try to automatically detect the type of shared library 455 support required. See Section~\ref{sec:shared-libraries} for more details. 456\item[--with-pm]Select the process manager. The default is 457 \texttt{hydra}; also useful are \texttt{gforker} and \texttt{remshell}. You can build with 458 all three process managers by specifying 459\begin{verbatim} 460 --with-pm=hydra:gforker:remshell 461\end{verbatim} 462\item[--with-java]Set the location of Java installation. This option 463is necessary only if the default Java installation in your PATH does 464not contain a valid Java installation for Jumpshot, e.g. 465\begin{verbatim} 466 --with-java=/opt/jdk1.6.0 467\end{verbatim} 468\end{description} 469 470 471\subsubsection{Using the Absoft Fortran compilers with MPICH} 472\label{sec:absoft} 473 474For best results, it is important to force the Absoft Fortran compilers to 475make all routine names monocase. In addition, if lower case is chosen 476(this will match common use by many programs), you must also tell the the 477Absoft compiles to append an underscore to global names in order to access 478routines such as \texttt{getarg} (\texttt{getarg} is not used by MPICH but is 479used in some 480of the tests and is often used in application programs). We recommend 481configuring MPICH with the following options 482\begin{verbatim} 483 484setenv F77 f77 485setenv FFLAGS "-f -N15" 486setenv FCFLAGS "-YALL_NAMES=LCS -YEXT_SFX=_" 487 488./configure .... 489 490\end{verbatim} 491 492 493 494 495\subsection{Shared Libraries} 496\label{sec:shared-libraries} 497 498To have shared libraries created when MPICH is built, specify the 499following when MPICH is configured: 500 501\begin{verbatim} 502 configure --enable-shared 503\end{verbatim} 504 505 506 507\subsection{What to Tell the Users} 508\label{sec:telling} 509 510Now that MPICH has been installed, the users have to be informed of how 511to use it. Part of this is covered in the \emph{User's Guide}. Other 512things users need to know are covered here. 513 514 515\section{Migrating from MPICH1} 516\label{sec:migrating} 517 518MPICH is an all-new rewrite of MPICH1. Although the basic steps for 519installation have remained the same (\texttt{configure}, \texttt{make}, 520\texttt{make install}), a number of things have changed. In this 521section we attempt to point out what you may be used to in MPICH1 that 522are now different in MPICH. 523 524\subsection{Configure Options} 525\label{sec:configure-options} 526 527The arguments to \texttt{configure} are different in MPICH1 and MPICH; 528the \texttt{Installer's Guide} discusses \texttt{configure}. In 529particular, the newer \texttt{configure} in MPICH does not support the 530\verb+-cc=<compiler-name>+ (or \texttt{-fc}, \texttt{-c++}, or 531\texttt{-f90}) options. Instead, many of the items that could be 532specified in the command line to configure in MPICH1 must now be set by 533defining an environment variable. E.g., while MPICH1 allowed 534\begin{verbatim} 535 ./configure -cc=pgcc 536\end{verbatim} 537MPICH requires 538\begin{verbatim} 539 ./configure CC=pgcc 540\end{verbatim} 541Basically, every 542option to the MPICH-1 configure that does not start with 543\texttt{--enable} or \texttt{--with} is not available as a configure 544option in MPICH. Instead, environment variables must be used. This is 545consistent (and required) for use of version 2 GNU \texttt{autoconf}. 546 547\subsection{Other Differences} 548Other differences between MPICH1 and MPICH include the handling of 549process managers and the choice of communication device. 550 551For example, the new process managers have a new format and slightly 552different semantics for the \texttt{-machinefile} option. Assume that 553you type this data into a file named \texttt{machfile}: 554 555\begin{verbatim} 556 bp400:2 557 bp401:2 558 bp402:2 559 bp403:2 560\end{verbatim} 561 562If you then run a parallel job with this machinefile, you would expect 563ranks 0 and 1 to run on bp400 because it says to run 2 processes there 564before going on to bp401. Ranks 2 and 3 would run on bp401, and rank 5654 on bp402, e.g.: 566 567\begin{verbatim} 568 mpiexec -l -machinefile machfile -n 5 hostname 569\end{verbatim} 570 571produces: 572\begin{verbatim} 573 0: bp400 574 1: bp400 575 2: bp401 576 3: bp401 577 4: bp402 578\end{verbatim} 579 580\section{Choosing the Communication Device} 581\label{sec:choose-device} 582 583MPICH is designed to be build with many different communication devices, 584allowing an implementation to be tuned for different communication fabrics. A 585simple communication device, known as ``ch3'' (for the third version of the 586``channel'' interface) is provided with MPICH and is the default choice. 587 588The ch3 device itself supports a variety of communication methods. These are 589specified by providing the name of the method after a colon in the 590\texttt{--with-device} configure option. For example, 591\texttt{--with-device=ch3:sock} selects the (older) socket-base communication 592method. 593Methods supported by the MPICH group include: 594 595\begin{description} 596\item[ch3:nemesis]This method is our new, high performance method. It 597 has been made the default communication channel starting the 1.1 598 release of MPICH. It uses shared-memory to send messages between 599 processes on the same node and the network for processes between 600 nodes. Currently sockets and Myrinet-MX are supported networks. It 601 supports \texttt{MPI\_THREAD\_MULTIPLE} and other levels of thread 602 safety. 603\item[ch3:sock]This method uses sockets for all communications between 604 processes. It supports \texttt{MPI\_THREAD\_MULTIPLE} and other 605 levels of thread safety. 606\end{description} 607 608Most installations should use the default \texttt{ch3:nemesis} method 609for best performance. For platforms that are not supported by nemesis, 610the \texttt{ch3:sock} method is suggested. 611 612MPICH is designed to efficiently support all types of systems. The 613\texttt{ch3:nemesis} device is the primary focus of the MPICH group, 614but other research groups and computer vendors can and have developed 615both their own ch3 ``channels'' as well as complete communication 616``devices'' in place of ch3. 617 618 619% 620% Add any configure options that are specific to each method here. Also 621% any environment variables that might apply (e.g., MPICH_INTERFACE_HOSTNAME 622% or MPICH_PORT_RANGE. 623% 624%\subsection{Special Features of Each Communication Device} 625%\subsubsection{ch3:nemesis} 626 627\section{Installing and Managing Process Managers} 628\label{sec:process-managers} 629MPICH has been designed to work with multiple process managers; that 630is, although you can start MPICH jobs with \texttt{mpiexec}, there are 631different mechanisms by which your processes are started. An interface 632(called PMI) isolates the MPICH library code from the process manager. 633Currently three process managers are distributed with MPICH 634\begin{description} 635\item[hydra] This is the default process manager tha natively uses the 636existing daemons on the system such as ssh, slurm, pbs. 637\item[gforker] This is a simple process manager that creates all 638 processes on a single machine. It is useful both for debugging and 639 for running on shared memory multiprocessors. 640\end{description} 641 642\subsection{hydra} \label{sec:hydra} \texttt{hydra} is the default 643process manager that launches processes using the native daemons 644present on the system such as ssh, slurm, pbs, etc. To configure with 645the \texttt{hydra} process manager, use 646 647\begin{verbatim} 648 configure --with-pm=hydra ... 649\end{verbatim} 650 651 652\subsection{gforker} 653\label{sec:forker} 654\texttt{gforker} is a simple process manager that runs all processes on 655a single node; it's version of \texttt{mpiexec} uses the system 656\texttt{fork} and \texttt{exec} calls to create the new processes. 657To configure with the \texttt{gforker} process manager, use 658\begin{verbatim} 659 configure --with-pm=gforker ... 660\end{verbatim} 661 662\section{Testing} 663\label{sec:testing} 664Once MPICH has been installed, you can test it by running some of the example 665programs in the \texttt{examples} directory. A more thorough test can be run 666with the command \texttt{make testing}. This will produce a summary on 667standard output, along with an XML version of the test results in 668\texttt{mpich/test/mpi}. In addition, running \texttt{make testing} from the 669top-level (\texttt{mpich}) directory will run tests of the commands, such as 670\texttt{mpicc} and \texttt{mpiexec}, that are included with MPICH. 671 672Other MPI test suites are available from 673\url{http://www.mcs.anl.gov/mpi/mpi-test/tsuite.html}. As part of the MPICH 674development, we run the MPICH1, MPICH, C++, and Intel test suites every night 675and post the results on 676\url{http://www.mpich.org/static/cron/tests/}. 677Other tests are run on an occasional basis. 678 679% \subsection{Using the Intel Test Suite} 680% \label{sec:intel} 681 682% These instructions are local to our test environment at Argonne. 683 684% How to run a select set of tests from the Intel test suite: 685 686% \begin{small} 687% \begin{verbatim} 688% 1) checkout the Intel test suite (svn co https://svn.mcs.anl.gov/repos/mpi/test_suites/intel/trunk IntelMPITEST) (outside users 689% can access the most recent version of the test suite from the 690% test suite web page). 691 692% 2) create a testing directory separate from the IntelMPITEST source 693% directory 694 695% 3) cd into that testing directory 696 697% 4) run "<ITS_SRC_DIR>/configure --with-mpich=<MPICH_INSTALL_DIR>", where 698% <ITS_SRC_DIR> is the path to the directory Intel test suite source (e.g., 699% /home/toonen/Projects/MPI-Tests/IntelMPITEST) and <MPICH_INSTALL_DIR> is 700% the directory containing your MPICH installation 701 702% 5) mkdir Test; cd Test 703 704% 6) find tests in <ITS_SRC_DIR>/{c,fortran} that you are interested in 705% running and place the test names in a file. For example: 706 707% % ( cd /home/toonen/Projects/MPI-Tests/IntelMPITEST/Test ; \ 708% find {c,fortran} -name 'node.*' -print | grep 'MPI_Test' 709% | sed -e 's-/node\..*$--' ) |& tee testlist 710% Test/c/nonblocking/functional/MPI_Test 711% Test/c/nonblocking/functional/MPI_Testall 712% Test/c/nonblocking/functional/MPI_Testany 713% Test/c/nonblocking/functional/MPI_Testsome 714% Test/c/persist_request/functional/MPI_Test_p 715% Test/c/persist_request/functional/MPI_Testall_p 716% Test/c/persist_request/functional/MPI_Testany_p 717% Test/c/persist_request/functional/MPI_Testsome_p 718% Test/c/probe_cancel/functional/MPI_Test_cancelled_false 719% Test/fortran/nonblocking/functional/MPI_Test 720% Test/fortran/nonblocking/functional/MPI_Testall 721% Test/fortran/nonblocking/functional/MPI_Testany 722% Test/fortran/nonblocking/functional/MPI_Testsome 723% Test/fortran/persist_request/functional/MPI_Test_p 724% Test/fortran/persist_request/functional/MPI_Testall_p 725% Test/fortran/persist_request/functional/MPI_Testany_p 726% Test/fortran/persist_request/functional/MPI_Testsome_p 727% Test/fortran/probe_cancel/functional/MPI_Test_cancelled_false 728% % 729 730% 7) run the tests using ../bin/mtest: 731 732% % ../bin/mtest -testlist testlist -np 6 |& tee mtest.log 733% % 734 735% NOTE: some programs hang if less they are run with less than 6 processes. 736 737% 8) examine the summary.xml file. look for '<STATUS>fail</STATUS>' to see if 738% any failures occurred. (search for '>fail<' works as well) 739 740% \end{verbatim} 741% \end{small} 742 743\section{Benchmarking} 744\label{sec:benchmarking} 745 746There are many benchmarking programs for MPI implementations. Three 747that we use are \texttt{mpptest} 748(\url{http://www.mcs.anl.gov/mpi/mpptest}), \texttt{netpipe} 749(\url{http://www.scl.ameslab.gov/netpipe}), and \texttt{SkaMPI} 750(\url{http://liinwww.ira.uka.de/~skampi}). Each of these has 751different strengths and weaknesses and reveals different properties of 752the MPI implementation. 753 754In addition, the 755MPICH test suite contains a few programs to test for performance artifacts in 756the directory \texttt{test/mpi/perf}. An example of a performance artifact is 757markedly different performance for the same operation when performed in two 758different ways. For example, using an MPI datatype for a non-contiguous 759transfer should not be much slower than packing the data into a contiguous 760buffer, sending it as a contiguous buffer, and then unpacking it into the 761destination buffer. An example of this from the MPI-1 standard illustrates 762the use of MPI datatypes to transpose a matrix ``on the fly,'' and one test in 763\texttt{test/mpi/perf} checks that the MPI implementation performs well in 764this case. 765 766\section{All Configure Options} 767\label{configure-options} 768 769To get the latest list of all the configure options recognized by the 770top-level configure, use: 771\begin{verbatim} 772 configure --help 773\end{verbatim} 774Not all of these options may be fully supported yet. 775 776% Fixme: Explain some of them, at least the ones that we ask the 777% users to try. 778 779\paragraph{Notes on the configure options.} 780The \texttt{--with-htmldir} and \texttt{--with-docdir} options specify the 781directories into which the documentation will be installed by \texttt{make 782 install}. 783 784\appendix 785 786\end{document} 787 788% 789% Comments on subclassing the document 790% We can use \ifdevname ... \fi and \ifpmname ... \fi, as in 791% \ifdevchiii .. \fi and \ifpmmpd ... \fi 792% (these will still need to be defined) 793% There should also be a way to select ``all'' in such a way that the 794% document can still flow well, such as 795% \ifdevall ... \else \ifdevchiii \else \ifdevmm \fi \fi \fi 796