HOME About us License Miscellaneous
Parallel Computing in Container
This package tests various implementations of MPI inside Singularity containers derived directly from Docker images. Two major implementations are tested here: MPICH and OpenMPI. Package contents:
mpi_check.c and Makefilemaster.py to automatically create Docker images of various MPI implementations,
as well as samples of job scheduling batch files for an HPC system (*.sbatch).It has ABI (Application Binary Interface) compatibility across multiple versions and vendors. More information can be found here: https://www.mpich.org/abi/
Compatibility is guaranteed within a major version number, where a version number is given as: major.minor.release.
There are a number of versions:
4.x3.x2.x and 1.x
More information on this can be found here: https://www.open-mpi.org/software/ompi/versions/This is the simplest way.
singularity pull docker://lahur/testmpich
singularity pull docker://lahur/testopenmpi-4.0.2
singularity pull docker://lahur/testopenmpi-3.1.4
singularity pull docker://lahur/testopenmpi-2.1.6
sbatch pearcey-mpich.sbatch
sbatch pearcey-openmpi-4.0.2.sbatch
sbatch pearcey-openmpi-3.1.4.sbatch
sbatch pearcey-openmpi-2.1.6.sbatch
The Python script master.py can build a number of Docker images automatically.
Inside the file, at the top, there’s a section for user settings:
mpi_targets = ["mpich", "openmpi-4.0.2", "openmpi-3.1.4", "openmpi-2.1.6"]
target_prepend = "lahur/test"
target_append = ":latest"
dry_run = True
HPC = "pearcey"
Note
mpi_targets is a list of MPI targets. Modify this to build different target.target_prepend target target_append.
For example: lahur/testopenmpi-4.0.2:latest.dry_run to False if you want to actually build the image. Otherwise only Dockerfiles and sample batch files are produced.HPC is the name of HPC that will be prepended to sample batch files.Executing the script is simple.
python master.py
The script will create the necessary Dockerfiles, build the images, and make samples of SLURM batch files.
To build Docker image manually, you can modify the existing Dockerfiles. Then run the build command.
docker build -t my_dockerHub_account/my_docker_image:image_tag -f my_dockerfile .
If you wish to use the image on another machine, push the Docker image to your account in DockerHub.
docker push my_dockerHub_account/my_docker_image:image_tag
Then pull it from the target machine as a singularity object.
singularity pull docker://my_dockerHub_account/my_docker_image:image_tag