-
Notifications
You must be signed in to change notification settings - Fork 57
InstallingMPI
If you plan to run ADDA on a cluster, MPI is probably already installed on your system. You should consult someone familiar with the particular MPI package. ADDA usage of MPI is based on the MPI 2.1 standard, and it should work with any implementation that is compliant with this or higher versions of the standard. Version of MPI standard is checked for conformity by ADDA both during compilation and at runtime.
ADDA will run on any hardware compatible with MPI, but, in principle, it may run more efficiently on hardware with shared memory address space, e.g. multi-core PCs. However, such hardware also has its drawbacks, e.g. the performance may be limited by memory access speed. A few tests performed on different computers showed that currently using two cores of a dual-core PC results in computational time from 60% to 75% of that for sequential execution on the same machine. We plan to optimize ADDA specifically for such hardware, using e.g. OpenMP.
If you plan to run a parallel version of ADDA on a single computer using a multi-core processor, you need first to install some implementation of MPI. Installation instruction can be found in the manual of a particular MPI package. In the following we briefly describe several examples for various operating systems. Note that modern MPI implementations, such as MPICH and Open MPI have a lot of advanced features, like combining several single- and multi-core computers in a cluster, which are not discussed here.
The easiest is to install MPICH or Open MPI (or other implementation) through the package manager - see, e.g., the full list for MPICH.
Alternatively, here is a brief instructions for compiling MPICH yourself. Note, however, that they were tested on old version 2-1.4, but should work similarly for later versions as well. A detailed description for compiling MPICH yourself are given in its Installer's Guide, see especially Section 2.2 "From A Standing Start to Running an MPI Program". Below we summarize the most important points.
- Download the source code of MPICH and unzip it.
- If you are installing MPI under a user account, choose installation directory and create it, for instance:
mkdir $HOME/mpich-install
- Cd into the directory with MPICH source (which we here use also as a build directory) and type
where
configure -prefix=$HOME/mpich-install -enable-fast
-prefix
specifies installation directory, and-enable-fast
is recommended for production runs (at expense of some error reporting). Other useful configuration options to consider can be found in the Installer's Guide. - Type
make make install
- Add corresponding
bin
directory to the$PATH
. For example, if you are using BASH, addto yourexport PATH=$HOME/mpich-install/bin:$PATH
.bash_profile
and relogin. Now you should be able to compile MPI-version of ADDA usingmpicc
(automatically detected by mpi/Makefile) and run it usingmpiexec
.
- Get MPICH or Open MPI package from Homebrew or other package manager.
- Otherwise, follow the Unix instructions.
The following guidelines may be outdated - they are based on MPICH2 v. 1.4, while later versions of MPICH2 (or MPICH) seem to lack native support for Windows. We plan to provide instructions for its predecessor - Microsoft MPI (MS-MPI) soon.
MPICH2 Installer's Guide contains instructions for Windows - Section 9 "Windows Version". However, they seem somewhat incomplete in comparison with the following practical guide.
-
Download the installer of MPICH2 for your combination of Windows and hardware and install it.
-
Add
bin
subdirectory to Windows environmental variablePATH
. This will give you direct access tompiexec
andsmpd
. -
On some systems you may need to manually install
smpd
as a system service (checksmpd -status
). For that open Windows console (cmd
) with administrator's privileges (e.g. right-clicking on its icon and choosing corresponding option). Then runsmpd -install -phrase behappy
The (pass)phrase should be the same for all computers running in a cluster. Specifying it at this moment will stop
mpiexec
from asking for it at every run. -
First time you run
mpiexec
you may be prompted for Windows account name and password, which will be used to run MPI processes. These data is then stored encrypted in Windows registry. MPICH2 can not use an account with empty password. So if that is the case for your account, you need to either add a password (you may then also turn-on automatic login) or create a new account specially to be used by MPICH2. -
Moreover, you will be once prompted by the Windows firewall, whether to allow
mpiexec
andsmpd
to access network. If you plan to run ADDA only on a single PC, you may block them. Otherwise, you should unblock them. You may also get similar prompts for the parallel program itself, e.g.,adda_mpi
.
The above actions are necessary to use precompiled adda_mpi
, included in Windows packages. If you want to compile MPI version of ADDA yourself, then additionally
- Since Windows package of MPICH2 does not contain compiler wrapper
mpicc
, either- follow the advanced instructions of setting up the MinGW/MSYS environment.
- or specify paths to
include
andlib
subdirectories of MPICH2 directory in mpi/Makefile, as described in CompilingADDA.
Home (Getting started)
Frequently asked questions
Features
Tutorial
Comparison with other codes
Largest simulations
Compiling ADDA
Installing FFTW3
Installing MPI
Using OpenCL
Installing clFFT
Installing clBLAS
Using sparse mode
Installing MinGW
Using MSYS2
Papers that use ADDA
Awards
References
Links
Acknowledgements
Instruction for committers
Code design & structure
Style guide
Using VS Code
Using Eclipse
Early development history
Adding new ...