User Tools

Site Tools


openmpi

This is an old revision of the document!


Submit your OpenMPI job with SLURM

OpenMPI is built on Magi with SLURM support. To use OpenMPI, you must load the correspondig module. Feel free to browse the /softs/modules/compiled/gcc/<gcc_version>/openmpi/ to check available versions of OpenMPI. For example :

 nicolas.greneche@magi3:~$ module load /softs/modules/compiled/gcc/10.2.1/openmpi/4.1.2

Then, you can compile your OpenMPI codes :

 nicolas.greneche@magi3:~$ mpicc -o hellompi hellompi.c

The last step is to write a submission script for slurm (here run.slurm) :

 #!/bin/bash
 #SBATCH --job-name=hello
 #SBATCH --output=slurm.out
 #SBATCH --error=slurm.err
 #SBATCH --mail-type=end
 #SBATCH --mail-user=nicolas.greneche@univ-paris13.fr
 #SBATCH --nodes=2
 #SBATCH --ntasks-per-node=2
 
 srun ./hellompi

You can refer to this documentation for more informations on job submission.

openmpi.1648226732.txt.gz · Last modified: 2022/03/25 17:45 by nico