root/mpich2/trunk/README.vin @ 4669

Revision 4669, 35.5 KB (checked in by balaji, 6 months ago)

Merged different READMEs into a single file and corrected lots of old
and inaccurate statements in them.

Reviewed by buntinas.

Line 
1                        MPICH2 Release %VERSION%
2
3MPICH2 is a high-performance and widely portable implementation of the
4MPI-2.1 standard from the Argonne National Laboratory. This release
5has all MPI 2.1 functions and features required by the standard with
6the exception of support for the "external32" portable I/O format and
7user-defined data representations for I/O.
8
9The distribution has been tested by us on a variety of machines in our
10own environments. If you have problems, please report them to
11mpich2-maint@mcs.anl.gov.
12
13This README file should contain enough information to get you started
14with MPICH2. More extensive installation and user guides can be found
15in the doc/installguide/install.pdf and doc/userguide/user.pdf files
16respectively. Additional information regarding the contents of the
17release can be found in the CHANGES file in the top-level directory,
18and in the RELEASE_NOTES file, where certain restrictions are
19detailed. Finally, the MPICH2 web site,
20http://www.mcs.anl.gov/research/projects/mpich2, contains information
21on bug fixes and new releases.
22
23 
24I.    Getting Started
25II.   Alternate Configure Options
26III.  Compiler Flags
27IV.   Alternate Channels and Devices
28V.    Alternate Process Managers
29VI.   VPATH Builds
30VII.  Shared Libraries
31VIII. Other Features
32IX.   Developer Builds
33X.    Building ROMIO into MPICH2
34XI.   Testing the MPICH2 installation
35XII.  Installing MPICH2 on windows
36
37
38-------------------------------------------------------------------------
39
40I. Getting Started
41==================
42
43The following instructions take you through a sequence of steps to get
44the default configuration (ch3 device, nemesis channel (with TCP and
45shared memory), MPD process management) of MPICH2 up and running.
46
471.  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
782.  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
893.  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
954.  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
1155.  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
1336.  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
1627.  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
1838.  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
2109.  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
22410. 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
24111. 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
27912. 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
29513. 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
31014. 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
355If you have completed all of the above steps, you have successfully
356installed MPICH2 and run an MPI example. 
357
358More details on arguments to mpiexec are given in the User's Guide in
359the doc subdirectory.  Also in the User's Guide you will find help on
360debugging.  MPICH2 has some some support for the TotalView debugger, as
361well as some other approaches described there.
362
363-------------------------------------------------------------------------
364
365II. Alternate Configure Options
366===============================
367
368The above steps utilized the MPICH2 defaults, which included choosing
369TCP and shared memory for communication (via the "nemesis" channel)
370and the MPD process manager.  Other alternatives are available.  You
371can find out about configuration alternatives with
372
373   ./configure --help
374
375in the mpich2 directory.  The alternatives described below are
376configured by adding arguments to the configure step.
377
378-------------------------------------------------------------------------
379
380III. Compiler Flags
381===================
382
383MPICH2 can be configured with two sets of compiler flags: CFLAGS,
384CXXFLAGS, FFLAGS, F90FLAGS (abbreviated as xFLAGS) and
385MPICH2LIB_CFLAGS, MPICH2LIB_CXXFLAGS, MPICH2LIB_FFLAGS,
386MPICH2LIB_F90FLAGS (abbreviated as MPICH2LIB_xFLAGS) for compilation;
387LDFLAGS and MPICH2LIB_LDFLAGS for linking. All these flags can be set
388as part of configure command or through environment variables.
389(CPPFLAGS stands for C preprocessor flags, which should NOT be set)
390
391Both xFLAGS and MPICH2LIB_xFLAGS affect the compilation of the MPICH2
392libraries. However, only xFLAGS are appended to MPI wrapper scripts,
393mpicc and friends.
394
395MPICH2 libraries are built with default compiler optimization, -O2,
396which can be modified by --enable-fast configure option.  For
397instance, --disable-fast disables the default optimization option.
398--enable-fast=O<n> sets default compiler optimization as -O<n>.  For
399more details of --enable-fast, see the output of "configure --help".
400Any other complicated optimization flags for MPICH2 libraries have to
401be set throught MPICH2LIB_xFLAGS.  CFLAGS and friends are empty by
402default.
403
404For example, to build a "production" MPICH2 environment with -O3 for all
405language bindings, one can simply do
406
407  ./configure --enable-fast=O3
408
409or
410
411  ./configure --disable-fast MPICH2LIB_CFLAGS=-O3 MPICH2LIB_FFLAGS=-O3 MPICH2LIB_CXXFLAGS=-O3 MPICH2LIB_F90FLAGS=-O3
412
413This will cause the MPICH2 libraries to be built with -O3, and -O3 will
414not be included in the mpicc and other MPI wrapper script.
415
416There are certain compiler flags that should not be used with MPICH2's
417configure, e.g. gcc's -Werror, which would confuse configure and cause
418certain configure tests to fail to detect the correct system features.
419To use -Werror in building MPICH2 libraries, you can pass the compiler
420flags during the make step through the Makefile variable
421MPICH2_MAKE_CFLAGS as follows:
422
423  make VERBOSE=1 MPICH2_MAKE_CFLAGS="-Wall -Werror"
424
425(assuming CC is set to gcc). The content of MPICH2_MAKE_CFLAGS is
426appended to the CFLAGS in almost all Makefiles.
427
428-------------------------------------------------------------------------
429
430IV. Alternate Channels and Devices
431==================================
432
433The communication mechanisms in MPICH2 are called "devices". MPICH2
434supports several internal devices including ch3 (default), dcmfd (for
435Blue Gene/P) and globus (for Globus), as well as many third-party
436devices that are released and maintained by other institutes such as
437osu_ch3 (from Ohio State University for InfiniBand and iWARP), ch_mx
438(from Myricom for Myrinet MX), etc.
439
440                   *************************************
441
442ch3 device
443**********
444The ch3 device contains different internal communication options
445called "channels". We currently support nemesis (default), sock, ssm,
446and shm channels, and experimentally provide a dllchan channel within
447the ch3 device.
448
449nemesis channel
450---------------
451Nemesis provides communication using different networks (tcp, mx) as
452well as various shared-memory optimizations. To configure MPICH2 with
453nemesis, you can use the following configure option:
454
455  --with-device=ch3:nemesis
456
457The TCP network module gets configured in by default. To specify a
458different network module such as MX, you can use:
459
460  --with-device=ch3:nemesis:mx
461
462If the MX include files and libraries are not in the normal search
463paths, you can specify them with the following options:
464
465  --with-mx-include= and --with-mx-lib=
466
467... or the if lib/ and include/ are in the same directory, you can use
468the following option:
469
470  --with-mx=
471
472If the MX libraries are shared libraries, they need to be in the
473shared library search path. This can be done by adding the path to
474/etc/ld.so.conf, or by setting the LD_LIBRARY_PATH variable in your
475.bashrc (or .tcshrc) file.  It's also possible to set the shared
476library search path in the binary. If you're using gcc, you can do this by adding
477
478  LD_LIBRARY_PATH=/path/to/lib
479
480  (and)
481
482  LDFLAGS="-Wl,-rpath -Wl,/path/to/lib"
483
484... as arguments to configure.
485
486
487Shared-memory optimizations are enabled by default to improve
488performance for multi-processor/multi-core platforms. They can be
489disabled (at the cost of performance) either by setting the
490environment variable MPICH_NO_LOCAL to 1, or using the following
491configure option:
492
493  --enable-nemesis-dbg-nolocal
494
495The --with-shared-memory= configure option allows you to choose how
496Nemesis allocates shared memory.  The options are "auto", "sysv", and
497"mmap".  Using "sysv" will allocate shared memory using the System V
498shmget(), shmat(), etc. functions.  Using "mmap" will allocate shared
499memory by creating a file (in /dev/shm if it exists, otherwise /tmp),
500then mmap() the file.  The default is "auto". Note that System V
501shared memory has limits on the size of shared memory segments so
502using this for Nemesis may limit the number of processes that can be
503started on a single node.
504
505
506sock channel
507------------
508sock is the traditional TCP sockets based communication channel. It
509uses TCP/IP sockets for all communication including intra-node
510communication. So, though the performance of this channel is worse
511than that of nemesis, it should work on almost every platform. This
512channel can be configured using the following option:
513
514  --with-device=ch3:sock
515
516ssm and shm channels
517--------------------
518shm (shared memory) channel is for use on platforms that only use
519shared-memory communication. ssm (sockets and shared memory) is for
520use on clusters of shared-memory machines. They can be configured
521using:
522
523  --with-device=ch3:ssm
524
525  (or)
526
527  --with-device=ch3:shm
528
529These two channels are being deprecated and will be removed starting
530the 1.2 release series of MPICH2. The nemesis channel provides all the
531functionality supported by these channels and more.
532
533dllchan
534-------
535
536dllchan is a new *experimental* channel for supporting dynamic loading
537of other channels. To use this channel, configure with:
538
539  --with-device=ch3:dllchan:sock,shm,ssm
540
541This provides the sock, shm, and ssm channels as options, with sock
542being the default. In addition, you must specify the shared library
543type; under Linux and when using gcc (or compilers that mimic gcc for
544shared-library construction) add:
545
546  --enable-sharedlibs=gcc
547
548On Mac OSX, use:
549
550  --enable-sharedlibs=gcc-osx
551
552On Solaris, use:
553
554  --enable-sharedlibs=solaris-cc
555
556To select a channel other than the default channel, set the
557environment variable MPICH_CH3CHANNEL to the channel name (i.e., sock,
558shm, or ssm).
559
560There are known problems with this channel, particularly during the
561make step. You may find that some symbols are not found when loading
562the libraries. If you want to try this experimental channel, please
563let us know what does and does not work.
564
565sctp channel
566------------
567The SCTP channel is a new channel using the Stream Control
568Transmission Protocol (SCTP). This channel supports regular MPI-1
569operations as well as dynamic processes and RMA from MPI-2; it
570currently does not offer support for multiple threads.
571
572Configure the sctp channel by using the following option:
573
574  --with-device=ch3:sctp
575
576If the SCTP include files and libraries are not in the normal search
577paths, you can specify them with the --with-sctp-include= and
578--with-sctp-lib= options, or the --with-sctp= option if lib/ and
579include/ are in the same directory.
580
581SCTP stack specific instructions:
582
583  For FreeBSD 7 and onward, SCTP comes with CURRENT and is enabled with
584  the "option SCTP" in the kernel configuration file.  The sctp_xxx()
585  calls are contained within libc so to compile ch3:sctp, make a soft-link
586  named libsctp.a to the target libc.a, then pass the path of the
587  libsctp.a soft-link to --with-sctp-lib.
588 
589  For FreeBSD 6.x, kernel patches and instructions can be downloaded at
590  http://www.sctp.org/download.html .  These kernels place libsctp and
591  headers in /usr, so nothing needs to be specified for --with-sctp
592  since /usr is often in the default search path.
593
594  For Mac OS X, the SCTP Network Kernel Extension (NKE) can be
595  downloaded at http://sctp.fh-muenster.de/sctp-nke.html .  This places
596  the lib and include in /usr, so nothing needs to be specified for
597  --with-sctp since /usr is often in the default search path.
598
599  For Linux, SCTP comes with the default kernel from 2.4.23 and later as
600  a module.  This module can be loaded as root using "modprobe sctp".
601  After this is loaded,  you can verify it is loaded using "lsmod".
602  Once loaded, the SCTP socket lib and include files must be downloaded
603  and installed from http://lksctp.sourceforge.net/ .  The prefix
604  location must then be passed into --with-sctp.  This bundle is called
605  lksctp-tools and is available for download off their website.
606
607  For Solaris, SCTP comes with the default Solaris 10 kernel; the lib
608  and include in /usr, so nothing needs to be specified for --with-sctp
609  since /usr is often in the default search path.  In order to compile
610  under Solaris, MPICH2LIB_CFLAGS must have
611  -DMPICH_SCTP_CONCATENATES_IOVS set when running MPICH2's configure
612  script.
613
614                   *************************************
615
616IBM Blue Gene/P device
617**********************
618MPICH2 also supports the IBM Blue Gene/P systems. Since BG/P's
619front-end uses a different architecture than the actual compute nodes,
620MPICH2 has to be cross-compiled for this platform. The configuration
621of MPICH2 on BG/P relies on the availability of the DCMF driver stack
622and cross compiler binaries on the system. These are packaged by IBM
623in their driver releases (default installation path is
624/bgsys/drivers/ppcfloor) and are not released with MPICH2.
625
626Assuming DRIVER_PATH points to the driver installation path (e.g.,
627/bgsys/drivers/ppcfloor), the following is an example configure
628command-line for MPICH2:
629
630  GCC=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gcc \
631  CC=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gcc \
632  CXX=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-g++ \
633  F77=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gfortran \
634  F90=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-gfortran \
635  CFLAGS="-mcpu=450fp2" \
636  CXXFLAGS="-mcpu=450fp2" \
637  FFLAGS="-mcpu=450fp2" \
638  F90FLAGS="-mcpu=450fp2" \
639  AR=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-ar \
640  LD=${DRIVER_PATH}/gnu-linux/bin/powerpc-bgp-linux-ld \
641  MSGLAYER_INCLUDE="-I${DRIVER_PATH}/comm/include" \
642  MSGLAYER_LIB="-L${DRIVER_PATH}/comm/lib -ldcmfcoll.cnk -ldcmf.cnk -lpthread -lrt -L$DRIVER_PATH/runtime/SPI -lSPI.cna" \
643  ./configure --with-device=dcmfd:BGP --with-pmi=no --with-pm=no --with-file-system=bgl \
644              --enable-timer-type=device --with-cross=src/mpid/dcmfd/cross \
645              --host=powerpc-bgp-linux --target=powerpc-bgp-linux --build=powerpc64-linux-gnu
646
647-------------------------------------------------------------------------
648
649V. Alternate Process Managers
650=============================
651
652mpd
653---
654MPD is the default process manager.  Its setup and use have been
655described above.  The file mpich2-%VERSION%/src/pm/mpd/README has more
656information about interactive commands for managing the ring of MPDs.
657
658hydra
659-----
660Hydra is a new process management framework that uses existing daemons
661on nodes (e.g., ssh, pbs, slurm, sge) to start MPI processes. The file
662mpich2-%VERSION%/src/pm/hydra/README has mode information about Hydra.
663
664smpd
665----
666SMPD is a process management system for both Microsoft Windows and UNIX.
667SMPD is capable of starting a job where some processes are running on
668Windows and others are running on a variant of UNIX.  For more
669information, please see mpich2-%VERSION%/src/pm/smpd/README.
670
671gforker
672-------
673gforker is a process manager that creates processes on a single machine,
674by having mpiexec directly fork and exec them.  This mechanism is
675particularly appropriate for shared-memory multiprocessors (SMPs) where
676you want to create all the processes on the same machine.  gforker is
677also useful for debugging, where running all the processes on a single
678machine is often convenient.
679
680slurm
681-----
682SLURM is an external process manager not distributed with
683MPICH2. However, we provide configure options that allow integration
684with SLURM. To enable this support, use "--with-pmi=slurm
685--with-pm=no" option with configure.
686
687-------------------------------------------------------------------------
688
689VI. VPATH Builds
690================
691MPICH2 supports building MPICH in a different directory tree than the
692one where the MPICH2 source is installed. This often allows faster
693building, as the sources can be placed in a shared filesystem and the
694builds done in a local (and hence usually much faster) filesystem.  To
695make this clear, the following example assumes that the sources are
696placed in /home/me/mpich2-<VERSION>, the build is done in
697/tmp/me/mpich2, and the installed version goes into
698/usr/local/mpich2-<VERSION>:
699
700  shell$ cd /home/me
701  shell$ tar xzf mpich2-<VERSION>.tar.gz
702  shell$ cd /tmp/me
703
704  shell$ mkdir mpich2
705  shell$ cd mpich2
706  shell$ /home/me/mpich2-<VERSION>/configure --prefix=/usr/local/mpich2-<VERSION>
707  shell$ make
708  shell$ make install
709
710-------------------------------------------------------------------------
711
712VII. Shared Libraries
713=====================
714Shared libraries are currently only supported for gcc on Linux and Mac
715and for cc on Solaris. To have shared libraries created when MPICH2 is
716built, specify the following when MPICH2 is configured:
717
718    configure --enable-sharedlibs=gcc         (on Linux)
719    configure --enable-sharedlibs=osx-gcc     (on Mac OS X)
720    configure --enable-sharedlibs=solaris-cc  (on Solaris)
721
722-------------------------------------------------------------------------
723
724VIII. Other Features
725====================
726
727MPICH2 has a number of other features. If you are exploring MPICH2 as
728part of a development project the following configure options are
729important:
730
731Performance Options:
732
733 --enable-fast - Turns off error checking and collection of internal
734                 timing information
735
736 --enable-timing=no - Turns off just the collection of internal timing
737                 information
738
739 --enable-ndebug - Turns on NDEBUG, which disables asserts. This is a
740                subset of the optimizations provided by enable-fast,
741                but is useful in environments where the user wishes
742                to retain the debug symbols, e.g., this can be combined
743                with the --enable-g option.
744
745MPI Features:
746
747  --enable-romio - Build the ROMIO implementation of MPI-IO.  This is
748                 the default
749
750  --with-file-system - When used with --enable-romio, specifies
751                 filesystems ROMIO should support.  See README.romio.
752
753  --enable-threads - Build MPICH2 with support for multi-threaded
754                 applications. Only the sock and nemesis channels support
755                 MPI_THREAD_MULTIPLE.
756
757  --with-thread-package - When used with --enable-threads, this option
758                 specifies the thread package to use.  This option
759                 defaults to "posix".  At the moment, only POSIX
760                 threads are supported on UNIX platforms.  We plan to
761                 support Solaris threads in the future.
762
763Language bindings:
764
765  --enable-f77 - Build the Fortran 77 bindings.  This is the default.
766                 It has been tested with the Fortran parts of the Intel
767                 test suite.
768
769  --enable-f90 - Build the Fortran 90 bindings.  This is not on by
770                 default, since these have not yet been tested.
771
772  --enable-cxx - Build the C++ bindings.  This has been tested with the
773                 Notre Dame C++ test suite and some additional tests.
774
775Cross compilation:
776
777  --with-cross=filename - Provide values for the tests that required
778                 running a program, such as the tests that configure
779                 uses to determine the sizes of the basic types.  This
780                 should be a fine in Bourne shell format containing
781                 variable assignment of the form
782
783                     CROSS_SIZEOF_INT=2
784
785                 for all of the CROSS_xxx variables.  A list will be
786                 provided in later releases; for now, look at the
787                 configure.in files.  This has not been completely
788                 tested.
789
790Error checking and reporting:
791
792  --enable-error-checking=level - Control the amount of error checking.
793                 Currently, only "no" and "all" is supported; all is the
794                 default.
795
796  --enable-error-messages=level - Control the aount of detail in error
797                 messages.  By default, MPICH2 provides
798                 instance-specific error messages; but, with this
799                 option, MPICH2 can be configured to provide less
800                 detailed messages.  This may be desirable on small
801                 systems, such as clusters built from game consoles or
802                 high-density massively parallel systems.  This is still
803                 under active development.
804
805Compilation options for development:
806
807  --enable-g=value - Controls the amount of debugging information
808                 collected by the code.  The most useful choice here is
809                 dbg, which compiles with -g.
810
811  --enable-coverage - An experimental option that enables GNU coverage
812                 analysis.
813
814  --with-logging=name - Select a logging library for recording the
815                 timings of the internal routines.  We have used this to
816                 understand the performance of the internals of MPICH2.
817                 More information on the logging options, capabilities
818                 and usage can be found in doc/logging/logging.pdf.
819
820  --enable-timer-type=name -  Select the timer to use for MPI_Wtime
821                 and internal timestamps.  name may be one of:
822                     gethrtime        - Solaris timer (Solaris systems
823                                        only)
824                     clock_gettime    - Posix timer (where available)
825                     gettimeofday     - Most Unix systems
826                     linux86_cycle    - Linux x86; returns cycle
827                                        counts, not time in seconds*
828                     linuxalpha_cycle - Like linux86_cycle, but for
829                                        Linux Alpha*
830                     gcc_ia64_cycle   - IPF ar.itc timer*
831                     device           - The timer is provided by the device
832                 *Note that the cycle timers are intended to be used by
833                  MPICH2 developers for internal low-level timing.
834                  Normal users should not use these as they are not
835                  guaranteed to be accurate in certain situations.
836
837-------------------------------------------------------------------------
838
839IX. Developer Builds
840====================
841For MPICH2 developers who want to directly work on the svn, there are
842a few additional steps involved (people using the release tarballs do
843not have to follow these steps). Details about these steps can be
844found here:
845http://wiki.mcs.anl.gov/mpich2/index.php/Getting_And_Building_MPICH2
846
847-------------------------------------------------------------------------
848
849X. Building ROMIO into MPICH2
850=============================
851By default, ROMIO, an implementation of the I/O portion of MPI-2 will
852be built as a part of MPICH2. The file systems to be built can be
853speicified by passing them in a '+'-delimited list to the
854--with-file-system configure option. For example:
855
856  --with-file-system="pvfs+nfs+ufs"
857
858If you have installed version 2 of the PVFS file system, you can use
859the '--with-pvfs2=<prefix>' configure option to specify where
860libraries, headers, and utilities have been installed. If you have
861added the pvfs utilities to your PATH, then ROMIO will detect this and
862build support for PVFS automatically.
863
864-------------------------------------------------------------------------
865
866XI. Testing the MPICH2 installation
867===================================
868To test MPICH2, use the following options after installing mpich2.
869These will assume that mpich2 is installed into /usr/local/mpich2.
870
8711. MPICH2 test suite:
872
873   shell$ make testing
874
875The results summary will be placed in test/summary.xml
876
877-------------------------------------------------------------------------
878
879XII. Installing MPICH2 on Windows
880=================================
881
882Here are the instructions for setting up MPICH2 on a Windows machine:
883
8840) Install:
885    Microsoft Developer Studio 2003 or later
886    Intel Fortran 8.0 or later
887    cygwin
888        choose the dos file format option
889        install perl and cvs
890
8911) Checkout mpich2:
892
893    Bring up a command prompt.
894    (replace "yourname" with your MCS login name):
895    svn co https://svn.mcs.anl.gov/repos/mpi/mpich2/trunk mpich2
896
8972) Generate *.h.in
898
899    Bring up a cygwin bash shell.
900    cd mpich2
901    maint/updatefiles
902    exit
903
9043) Execute winconfigure.wsf
905
9064) Open Developer Studio
907
908    open mpich2\mpich2.sln
909    build the ch3sockDebug mpich2 solution
910    build the ch3sockDebug mpich2s project
911    build the ch3sockRelease mpich2 solution
912    build the ch3sockRelease mpich2s project
913    build the Debug mpich2 solution
914    build the Release mpich2 solution
915    build the fortDebug mpich2 solution
916    build the fortRelease mpich2 solution
917    build the gfortDebug mpich2 solution
918    build the gfortRelease mpich2 solution
919    build the sfortDebug mpich2 solution
920    build the sfortRelease mpich2 solution
921
9225) Open a command prompt
923
924    cd to mpich2\maint
925    execute "makegcclibs.bat"
926
9276) Open another Developer Studio instance
928
929    open mpich2\examples\examples.sln
930    build the Release target of the cpi project
931
9327) Return to Developer Studio with the mpich2 solution
933
934    set the version numbers in the Installer project
935    build the Installer mpich2 solution
936
9378) Test and distribute mpich2\maint\ReleaseMSI\mpich2.msi
938
939    mpich2.msi can be renamed, eg mpich2-1.1.msi
940
9419) To install the launcher:
942
943    Copy smpd.exe to a local directory on all the nodes.
944    Log on to each node as an administrator and execute "smpd.exe -install"
945
94610) Compile and run an MPI application:
947
948    Compile an mpi application.  Use mpi.h from mpich2\src\include\win32 and mpi.lib in mpich2\lib
949    Place your executable along with the mpich2 dlls somewhere accessable to all the machines.
950    Execute a job by running something like: mpiexec -n 3 myapp.exe
Note: See TracBrowser for help on using the browser.