1. Install Image and set hostfile

Pulling Container
$ docker pull nbclosu/mvapich:3.0
$ docker run -it --privileged nbclosu/mvapich:3.0 /bin/bash
Setting Hostfile
$ echo <container-id> > /hostfile

Hostfile is for specifying the list of nodes/containers where the job is running. Within the docker container, your hostname is the <container-id>. In this test, your hostfile needs to contain only one line of <container-id> information.

2. Running OMB

Now you can run OMB with specific benchmarks (osu_latency, osu_bw, osu_bibw …). You can also change the number of processors (-np) for benchmarks.

Run osu_latency
$ docker exec <container-id> /mvapich-3.0-install/bin/mpirun_rsh -np 2 -hostfile /hostfile /mvapich-3.0-install/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_latency

3. Singularity(Apptainer) Support

Many HPC systems only support singularity for containerized applications. You can convert this MVAPICH docker container to SIF(Singularity Image File) with the following commands. In this case, your hostfile contains the hostname, not <container-id>. You can check your hostname with the hostname command.

Convert to SIF
$ docker save nbclosu/mvapich:3.0 -o mvapich-3.0.tar
$ apptainer build mvapich-3.0.sif docker-archive://mvapich-3.0.tar

4. Extra info

For more information about running please refer to the MVAPICH Quick Start Guide: A short document with the necessary information for users to download, install, and use MVAPICH. (HTML, PDF)