User Tools

Site Tools


The Intel compiler is available on Magi. You can use it to compile your sequential and MPI codes. First you must load Intel modules. I wrote this tutorial when Intel shipped the version 2022.0.2. You can check the directory /softs/modules/intel to see which versions are available.

 nicolas.greneche@magi3:~$ module load /softs/modules/intel/compiler/2022.0.2
 nicolas.greneche@magi3:~$ module load /softs/modules/intel/mkl/2022.0.2
 nicolas.greneche@magi3:~$ module load /softs/modules/intel/mpi/2021.5.1

Then, you can use icc of mpicc to compile sequential codes :

 nicolas.greneche@magi3:~$ icc -o hello hello.c
 nicolas.greneche@magi3:~$ ./hello
 Coucou !

Or MPI codes :

 nicolas.greneche@magi3:~$ mpicc -o pi pi.c
 nicolas.greneche@magi3:~$ mpirun -np 4 ./pi 256
 Elapsed time = 0.000006 seconds
 Pi is approximately 3.1875000000000000, Error is 0.0459073464102069

To submit Intel MPI jobs, you have to add this variable to your environement :

 export I_MPI_PMI_LIBRARY=/opt/slurm/lib/

And specify the number of MPI workers (here 40) :

 #SBATCH --ntasks=40

Here is a sample script that runs VASP on two nodes with 40 workers on each nodes (total of 80 workers) :

 #SBATCH --job-name=Au85Si15-NPT-300K
 #SBATCH --output=slurm.out
 #SBATCH --error=slurm.err
 #SBATCH --nodes=2
 #SBATCH --ntasks-per-node=40
 #SBATCH --partition=COMPUTE
 module load /softs/modules/intel/compiler/2022.0.2
 module load /softs/modules/intel/mkl/2022.0.2
 module load /softs/modules/intel/mpi/2021.5.1
 export I_MPI_PMI_LIBRARY=/opt/slurm/lib/
 srun /softs/vasp.5.4.4.pl2/bin/vasp_std
intel.txt · Last modified: 2022/03/07 11:07 by nico