-
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.
It is recommended to use Microsoft MPI (MS-MPI) – a successor of MPICH2, which stopped its support for Windows long ago. The following are based on version 10.1.2.
Choose the latest download link here and follow the instructions. You will be given the choice of two files: msmpisetup.exe
and msmpisdk.msi
. Installation of the first one is necessary to use precompiled adda_mpi
, included in 64-bit Windows package. This applies to ADDA versions starting from 1.4.0. For earlier releases, see MPICH2 installation instructions in the earlier version of this page.
If you want to compile MPI version of ADDA yourself, then additionally download and install msmpisdk.msi
. The logic in mpi/Makefile will detect Microsoft MPI automatically and set all necessary compilation flags.
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 ...