| 1 | MPICH2 Release %VERSION% |
|---|
| 2 | |
|---|
| 3 | MPICH2 is a high-performance and widely portable implementation of the |
|---|
| 4 | MPI-2.1 standard from the Argonne National Laboratory. This release |
|---|
| 5 | has all MPI 2.1 functions and features required by the standard with |
|---|
| 6 | the exception of support for the "external32" portable I/O format and |
|---|
| 7 | user-defined data representations for I/O. |
|---|
| 8 | |
|---|
| 9 | The distribution has been tested by us on a variety of machines in our |
|---|
| 10 | own environments. If you have problems, please report them to |
|---|
| 11 | mpich2-maint@mcs.anl.gov. |
|---|
| 12 | |
|---|
| 13 | This README file should contain enough information to get you started |
|---|
| 14 | with MPICH2. More extensive installation and user guides can be found |
|---|
| 15 | in the doc/installguide/install.pdf and doc/userguide/user.pdf files |
|---|
| 16 | respectively. Additional information regarding the contents of the |
|---|
| 17 | release can be found in the CHANGES file in the top-level directory, |
|---|
| 18 | and in the RELEASE_NOTES file, where certain restrictions are |
|---|
| 19 | detailed. Finally, the MPICH2 web site, |
|---|
| 20 | http://www.mcs.anl.gov/research/projects/mpich2, contains information |
|---|
| 21 | on bug fixes and new releases. |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | I. Getting Started |
|---|
| 25 | II. Alternate Configure Options |
|---|
| 26 | III. Compiler Flags |
|---|
| 27 | IV. Alternate Channels and Devices |
|---|
| 28 | V. Alternate Process Managers |
|---|
| 29 | VI. VPATH Builds |
|---|
| 30 | VII. Shared Libraries |
|---|
| 31 | VIII. Other Features |
|---|
| 32 | IX. Developer Builds |
|---|
| 33 | X. Building ROMIO into MPICH2 |
|---|
| 34 | XI. Testing the MPICH2 installation |
|---|
| 35 | XII. Installing MPICH2 on windows |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | ------------------------------------------------------------------------- |
|---|
| 39 | |
|---|
| 40 | I. Getting Started |
|---|
| 41 | ================== |
|---|
| 42 | |
|---|
| 43 | The following instructions take you through a sequence of steps to get |
|---|
| 44 | the default configuration (ch3 device, nemesis channel (with TCP and |
|---|
| 45 | shared memory), MPD process management) of MPICH2 up and running. |
|---|
| 46 | |
|---|
| 47 | 1. You will need the following prerequisites. |
|---|
| 48 | |
|---|
| 49 | - This tar file mpich2-%VERSION%.tar.gz |
|---|
| 50 | |
|---|
| 51 | - A C compiler (gcc is sufficient) |
|---|
| 52 | |
|---|
| 53 | - A Fortran compiler if Fortran applications are to be used |
|---|
| 54 | (g77 or gfortran is sufficient) |
|---|
| 55 | |
|---|
| 56 | - A C++ compiler for the C++ MPI bindings (g++ is sufficient) |
|---|
| 57 | |
|---|
| 58 | - Python 2.2 or later (for the default MPD process manager) |
|---|
| 59 | |
|---|
| 60 | - If a Fortran 90 compiler is found, by default MPICH2 will |
|---|
| 61 | attempt to build a basic MPI module. This module contains the |
|---|
| 62 | MPI routines that do not contain "choice" arguments; i.e., the module |
|---|
| 63 | does not contain any of the communication routines, such as |
|---|
| 64 | MPI_Send, that can take arguments of different type. You may still |
|---|
| 65 | use those routines, however, the MPI module does not contain |
|---|
| 66 | interface specifications for them. If you have trouble with the |
|---|
| 67 | configuration step and do not need Fortran 90, configure with |
|---|
| 68 | --disable-f90 . |
|---|
| 69 | |
|---|
| 70 | Configure will check for these prerequisites and try to work around |
|---|
| 71 | deficiencies if possible. (If you don't have Fortran, you will |
|---|
| 72 | still be able to use MPICH2, just not with Fortran applications.) |
|---|
| 73 | |
|---|
| 74 | Also, you need to know what shell you are using since different shell |
|---|
| 75 | has different command syntax. Command "echo $SHELL" prints out the |
|---|
| 76 | current shell used by your terminal program. |
|---|
| 77 | |
|---|
| 78 | 2. Unpack the tar file and go to the top level directory: |
|---|
| 79 | |
|---|
| 80 | tar xzf mpich2-%VERSION%.tar.gz |
|---|
| 81 | cd mpich2-%VERSION% |
|---|
| 82 | |
|---|
| 83 | If your tar doesn't accept the z option, use |
|---|
| 84 | |
|---|
| 85 | gunzip mpich2-%VERSION%.tar.gz |
|---|
| 86 | tar xf mpich2-%VERSION%.tar |
|---|
| 87 | cd mpich2-%VERSION% |
|---|
| 88 | |
|---|
| 89 | 3. Choose an installation directory (the default is /usr/local/bin), |
|---|
| 90 | /home/you/mpich2-install which is assumed to non-existent or empty. |
|---|
| 91 | It will be most convenient if this directory is shared by all of the |
|---|
| 92 | machines where you intend to run processes. If not, you will have |
|---|
| 93 | to duplicate it on the other machines after installation. |
|---|
| 94 | |
|---|
| 95 | 4. Configure MPICH2 (The steps described here are called inpath-build, |
|---|
| 96 | we recommend user to do vpath build if possible), specifying the |
|---|
| 97 | installation directory: |
|---|
| 98 | |
|---|
| 99 | for csh and tcsh: |
|---|
| 100 | |
|---|
| 101 | ./configure --prefix=/home/you/mpich2-install |& tee c.txt |
|---|
| 102 | |
|---|
| 103 | for bash and sh: |
|---|
| 104 | |
|---|
| 105 | ./configure --prefix=/home/you/mpich2-install 2>&1 | tee c.txt |
|---|
| 106 | |
|---|
| 107 | Bourne-like shells, sh and bash, accept "2>&1 |". Csh-like shell, |
|---|
| 108 | csh and tcsh, accept "|&". File c.txt is used to store all messages |
|---|
| 109 | generated configure command and is useful for diagnosis if something |
|---|
| 110 | goes wrong. Other configure options are described below. You might |
|---|
| 111 | also prefer to do a VPATH build (see below). Check the c.txt file |
|---|
| 112 | to make sure everything went will. Problems should be self-explanatory, |
|---|
| 113 | but if not, sent c.txt to mpich2-maint@mcs.anl.gov. |
|---|
| 114 | |
|---|
| 115 | 5. Build MPICH2: |
|---|
| 116 | |
|---|
| 117 | for csh and tcsh: |
|---|
| 118 | |
|---|
| 119 | make |& tee m.txt |
|---|
| 120 | |
|---|
| 121 | for bash and sh: |
|---|
| 122 | |
|---|
| 123 | make 2>&1 | tee m.txt |
|---|
| 124 | |
|---|
| 125 | This step should succeed if there were no problems with the |
|---|
| 126 | preceding step. Check file m.txt. If there were problems, |
|---|
| 127 | do a "make clean" and then run make again with VERBOSE=1 |
|---|
| 128 | make VERBOSE=1 |& tee m.txt (for csh and tcsh) |
|---|
| 129 | OR |
|---|
| 130 | make VERBOSE=1 2>&1 | tee m.txt (for bash and sh) |
|---|
| 131 | and than send m.txt and c.txt to mpich2-maint@mcs.anl.gov. |
|---|
| 132 | |
|---|
| 133 | 6. Install the MPICH2 commands: |
|---|
| 134 | |
|---|
| 135 | for csh and tcsh: |
|---|
| 136 | |
|---|
| 137 | make install |& tee mi.txt |
|---|
| 138 | |
|---|
| 139 | for bash and sh: |
|---|
| 140 | |
|---|
| 141 | make install 2>&1 | tee mi.txt |
|---|
| 142 | |
|---|
| 143 | This step collects all required executables and scripts in the bin |
|---|
| 144 | subdirectory of the directory specified by the prefix argument to |
|---|
| 145 | configure. |
|---|
| 146 | |
|---|
| 147 | (For users who want an install directory structure compliant to |
|---|
| 148 | GNU coding standards (i.e., documentation files go to |
|---|
| 149 | ${datarootdir}/doc/${PACKAGE}, architecture-independent |
|---|
| 150 | read-only files go to ${datadir}/${PACKAGE}), replace |
|---|
| 151 | "make install" by |
|---|
| 152 | |
|---|
| 153 | make install PACKAGE=mpich2-<versrion> |
|---|
| 154 | |
|---|
| 155 | and corresponding installcheck step should be |
|---|
| 156 | |
|---|
| 157 | make installcheck PACKAGE=mpich2-<version> |
|---|
| 158 | |
|---|
| 159 | Setting PACKAGE in "make install" or "installcheck" step is optional |
|---|
| 160 | and unnecessary for typical MPI users.) |
|---|
| 161 | |
|---|
| 162 | 7. Add the bin subdirectory of the installation directory to your path: |
|---|
| 163 | |
|---|
| 164 | for csh and tcsh: |
|---|
| 165 | |
|---|
| 166 | setenv PATH /home/you/mpich2-install/bin:$PATH |
|---|
| 167 | |
|---|
| 168 | for bash and sh: |
|---|
| 169 | |
|---|
| 170 | PATH=/home/you/mpich2-install/bin:$PATH ; export PATH |
|---|
| 171 | |
|---|
| 172 | Check that everything is in order at this point by doing |
|---|
| 173 | |
|---|
| 174 | which mpd |
|---|
| 175 | which mpiexec |
|---|
| 176 | which mpirun |
|---|
| 177 | |
|---|
| 178 | All should refer to the commands in the bin subdirectory of your |
|---|
| 179 | install directory. It is at this point that you will need to |
|---|
| 180 | duplicate this directory on your other machines if it is not |
|---|
| 181 | in a shared file system such as NFS. |
|---|
| 182 | |
|---|
| 183 | 8. MPICH2 uses an external process manager for scalable startup of |
|---|
| 184 | large MPI jobs. The default process manager is called MPD, which |
|---|
| 185 | is a ring of daemons on the machines where you will run your MPI |
|---|
| 186 | programs. In the next few steps, you will get his ring up and |
|---|
| 187 | tested. More details on interacting with MPD can be found in the |
|---|
| 188 | README file in mpich2-%VERSION%/src/pm/mpd, such as how to list |
|---|
| 189 | running jobs, kill, suspend, or otherwise signal them, and how to |
|---|
| 190 | debug programs with "mpiexec -gdb". |
|---|
| 191 | |
|---|
| 192 | If you have problems getting the MPD ring established, see the |
|---|
| 193 | Installation Guide for instructions on how to diagnose problems |
|---|
| 194 | with your system configuration that may be preventing it. Also |
|---|
| 195 | see that guide if you plan to run MPD as root on behalf of users. |
|---|
| 196 | Please be aware that we do not recommend running MPD as root until |
|---|
| 197 | you have done testing to make sure that all is well. |
|---|
| 198 | |
|---|
| 199 | Begin by placing in your home directory a file named .mpd.conf |
|---|
| 200 | (/etc/mpd.conf if root), containing the line |
|---|
| 201 | |
|---|
| 202 | secretword=<secretword> |
|---|
| 203 | |
|---|
| 204 | where <secretword> is a string known only to yourself. It should |
|---|
| 205 | NOT be your normal Unix password. Make this file readable and |
|---|
| 206 | writable only by you: |
|---|
| 207 | |
|---|
| 208 | chmod 600 .mpd.conf |
|---|
| 209 | |
|---|
| 210 | 9. The first sanity check consists of bringing up a ring of one mpd on |
|---|
| 211 | the local machine, testing one mpd command, and bringing the "ring" |
|---|
| 212 | down. |
|---|
| 213 | |
|---|
| 214 | mpd & |
|---|
| 215 | mpdtrace |
|---|
| 216 | mpdallexit |
|---|
| 217 | |
|---|
| 218 | The output of mpdtrace should be the hostname of the machine you are |
|---|
| 219 | running on. The mpdallexit causes the mpd daemon to exit. |
|---|
| 220 | If you have problems getting the mpd ring established, see the |
|---|
| 221 | Installation Guide for instructions on how to diagnose problems |
|---|
| 222 | with your system configuration that may be preventing it. |
|---|
| 223 | |
|---|
| 224 | 10. Now we will bring up a ring of mpd's on a set of machines. Create a |
|---|
| 225 | file consisting of a list of machine names, one per line. Name this |
|---|
| 226 | file mpd.hosts. These hostnames will be used as targets for ssh or |
|---|
| 227 | rsh, so include full domain names if necessary. Check that you can |
|---|
| 228 | reach these machines with ssh or rsh without entering a password. |
|---|
| 229 | You can test by doing |
|---|
| 230 | |
|---|
| 231 | ssh othermachine date |
|---|
| 232 | |
|---|
| 233 | or |
|---|
| 234 | |
|---|
| 235 | rsh othermachine date |
|---|
| 236 | |
|---|
| 237 | If you cannot get this to work without entering a password, you will |
|---|
| 238 | need to configure ssh or rsh so that this can be done, or else use |
|---|
| 239 | the workaround for mpdboot in the next step. |
|---|
| 240 | |
|---|
| 241 | 11. Start the daemons on (some of) the hosts in the file mpd.hosts |
|---|
| 242 | |
|---|
| 243 | mpdboot -n <number to start> |
|---|
| 244 | |
|---|
| 245 | The number to start can be less than 1 + number of hosts in the |
|---|
| 246 | file, but cannot be greater than 1 + the number of hosts in the |
|---|
| 247 | file. One mpd is always started on the machine where mpdboot is |
|---|
| 248 | run, and is counted in the number to start, whether or not it occurs |
|---|
| 249 | in the file. |
|---|
| 250 | |
|---|
| 251 | There is a workaround if you cannot get mpdboot to work because of |
|---|
| 252 | difficulties with ssh or rsh setup. You can start the daemons "by |
|---|
| 253 | hand" as follows: |
|---|
| 254 | |
|---|
| 255 | mpd & # starts the local daemon |
|---|
| 256 | mpdtrace -l # makes the local daemon print its host |
|---|
| 257 | # and port in the form <host>_<port> |
|---|
| 258 | |
|---|
| 259 | Then log into each of the other machines, put the install/bin |
|---|
| 260 | directory in your path, and do: |
|---|
| 261 | |
|---|
| 262 | mpd -h <hostname> -p <port> & |
|---|
| 263 | |
|---|
| 264 | where the hostname and port belong to the original mpd that you |
|---|
| 265 | started. From each machine, after starting the mpd, you can do |
|---|
| 266 | |
|---|
| 267 | mpdtrace |
|---|
| 268 | |
|---|
| 269 | to see which machines are in the ring so far. More details on |
|---|
| 270 | mpdboot and other options for starting the mpd's are in |
|---|
| 271 | mpich2-%VERSION%/src/pm/mpd/README. |
|---|
| 272 | |
|---|
| 273 | !! *************************** |
|---|
| 274 | If you are still having problems getting the mpd ring established, |
|---|
| 275 | you can use the mpdcheck utility as described in the Installation Guide |
|---|
| 276 | to diagnose problems with your system configuration. |
|---|
| 277 | !! *************************** |
|---|
| 278 | |
|---|
| 279 | 12. Test the ring you have just created: |
|---|
| 280 | |
|---|
| 281 | mpdtrace |
|---|
| 282 | |
|---|
| 283 | The output should consist of the hosts where MPD daemons are now |
|---|
| 284 | running. You can see how long it takes a message to circle this |
|---|
| 285 | ring with |
|---|
| 286 | |
|---|
| 287 | mpdringtest |
|---|
| 288 | |
|---|
| 289 | That was quick. You can see how long it takes a message to go |
|---|
| 290 | around many times by giving mpdringtest an argument: |
|---|
| 291 | |
|---|
| 292 | mpdringtest 100 |
|---|
| 293 | mpdringtest 1000 |
|---|
| 294 | |
|---|
| 295 | 13. Test that the ring can run a multiprocess job: |
|---|
| 296 | |
|---|
| 297 | mpiexec -n <number> hostname |
|---|
| 298 | |
|---|
| 299 | The number of processes need not match the number of hosts in the |
|---|
| 300 | ring; if there are more, they will wrap around. You can see the |
|---|
| 301 | effect of this by getting rank labels on the stdout: |
|---|
| 302 | |
|---|
| 303 | mpiexec -l -n 30 hostname |
|---|
| 304 | |
|---|
| 305 | You probably didn't have to give the full pathname of the hostname |
|---|
| 306 | command because it is in your path. If not, use the full pathname: |
|---|
| 307 | |
|---|
| 308 | mpiexec -l -n 30 /bin/hostname |
|---|
| 309 | |
|---|
| 310 | 14. Now we will run an MPI job, using the mpiexec command as specified |
|---|
| 311 | in the MPI-2 standard. There are some examples in the install |
|---|
| 312 | directory, which you have already put in your path, as well as in |
|---|
| 313 | the directory mpich2-%VERSION%/examples. One of them is the classic |
|---|
| 314 | cpi example, which computes the value of pi by numerical |
|---|
| 315 | integration in parallel. |
|---|
| 316 | |
|---|
| 317 | mpiexec -n 5 cpi |
|---|
| 318 | |
|---|
| 319 | The number of processes need not match the number of hosts. |
|---|
| 320 | The cpi example will tell you which hosts it is running on. |
|---|
| 321 | By default, the processes are launched one after the other on the hosts |
|---|
| 322 | in the mpd ring, so it is not necessary to specify hosts when running a |
|---|
| 323 | job with mpiexec. |
|---|
| 324 | |
|---|
| 325 | There are many options for mpiexec, by which multiple executables |
|---|
| 326 | can be run, hosts can be specified (as long as they are in the mpd |
|---|
| 327 | ring), separate command-line arguments and environment variables can |
|---|
| 328 | be passed to different processes, and working directories and search |
|---|
| 329 | paths for executables can be specified. Do |
|---|
| 330 | |
|---|
| 331 | mpiexec --help |
|---|
| 332 | |
|---|
| 333 | for details. A typical example is: |
|---|
| 334 | |
|---|
| 335 | mpiexec -n 1 master : -n 19 slave |
|---|
| 336 | |
|---|
| 337 | or |
|---|
| 338 | |
|---|
| 339 | mpiexec -n 1 -host mymachine : -n 19 slave |
|---|
| 340 | |
|---|
| 341 | to ensure that the process with rank 0 runs on your workstation. |
|---|
| 342 | |
|---|
| 343 | The arguments between ':'s in this syntax are called "argument |
|---|
| 344 | sets", since they apply to a set of processes. Some arguments, |
|---|
| 345 | called "global", apply across all argument sets and must appear |
|---|
| 346 | first. For example, to get rank labels on standard output, use |
|---|
| 347 | |
|---|
| 348 | mpiexec -l -n 3 cpi |
|---|
| 349 | |
|---|
| 350 | See the User's Guide for much more detail on arguments to mpiexec. |
|---|
| 351 | |
|---|
| 352 | The mpirun command from the original MPICH is still available, |
|---|
| 353 | although it does not support as many options as mpiexec. |
|---|
| 354 | |
|---|
| 355 | If you have completed all of the above steps, you have successfully |
|---|
| 356 | installed MPICH2 and run an MPI example. |
|---|
| 357 | |
|---|
| 358 | More details on arguments to mpiexec are given in the User's Guide in |
|---|
| 359 | the doc subdirectory. Also in the User's Guide you will find help on |
|---|
| 360 | debugging. MPICH2 has some some support for the TotalView debugger, as |
|---|
| 361 | well as some other approaches described there. |
|---|
| 362 | |
|---|
| 363 | ------------------------------------------------------------------------- |
|---|
| 364 | |
|---|
| 365 | II. Alternate Configure Options |
|---|
| 366 | =============================== |
|---|
| 367 | |
|---|
| 368 | The above steps utilized the MPICH2 defaults, which included choosing |
|---|
| 369 | TCP and shared memory for communication (via the "nemesis" channel) |
|---|
| 370 | and the MPD process manager. Other alternatives are available. You |
|---|
| 371 | can find out about configuration alternatives with |
|---|
| 372 | |
|---|
| 373 | ./configure --help |
|---|
| 374 | |
|---|
| 375 | in the mpich2 directory. The alternatives described below are |
|---|
| 376 | configured by adding arguments to the configure step. |
|---|
| 377 | |
|---|
| 378 | ------------------------------------------------------------------------- |
|---|
| 379 | |
|---|
| 380 | III. Compiler Flags |
|---|
| 381 | =================== |
|---|
| 382 | |
|---|
| 383 | MPICH2 allows several sets of compiler flags to be used. The first |
|---|
| 384 | three sets are configure-time options for MPICH2, while the fourth is |
|---|
| 385 | only relevant when compiling applications with mpicc and friends. |
|---|
| 386 | |
|---|
| 387 | 1. CFLAGS, CXXFLAGS, FFLAGS, F90FLAGS and LDFLAGS (abbreviated as |
|---|
| 388 | xFLAGS): Setting these flags would result in the MPICH2 library being |
|---|
| 389 | compiled/linked with these flags and the flags internally being used |
|---|
| 390 | in mpicc and friends. |
|---|
| 391 | |
|---|
| 392 | 2. MPICH2LIB_CFLAGS, MPICH2LIB_CXXFLAGS, MPICH2LIB_FFLAGS, |
|---|
| 393 | MPICH2LIB_F90FLAGS and MPICH2LIB_LDFLAGS (abbreviated as |
|---|
| 394 | MPICH2LIB_xFLAGS): Setting these flags would result in the MPICH2 |
|---|
| 395 | library being compiled/linked with these flags. However, these flags |
|---|
| 396 | will *not* be used by mpicc and friends. |
|---|
| 397 | |
|---|
| 398 | 3. MPICH2_MAKE_CFLAGS: Setting these flags would result in MPICH2's |
|---|
| 399 | configure tests to not use these flags, but the makefile's to use |
|---|
| 400 | them. This is a temporary hack for certain cases that advanced |
|---|
| 401 | developers might be interested in which break existing configure tests |
|---|
| 402 | (e.g., -Werror) and are not recommended for regular users. |
|---|
| 403 | |
|---|
| 404 | 4. MPICH2_MPICC_FLAGS, MPICH2_MPICXX_FLAGS, MPICH2_MPIF77_FLAGS, |
|---|
| 405 | MPICH2_MPIF90_FLAGS and MPICH2_LDFLAGS (abbreviated as |
|---|
| 406 | MPICH2_MPIX_FLAGS): These flags do *not* affect the compilation of the |
|---|
| 407 | MPICH2 library itself, but will be internally used by mpicc and |
|---|
| 408 | friends. |
|---|
| 409 | |
|---|
| 410 | |
|---|
| 411 | +--------------------------------------------------------------------+ |
|---|
| 412 | | | | | |
|---|
| 413 | | | MPICH2 library | mpicc and friends | |
|---|
| 414 | | | | | |
|---|
| 415 | +--------------------+----------------------+------------------------+ |
|---|
| 416 | | | | | |
|---|
| 417 | | xFLAGS | Yes | Yes | |
|---|
| 418 | | | | | |
|---|
| 419 | +--------------------+----------------------+------------------------+ |
|---|
| 420 | | | | | |
|---|
| 421 | | MPICH2LIB_xFLAGS | Yes | No | |
|---|
| 422 | | | | | |
|---|
| 423 | +--------------------+----------------------+------------------------+ |
|---|
| 424 | | | | | |
|---|
| 425 | | MPICH2_MAKE_xFLAGS | Yes | No | |
|---|
| 426 | | | | | |
|---|
| 427 | +--------------------+----------------------+------------------------+ |
|---|
| 428 | | | | | |
|---|
| 429 | | MPICH2_MPIX_FLAGS | No | Yes | |
|---|
| 430 | | | | | |
|---|
| 431 | +--------------------+----------------------+------------------------+ |
|---|
| 432 | |
|---|
| 433 | |
|---|
| 434 | All these flags can be set as part of configure command or through |
|---|
| 435 | environment variables. (CPPFLAGS stands for C preprocessor flags, |
|---|
| 436 | which should NOT be set) |
|---|
| 437 | |
|---|
| 438 | |
|---|
| 439 | Default flags |
|---|
| 440 | -------------- |
|---|
| 441 | By default, MPICH2 automatically adds certain compiler optimizations |
|---|
| 442 | to MPICH2LIB_CFLAGS. The currently used optimization level is -O2. |
|---|
| 443 | |
|---|
| 444 | ** IMPORTANT NOTE: Remember that this only affects the compilation of |
|---|
| 445 | the MPICH2 library and is not used in the wrappers (mpicc and friends) |
|---|
| 446 | that are used to compile your applications or other libraries. |
|---|
| 447 | |
|---|
| 448 | This optimization level can be changed with the --enable-fast option |
|---|
| 449 | passed to configure. For example, to build an MPICH2 environment with |
|---|
| 450 | -O3 for all language bindings, one can simply do: |
|---|
| 451 | |
|---|
| 452 | ./configure --enable-fast=O3 |
|---|
| 453 | |
|---|
| 454 | Or to disable all compiler optimizations, one can do: |
|---|
| 455 | |
|---|
| 456 | ./configure --disable-fast |
|---|
| 457 | |
|---|
| 458 | For more details of --enable-fast, see the output of "configure |
|---|
| 459 | --help". |
|---|
| 460 | |
|---|
| 461 | |
|---|
| 462 | Examples |
|---|
| 463 | -------- |
|---|
| 464 | |
|---|
| 465 | Example 1: |
|---|
| 466 | |
|---|
| 467 | ./configure --disable-fast MPICH2LIB_CFLAGS=-O3 MPICH2LIB_FFLAGS=-O3 MPICH2LIB_CXXFLAGS=-O3 MPICH2LIB_F90FLAGS=-O3 |
|---|
| 468 | |
|---|
| 469 | This will cause the MPICH2 libraries to be built with -O3, and -O3 |
|---|
| 470 | will *not* be included in the mpicc and other MPI wrapper script. |
|---|
| 471 | |
|---|
| 472 | Example 2: |
|---|
| 473 | |
|---|
| 474 | ./configure --disable-fast CFLAGS=-O3 FFLAGS=-O3 CXXFLAGS=-O3 F90FLAGS=-O3 |
|---|
| 475 | |
|---|
| 476 | This will cause the MPICH2 libraries to be built with -O3, and -O3 |
|---|
| 477 | will be included in the mpicc and other MPI wrapper script. |
|---|
| 478 | |
|---|
| 479 | Example 3: |
|---|
| 480 | |
|---|
| 481 | There are certain compiler flags that should not be used with MPICH2's |
|---|
| 482 | configure, e.g. gcc's -Werror, which would confuse configure and cause |
|---|
| 483 | certain configure tests to fail to detect the correct system features. |
|---|
| 484 | To use -Werror in building MPICH2 libraries, you can pass the compiler |
|---|
| 485 | flags during the make step through the Makefile variable |
|---|
| 486 | MPICH2_MAKE_CFLAGS as follows: |
|---|
| 487 | |
|---|
| 488 | make MPICH2_MAKE_CFLAGS="-Wall -Werror" |
|---|
| 489 | |
|---|
| 490 | The content of MPICH2_MAKE_CFLAGS is appended to the CFLAGS in all |
|---|
| 491 | relevant Makefiles. |
|---|
| 492 | |
|---|
| 493 | ------------------------------------------------------------------------- |
|---|
| 494 | |
|---|
| 495 | IV. Alternate Channels and Devices |
|---|
| 496 | ================================== |
|---|
| 497 | |
|---|
| 498 | The communication mechanisms in MPICH2 are called "devices". MPICH2 |
|---|
| 499 | supports several internal devices including ch3 (default), dcmfd (for |
|---|
| 500 | Blue Gene/P) and globus (for Globus), as well as many third-party |
|---|
| 501 | devices that are released and maintained by other institutes such as |
|---|
| 502 | osu_ch3 (from Ohio State University for InfiniBand and iWARP), ch_mx |
|---|
| 503 | (from Myricom for Myrinet MX), etc. |
|---|
| 504 | |
|---|
| 505 | ************************************* |
|---|
| 506 | |
|---|
| 507 | ch3 device |
|---|
| 508 | ********** |
|---|
| 509 | The ch3 device contains different internal communication options |
|---|
| 510 | called "channels". We currently support nemesis (default), sock, ssm, |
|---|
| 511 | and shm channels, and experimentally provide a dllchan channel within |
|---|
| 512 | the ch3 device. |
|---|
| 513 | |
|---|
| 514 | nemesis channel |
|---|
| 515 | --------------- |
|---|
| 516 | Nemesis provides communication using different networks (tcp, mx) as |
|---|
| 517 | well as various shared-memory optimizations. To configure MPICH2 with |
|---|
| 518 | nemesis, you can use the following configure option: |
|---|
| 519 | |
|---|
| 520 | --with-device=ch3:nemesis |
|---|
| 521 | |
|---|
| 522 | The TCP network module gets configured in by default. To specify a |
|---|
| 523 | different network module such as MX, you can use: |
|---|
| 524 | |
|---|
| 525 | --with-device=ch3:nemesis:mx |
|---|
| 526 | |
|---|
| 527 | If the MX include files and libraries are not in the normal search |
|---|
| 528 | paths, you can specify them with the following options: |
|---|
| 529 | |
|---|
| 530 | --with-mx-include= and --with-mx-lib= |
|---|
| 531 | |
|---|
| 532 | ... or the if lib/ and include/ are in the same directory, you can use |
|---|
| 533 | the following option: |
|---|
| 534 | |
|---|
| 535 | --with-mx= |
|---|
| 536 | |
|---|
| 537 | If the MX libraries are shared libraries, they need to be in the |
|---|
| 538 | shared library search path. This can be done by adding the path to |
|---|
| 539 | /etc/ld.so.conf, or by setting the LD_LIBRARY_PATH variable in your |
|---|
| 540 | .bashrc (or .tcshrc) file. It's also possible to set the shared |
|---|
| 541 | library search path in the binary. If you're using gcc, you can do this by adding |
|---|
| 542 | |
|---|
| 543 | LD_LIBRARY_PATH=/path/to/lib |
|---|
| 544 | |
|---|
| 545 | (and) |
|---|
| 546 | |
|---|
| 547 | LDFLAGS="-Wl,-rpath -Wl,/path/to/lib" |
|---|
| 548 | |
|---|
| 549 | ... as arguments to configure. |
|---|
| 550 | |
|---|
| 551 | |
|---|
| 552 | Shared-memory optimizations are enabled by default to improve |
|---|
| 553 | performance for multi-processor/multi-core platforms. They can be |
|---|
| 554 | disabled (at the cost of performance) either by setting the |
|---|
| 555 | environment variable MPICH_NO_LOCAL to 1, or using the following |
|---|
| 556 | configure option: |
|---|
| 557 | |
|---|
| 558 | --enable-nemesis-dbg-nolocal |
|---|
| 559 | |
|---|
| 560 | The --with-shared-memory= configure option allows you to choose how |
|---|
| 561 | Nemesis allocates shared memory. The options are "auto", "sysv", and |
|---|
| 562 | "mmap". Using "sysv" will allocate shared memory using the System V |
|---|
| 563 | shmget(), shmat(), etc. functions. Using "mmap" will allocate shared |
|---|
| 564 | memory by creating a file (in /dev/shm if it exists, otherwise /tmp), |
|---|
| 565 | then mmap() the file. The default is "auto". Note that System V |
|---|
| 566 | shared memory has limits on the size of shared memory segments so |
|---|
| 567 | using this for Nemesis may limit the number of processes that can be |
|---|
| 568 | started on a single node. |
|---|
| 569 | |
|---|
| 570 | |
|---|
| 571 | sock channel |
|---|
| 572 | ------------ |
|---|
| 573 | sock is the traditional TCP sockets based communication channel. It |
|---|
| 574 | uses TCP/IP sockets for all communication including intra-node |
|---|
| 575 | communication. So, though the performance of this channel is worse |
|---|
| 576 | than that of nemesis, it should work on almost every platform. This |
|---|
| 577 | channel can be configured using the following option: |
|---|
| 578 | |
|---|
| 579 | --with-device=ch3:sock |
|---|
| 580 | |
|---|
| 581 | ssm and shm channels |
|---|
| 582 | -------------------- |
|---|
| 583 | shm (shared memory) channel is for use on platforms that only use |
|---|
| 584 | shared-memory communication. ssm (sockets and shared memory) is for |
|---|
| 585 | use on clusters of shared-memory machines. They can be configured |
|---|
| 586 | using: |
|---|
| 587 | |
|---|
| 588 | --with-device=ch3:ssm |
|---|
| 589 | |
|---|
| 590 | (or) |
|---|
| 591 | |
|---|
| 592 | --with-device=ch3:shm |
|---|
| 593 | |
|---|
| 594 | These two channels are being deprecated and will be removed starting |
|---|
| 595 | the 1.2 release series of MPICH2. The nemesis channel provides all the |
|---|
| 596 | functionality supported by these channels and more. |
|---|
| 597 | |
|---|
| 598 | dllchan |
|---|
| 599 | ------- |
|---|
| 600 | |
|---|
| 601 | dllchan is a new *experimental* channel for supporting dynamic loading |
|---|
| 602 | of other channels. To use this channel, configure with: |
|---|
| 603 | |
|---|
| 604 | --with-device=ch3:dllchan:sock,shm,ssm |
|---|
| 605 | |
|---|
| 606 | This provides the sock, shm, and ssm channels as options, with sock |
|---|
| 607 | being the default. In addition, you must specify the shared library |
|---|
| 608 | type; under Linux and when using gcc (or compilers that mimic gcc for |
|---|
| 609 | shared-library construction) add: |
|---|
| 610 | |
|---|
| 611 | --enable-sharedlibs=gcc |
|---|
| 612 | |
|---|
| 613 | On Mac OSX, use: |
|---|
| 614 | |
|---|
| 615 | --enable-sharedlibs=gcc-osx |
|---|
| 616 | |
|---|
| 617 | On Solaris, use: |
|---|
| 618 | |
|---|
| 619 | --enable-sharedlibs=solaris-cc |
|---|
| 620 | |
|---|
| 621 | To select a channel other than the default channel, set the |
|---|
| 622 | environment variable MPICH_CH3CHANNEL to the channel name (i.e., sock, |
|---|
| 623 | shm, or ssm). |
|---|
| 624 | |
|---|
| 625 | There are known problems with this channel, particularly during the |
|---|
| 626 | make step. You may find that some symbols are not found when loading |
|---|
| 627 | the libraries. If you want to try this experimental channel, please |
|---|
| 628 | let us know what does and does not work. |
|---|
| 629 | |
|---|
| 630 | sctp channel |
|---|
| 631 | ------------ |
|---|
| 632 | The SCTP channel is a new channel using the Stream Control |
|---|
| 633 | Transmission Protocol (SCTP). This channel supports regular MPI-1 |
|---|
| 634 | operations as well as dynamic processes and RMA from MPI-2; it |
|---|
| 635 | currently does not offer support for multiple threads. |
|---|
| 636 | |
|---|
| 637 | Configure the sctp channel by using the following option: |
|---|
| 638 | |
|---|
| 639 | --with-device=ch3:sctp |
|---|
| 640 | |
|---|
| 641 | If the SCTP include files and libraries are not in the normal search |
|---|
| 642 | paths, you can specify them with the --with-sctp-include= and |
|---|
| 643 | --with-sctp-lib= options, or the --with-sctp= option if lib/ and |
|---|
| 644 | include/ are in the same directory. |
|---|
| 645 | |
|---|
| 646 | SCTP stack specific instructions: |
|---|
| 647 | |
|---|
| 648 | For FreeBSD 7 and onward, SCTP comes with CURRENT and is enabled with |
|---|
| 649 | the "option SCTP" in the kernel configuration file. The sctp_xxx() |
|---|
| 650 | calls are contained within libc so to compile ch3:sctp, make a soft-link |
|---|
| 651 | named libsctp.a to the target libc.a, then pass the path of the |
|---|
| 652 | libsctp.a soft-link to --with-sctp-lib. |
|---|
| 653 | |
|---|
| 654 | For FreeBSD 6.x, kernel patches and instructions can be downloaded at |
|---|
| 655 | http://www.sctp.org/download.html . These kernels place libsctp and |
|---|
| 656 | headers in /usr, so nothing needs to be specified for --with-sctp |
|---|
| 657 | since /usr is often in the default search path. |
|---|
| 658 | |
|---|
| 659 | For Mac OS X, the SCTP Network Kernel Extension (NKE) can be |
|---|
| 660 | downloaded at http://sctp.fh-muenster.de/sctp-nke.html . This places |
|---|
| 661 | the lib and include in /usr, so nothing needs to be specified for |
|---|
| 662 | --with-sctp since /usr is often in the default search path. |
|---|
| 663 | |
|---|
| 664 | For Linux, SCTP comes with the default kernel from 2.4.23 and later as |
|---|
| 665 | a module. This module can be loaded as root using "modprobe sctp". |
|---|
| 666 | After this is loaded, you can verify it is loaded using "lsmod". |
|---|
| 667 | Once loaded, the SCTP socket lib and include files must be downloaded |
|---|
| 668 | and installed from http://lksctp.sourceforge.net/ . The prefix |
|---|
| 669 | location must then be passed into --with-sctp. This bundle is called |
|---|
| 670 | lksctp-tools and is available for download off their website. |
|---|
| 671 | |
|---|
| 672 | For Solaris, SCTP comes with the default Solaris 10 kernel; the lib |
|---|
| 673 | and include in /usr, so nothing needs to be specified for --with-sctp |
|---|
| 674 | since /usr is often in the default search path. In order to compile |
|---|
| 675 | under Solaris, MPICH2LIB_CFLAGS must have |
|---|
| 676 | -DMPICH_SCTP_CONCATENATES_IOVS set when running MPICH2's configure |
|---|
| 677 | script. |
|---|
| 678 | |
|---|
| 679 | ************************************* |
|---|
| 680 | |
|---|
| 681 | IBM Blue Gene/P device |
|---|
| 682 | ********************** |
|---|
| 683 | MPICH2 also supports the IBM Blue Gene/P systems. Since BG/P's |
|---|
| 684 | front-end uses a different architecture than the actual compute nodes, |
|---|
| 685 | MPICH2 has to be cross-compiled for this platform. The configuration |
|---|
| 686 | of MPICH2 on BG/P relies on the availability of the DCMF driver stack |
|---|
| 687 | and cross compiler binaries on the system. These are packaged by IBM |
|---|
| 688 | in their driver releases (default installation path is |
|---|
| 689 | /bgsys/drivers/ppcfloor) and are not released with MPICH2. |
|---|
| 690 | |
|---|
| 691 | Assuming DRIVER_PATH points to the driver installation path (e.g., |
|---|
| 692 | /bgsys/drivers/ppcfloor), the following is an example configure |
|---|
| 693 | command-line for MPICH2: |
|---|
| 694 | |
|---|
| 695 | GCC=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gcc \ |
|---|
| 696 | CC=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gcc \ |
|---|
| 697 | CXX=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-g++ \ |
|---|
| 698 | F77=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gfortran \ |
|---|
| 699 | F90=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gfortran \ |
|---|
| 700 | CFLAGS="-mcpu=450fp2" \ |
|---|
| 701 | CXXFLAGS="-mcpu=450fp2" \ |
|---|
| 702 | FFLAGS="-mcpu=450fp2" \ |
|---|
| 703 | F90FLAGS="-mcpu=450fp2" \ |
|---|
| 704 | AR=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-ar \ |
|---|
| 705 | LD=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-ld \ |
|---|
| 706 | MSGLAYER_INCLUDE="-I${DRIVER_PATH}/comm/include" \ |
|---|
| 707 | MSGLAYER_LIB="-L${DRIVER_PATH}/comm/lib -ldcmfcoll.cnk -ldcmf.cnk -lpthread -lrt -L$DRIVER_PATH/runtime/SPI -lSPI.cna" \ |
|---|
| 708 | ./configure --with-device=dcmfd:BGP --with-pmi=no --with-pm=no --with-file-system=bgl \ |
|---|
| 709 | --enable-timer-type=device --with-cross=src/mpid/dcmfd/cross \ |
|---|
| 710 | --host=powerpc-bgp-linux --target=powerpc-bgp-linux --build=powerpc64-linux-gnu |
|---|
| 711 | |
|---|
| 712 | ------------------------------------------------------------------------- |
|---|
| 713 | |
|---|
| 714 | V. Alternate Process Managers |
|---|
| 715 | ============================= |
|---|
| 716 | |
|---|
| 717 | mpd |
|---|
| 718 | --- |
|---|
| 719 | MPD is the default process manager. Its setup and use have been |
|---|
| 720 | described above. The file mpich2-%VERSION%/src/pm/mpd/README has more |
|---|
| 721 | information about interactive commands for managing the ring of MPDs. |
|---|
| 722 | |
|---|
| 723 | hydra |
|---|
| 724 | ----- |
|---|
| 725 | Hydra is a new process management framework that uses existing daemons |
|---|
| 726 | on nodes (e.g., ssh, pbs, slurm, sge) to start MPI processes. The file |
|---|
| 727 | mpich2-%VERSION%/src/pm/hydra/README has mode information about Hydra. |
|---|
| 728 | |
|---|
| 729 | smpd |
|---|
| 730 | ---- |
|---|
| 731 | SMPD is a process management system for both Microsoft Windows and UNIX. |
|---|
| 732 | SMPD is capable of starting a job where some processes are running on |
|---|
| 733 | Windows and others are running on a variant of UNIX. For more |
|---|
| 734 | information, please see mpich2-%VERSION%/src/pm/smpd/README. |
|---|
| 735 | |
|---|
| 736 | gforker |
|---|
| 737 | ------- |
|---|
| 738 | gforker is a process manager that creates processes on a single machine, |
|---|
| 739 | by having mpiexec directly fork and exec them. This mechanism is |
|---|
| 740 | particularly appropriate for shared-memory multiprocessors (SMPs) where |
|---|
| 741 | you want to create all the processes on the same machine. gforker is |
|---|
| 742 | also useful for debugging, where running all the processes on a single |
|---|
| 743 | machine is often convenient. |
|---|
| 744 | |
|---|
| 745 | slurm |
|---|
| 746 | ----- |
|---|
| 747 | SLURM is an external process manager not distributed with |
|---|
| 748 | MPICH2. However, we provide configure options that allow integration |
|---|
| 749 | with SLURM. To enable this support, use "--with-pmi=slurm |
|---|
| 750 | --with-pm=no" option with configure. |
|---|
| 751 | |
|---|
| 752 | ------------------------------------------------------------------------- |
|---|
| 753 | |
|---|
| 754 | VI. VPATH Builds |
|---|
| 755 | ================ |
|---|
| 756 | MPICH2 supports building MPICH in a different directory tree than the |
|---|
| 757 | one where the MPICH2 source is installed. This often allows faster |
|---|
| 758 | building, as the sources can be placed in a shared filesystem and the |
|---|
| 759 | builds done in a local (and hence usually much faster) filesystem. To |
|---|
| 760 | make this clear, the following example assumes that the sources are |
|---|
| 761 | placed in /home/me/mpich2-<VERSION>, the build is done in |
|---|
| 762 | /tmp/me/mpich2, and the installed version goes into |
|---|
| 763 | /usr/local/mpich2-<VERSION>: |
|---|
| 764 | |
|---|
| 765 | shell$ cd /home/me |
|---|
| 766 | shell$ tar xzf mpich2-<VERSION>.tar.gz |
|---|
| 767 | shell$ cd /tmp/me |
|---|
| 768 | |
|---|
| 769 | shell$ mkdir mpich2 |
|---|
| 770 | shell$ cd mpich2 |
|---|
| 771 | shell$ /home/me/mpich2-<VERSION>/configure --prefix=/usr/local/mpich2-<VERSION> |
|---|
| 772 | shell$ make |
|---|
| 773 | shell$ make install |
|---|
| 774 | |
|---|
| 775 | ------------------------------------------------------------------------- |
|---|
| 776 | |
|---|
| 777 | VII. Shared Libraries |
|---|
| 778 | ===================== |
|---|
| 779 | Shared libraries are currently only supported for gcc on Linux and Mac |
|---|
| 780 | and for cc on Solaris. To have shared libraries created when MPICH2 is |
|---|
| 781 | built, specify the following when MPICH2 is configured: |
|---|
| 782 | |
|---|
| 783 | configure --enable-sharedlibs=gcc (on Linux) |
|---|
| 784 | configure --enable-sharedlibs=osx-gcc (on Mac OS X) |
|---|
| 785 | configure --enable-sharedlibs=solaris-cc (on Solaris) |
|---|
| 786 | |
|---|
| 787 | ------------------------------------------------------------------------- |
|---|
| 788 | |
|---|
| 789 | VIII. Other Features |
|---|
| 790 | ==================== |
|---|
| 791 | |
|---|
| 792 | MPICH2 has a number of other features. If you are exploring MPICH2 as |
|---|
| 793 | part of a development project the following configure options are |
|---|
| 794 | important: |
|---|
| 795 | |
|---|
| 796 | Performance Options: |
|---|
| 797 | |
|---|
| 798 | --enable-fast - Turns off error checking and collection of internal |
|---|
| 799 | timing information |
|---|
| 800 | |
|---|
| 801 | --enable-timing=no - Turns off just the collection of internal timing |
|---|
| 802 | information |
|---|
| 803 | |
|---|
| 804 | --enable-ndebug - Turns on NDEBUG, which disables asserts. This is a |
|---|
| 805 | subset of the optimizations provided by enable-fast, |
|---|
| 806 | but is useful in environments where the user wishes |
|---|
| 807 | to retain the debug symbols, e.g., this can be combined |
|---|
| 808 | with the --enable-g option. |
|---|
| 809 | |
|---|
| 810 | MPI Features: |
|---|
| 811 | |
|---|
| 812 | --enable-romio - Build the ROMIO implementation of MPI-IO. This is |
|---|
| 813 | the default |
|---|
| 814 | |
|---|
| 815 | --with-file-system - When used with --enable-romio, specifies |
|---|
| 816 | filesystems ROMIO should support. See README.romio. |
|---|
| 817 | |
|---|
| 818 | --enable-threads - Build MPICH2 with support for multi-threaded |
|---|
| 819 | applications. Only the sock and nemesis channels support |
|---|
| 820 | MPI_THREAD_MULTIPLE. |
|---|
| 821 | |
|---|
| 822 | --with-thread-package - When used with --enable-threads, this option |
|---|
| 823 | specifies the thread package to use. This option |
|---|
| 824 | defaults to "posix". At the moment, only POSIX |
|---|
| 825 | threads are supported on UNIX platforms. We plan to |
|---|
| 826 | support Solaris threads in the future. |
|---|
| 827 | |
|---|
| 828 | Language bindings: |
|---|
| 829 | |
|---|
| 830 | --enable-f77 - Build the Fortran 77 bindings. This is the default. |
|---|
| 831 | It has been tested with the Fortran parts of the Intel |
|---|
| 832 | test suite. |
|---|
| 833 | |
|---|
| 834 | --enable-f90 - Build the Fortran 90 bindings. This is not on by |
|---|
| 835 | default, since these have not yet been tested. |
|---|
| 836 | |
|---|
| 837 | --enable-cxx - Build the C++ bindings. This has been tested with the |
|---|
| 838 | Notre Dame C++ test suite and some additional tests. |
|---|
| 839 | |
|---|
| 840 | Cross compilation: |
|---|
| 841 | |
|---|
| 842 | --with-cross=filename - Provide values for the tests that required |
|---|
| 843 | running a program, such as the tests that configure |
|---|
| 844 | uses to determine the sizes of the basic types. This |
|---|
| 845 | should be a fine in Bourne shell format containing |
|---|
| 846 | variable assignment of the form |
|---|
| 847 | |
|---|
| 848 | CROSS_SIZEOF_INT=2 |
|---|
| 849 | |
|---|
| 850 | for all of the CROSS_xxx variables. A list will be |
|---|
| 851 | provided in later releases; for now, look at the |
|---|
| 852 | configure.in files. This has not been completely |
|---|
| 853 | tested. |
|---|
| 854 | |
|---|
| 855 | Error checking and reporting: |
|---|
| 856 | |
|---|
| 857 | --enable-error-checking=level - Control the amount of error checking. |
|---|
| 858 | Currently, only "no" and "all" is supported; all is the |
|---|
| 859 | default. |
|---|
| 860 | |
|---|
| 861 | --enable-error-messages=level - Control the aount of detail in error |
|---|
| 862 | messages. By default, MPICH2 provides |
|---|
| 863 | instance-specific error messages; but, with this |
|---|
| 864 | option, MPICH2 can be configured to provide less |
|---|
| 865 | detailed messages. This may be desirable on small |
|---|
| 866 | systems, such as clusters built from game consoles or |
|---|
| 867 | high-density massively parallel systems. This is still |
|---|
| 868 | under active development. |
|---|
| 869 | |
|---|
| 870 | Compilation options for development: |
|---|
| 871 | |
|---|
| 872 | --enable-g=value - Controls the amount of debugging information |
|---|
| 873 | collected by the code. The most useful choice here is |
|---|
| 874 | dbg, which compiles with -g. |
|---|
| 875 | |
|---|
| 876 | --enable-coverage - An experimental option that enables GNU coverage |
|---|
| 877 | analysis. |
|---|
| 878 | |
|---|
| 879 | --with-logging=name - Select a logging library for recording the |
|---|
| 880 | timings of the internal routines. We have used this to |
|---|
| 881 | understand the performance of the internals of MPICH2. |
|---|
| 882 | More information on the logging options, capabilities |
|---|
| 883 | and usage can be found in doc/logging/logging.pdf. |
|---|
| 884 | |
|---|
| 885 | --enable-timer-type=name - Select the timer to use for MPI_Wtime |
|---|
| 886 | and internal timestamps. name may be one of: |
|---|
| 887 | gethrtime - Solaris timer (Solaris systems |
|---|
| 888 | only) |
|---|
| 889 | clock_gettime - Posix timer (where available) |
|---|
| 890 | gettimeofday - Most Unix systems |
|---|
| 891 | linux86_cycle - Linux x86; returns cycle |
|---|
| 892 | counts, not time in seconds* |
|---|
| 893 | linuxalpha_cycle - Like linux86_cycle, but for |
|---|
| 894 | Linux Alpha* |
|---|
| 895 | gcc_ia64_cycle - IPF ar.itc timer* |
|---|
| 896 | device - The timer is provided by the device |
|---|
| 897 | *Note that the cycle timers are intended to be used by |
|---|
| 898 | MPICH2 developers for internal low-level timing. |
|---|
| 899 | Normal users should not use these as they are not |
|---|
| 900 | guaranteed to be accurate in certain situations. |
|---|
| 901 | |
|---|
| 902 | ------------------------------------------------------------------------- |
|---|
| 903 | |
|---|
| 904 | IX. Developer Builds |
|---|
| 905 | ==================== |
|---|
| 906 | For MPICH2 developers who want to directly work on the svn, there are |
|---|
| 907 | a few additional steps involved (people using the release tarballs do |
|---|
| 908 | not have to follow these steps). Details about these steps can be |
|---|
| 909 | found here: |
|---|
| 910 | http://wiki.mcs.anl.gov/mpich2/index.php/Getting_And_Building_MPICH2 |
|---|
| 911 | |
|---|
| 912 | ------------------------------------------------------------------------- |
|---|
| 913 | |
|---|
| 914 | X. Building ROMIO into MPICH2 |
|---|
| 915 | ============================= |
|---|
| 916 | By default, ROMIO, an implementation of the I/O portion of MPI-2 will |
|---|
| 917 | be built as a part of MPICH2. The file systems to be built can be |
|---|
| 918 | speicified by passing them in a '+'-delimited list to the |
|---|
| 919 | --with-file-system configure option. For example: |
|---|
| 920 | |
|---|
| 921 | --with-file-system="pvfs+nfs+ufs" |
|---|
| 922 | |
|---|
| 923 | If you have installed version 2 of the PVFS file system, you can use |
|---|
| 924 | the '--with-pvfs2=<prefix>' configure option to specify where |
|---|
| 925 | libraries, headers, and utilities have been installed. If you have |
|---|
| 926 | added the pvfs utilities to your PATH, then ROMIO will detect this and |
|---|
| 927 | build support for PVFS automatically. |
|---|
| 928 | |
|---|
| 929 | ------------------------------------------------------------------------- |
|---|
| 930 | |
|---|
| 931 | XI. Testing the MPICH2 installation |
|---|
| 932 | =================================== |
|---|
| 933 | To test MPICH2, use the following options after installing mpich2. |
|---|
| 934 | These will assume that mpich2 is installed into /usr/local/mpich2. |
|---|
| 935 | |
|---|
| 936 | 1. MPICH2 test suite: |
|---|
| 937 | |
|---|
| 938 | shell$ make testing |
|---|
| 939 | |
|---|
| 940 | The results summary will be placed in test/summary.xml |
|---|
| 941 | |
|---|
| 942 | ------------------------------------------------------------------------- |
|---|
| 943 | |
|---|
| 944 | XII. Installing MPICH2 on Windows |
|---|
| 945 | ================================= |
|---|
| 946 | |
|---|
| 947 | Here are the instructions for setting up MPICH2 on a Windows machine: |
|---|
| 948 | |
|---|
| 949 | 0) Install: |
|---|
| 950 | Microsoft Developer Studio 2003 or later |
|---|
| 951 | Intel Fortran 8.0 or later |
|---|
| 952 | cygwin |
|---|
| 953 | choose the dos file format option |
|---|
| 954 | install perl and cvs |
|---|
| 955 | |
|---|
| 956 | 1) Checkout mpich2: |
|---|
| 957 | |
|---|
| 958 | Bring up a command prompt. |
|---|
| 959 | (replace "yourname" with your MCS login name): |
|---|
| 960 | svn co https://svn.mcs.anl.gov/repos/mpi/mpich2/trunk mpich2 |
|---|
| 961 | |
|---|
| 962 | 2) Generate *.h.in |
|---|
| 963 | |
|---|
| 964 | Bring up a cygwin bash shell. |
|---|
| 965 | cd mpich2 |
|---|
| 966 | maint/updatefiles |
|---|
| 967 | exit |
|---|
| 968 | |
|---|
| 969 | 3) Execute winconfigure.wsf |
|---|
| 970 | |
|---|
| 971 | 4) Open Developer Studio |
|---|
| 972 | |
|---|
| 973 | open mpich2\mpich2.sln |
|---|
| 974 | build the ch3sockDebug mpich2 solution |
|---|
| 975 | build the ch3sockDebug mpich2s project |
|---|
| 976 | build the ch3sockRelease mpich2 solution |
|---|
| 977 | build the ch3sockRelease mpich2s project |
|---|
| 978 | build the Debug mpich2 solution |
|---|
| 979 | build the Release mpich2 solution |
|---|
| 980 | build the fortDebug mpich2 solution |
|---|
| 981 | build the fortRelease mpich2 solution |
|---|
| 982 | build the gfortDebug mpich2 solution |
|---|
| 983 | build the gfortRelease mpich2 solution |
|---|
| 984 | build the sfortDebug mpich2 solution |
|---|
| 985 | build the sfortRelease mpich2 solution |
|---|
| 986 | |
|---|
| 987 | 5) Open a command prompt |
|---|
| 988 | |
|---|
| 989 | cd to mpich2\maint |
|---|
| 990 | execute "makegcclibs.bat" |
|---|
| 991 | |
|---|
| 992 | 6) Open another Developer Studio instance |
|---|
| 993 | |
|---|
| 994 | open mpich2\examples\examples.sln |
|---|
| 995 | build the Release target of the cpi project |
|---|
| 996 | |
|---|
| 997 | 7) Return to Developer Studio with the mpich2 solution |
|---|
| 998 | |
|---|
| 999 | set the version numbers in the Installer project |
|---|
| 1000 | build the Installer mpich2 solution |
|---|
| 1001 | |
|---|
| 1002 | 8) Test and distribute mpich2\maint\ReleaseMSI\mpich2.msi |
|---|
| 1003 | |
|---|
| 1004 | mpich2.msi can be renamed, eg mpich2-1.1.msi |
|---|
| 1005 | |
|---|
| 1006 | 9) To install the launcher: |
|---|
| 1007 | |
|---|
| 1008 | Copy smpd.exe to a local directory on all the nodes. |
|---|
| 1009 | Log on to each node as an administrator and execute "smpd.exe -install" |
|---|
| 1010 | |
|---|
| 1011 | 10) Compile and run an MPI application: |
|---|
| 1012 | |
|---|
| 1013 | Compile an mpi application. Use mpi.h from mpich2\src\include\win32 and mpi.lib in mpich2\lib |
|---|
| 1014 | Place your executable along with the mpich2 dlls somewhere accessable to all the machines. |
|---|
| 1015 | Execute a job by running something like: mpiexec -n 3 myapp.exe |
|---|