To enable the multi-processing capabilities of the SKIRT command line program, the host operating system must provide an implementation of the standard Message Passing Interface (MPI), and the SKIRT code must be (re)built with the corresponding build option enabled.
This topic contains the following sections:
The SKIRT code requires an MPI implementation that supports standard MPI v2.1 or later.
Large multi-node computing systems will have one or more MPI implementations installed by the system administrator. Use the "module" system to load the MPI implementation and version that matches the compiler used for building the SKIRT code. For example:
module load cmake module load intel_comp/2019-update2 module load intel_mpi/2019-update2
For testing purposes, it might be useful to run SKIRT in multi-processing mode on a laptop or desktop computer. OpenMPI (not to be confused with OpenMP) is a freely available MPI implementation that is a good choice in this case. Follow the instructions below to install OpenMPI.
Download the source code
Compile and install the source code
cd ~/Downloads/openmpi-x.x.x
./configure --prefix=/usr/local
make all
sudo make installIf you are prompted for your password, enter it.
which mpicxx which mpirun
OpenMPI (not to be confused with OpenMP) is a freely available MPI implementation that is a good choice for supporting multi-processing on small networks, standalone servers and even desktop computers. Follow the instructions below to install OpenMPI on Ubuntu; the procedure for other Unix systems is likely very similar.
Open a Terminal window and enter the command:
sudo apt-get install libopenmpi-dev
This requires root access to modify files in the system directories. The "sudo" command takes care of this assuming that the corresponding privileges are enabled for your account. Enter your password (not the root password!) when asked. Also, you will be prompted with the question "Do you want to continue? [Y/n]". Respond affirmative unless you see a good reason not to.
Once the above has completed successfully, verify the installation by entering the following command:
mpirun --version
Once you have verified that the host system provides an MPI implementation, you need to enable the BUILD_WITH_MPI
build option and rebuild the SKIRT code: