This CourseWare was tested with SimGrid version 3.27 (small changes may be needed with later versions).
You need to have access to the smpicc
(compiler for MPI
code in C), smpicxx
(compiler for MPI code in C++), and
smpirun
(tool to execute compiled MPI code) SimGrid
executables to go through the CourseWare. To get access to these
executables you have two options:
Provided you have Docker installed on
your system, you can use the henricasanova/ics632_smpi
container.
You can of course run this container and connect to it via a shell, like with any other Docker container, and do all your work within the container.
Alternately, you can run the smpicc
and smpirun
commands in the container but from your host. That is, on your host (in your shell/command-prompt),
instead of typing smpicc
or smpirun
(which would require SimGrid to be
installed on your host), instead you type the commands below.
smpicc
is executed by running:docker run --rm -it -v $(pwd):/home/smpi --user $(id -u):$(id -g) henricasanova/ics632_smpi smpicc
smpicxx
is executed by running:docker run --rm -it -v $(pwd):/home/smpi --user $(id -u):$(id -g) henricasanova/ics632_smpi smpicxx
smpirun
is executed by running:docker run --rm -it -v $(pwd):/home/smpi --user $(id -u):$(id -g) henricasanova/ics632_smpi smpirun
On MacOS: If you get exit code 137 for any of these commands, you may want to increase the memory allocated to Docker (e.g., through the Docker Dashboard preferences)
smpicc
is executed by running:docker run --rm -it -v "%cd%:/home/smpi" henricasanova/ics632_smpi smpicc
smpicxx
is executed by running:docker run --rm -it -v "%cd%:/home/smpi" henricasanova/ics632_smpi smpicxx
smpirun
is executed by running:docker run --rm -it -v "%cd%:/home/smpi" henricasanova/ics632_smpi smpirun
On a recent Debian/Ubuntu (virtual) machine, you can retrieve SimGrid directly from the package manager:
sudo apt update && apt upgrade -y
sudo apt install simgrid
apt-cache show libsimgrid-dev
.
If the version you obtain is too old (see the top of this page), we recommend you manually install SimGrid following the instructions bellow.
For instructions regarding installation, please refer to the The SimGrid page. But just in case, here is a typical way to install SimGrid manually on a Linux system:
sudo apt install -y g++ libboost-all-dev cmake
tar -xvf simgrid-x.y.tar.gz
cd simgrid-x.y
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -Denable_smpi=on -Denable_documentation=off
/usr/local/
)make -j4
make check
sudo make install
Assuming your path includes /usr/local/bin
(which it should), you now can invoke two new
commands: smpicc
and smpirun
.
If you are not a superuser on your system (i.e., sudo
access is denied), but the dependencies are installed, then you can install SimGrid in your home directory, say in a directory
called local
. Do do so, modify the cmake
invocation above using
-DCMAKE_INSTALL_PREFIX=$HOME/local
. You can then do make install
instead of sudo make install
, and binaries will be available as
~/local/bin/smpicc
and ~/local/bin/smpirun
.