User Tools

Site Tools


intel

The Intel compiler is available on Magi. You can use it to compile your sequential and MPI codes. First you must load Intel modules. Both 2022.0.2 and 2024.0.1 are available.

You can choose one of them with 'module use' command. For 2022.0.2 :

 nicolas.greneche@magi3:~$ module use /softs/modules/intel-2022.1.2/

And for 2024.0.1 :

 nicolas.greneche@magi3:~$ module use /softs/modules/intel-2024.0.1/

You also need to update your environement with :

 nicolas.greneche@magi3:~$ export MODULES_AUTO_HANDLING=1

To enable auto loading of dependencies for 2024.0.1.

Then you can enable Intel tools this way (here is compiler, mkl and mpi) :

 nicolas.greneche@magi3:~$ module load compiler/latest
 nicolas.greneche@magi3:~$ module load mkl/latest
 nicolas.greneche@magi3:~$ module load mpi/latest
 

Instead of 'latest' you can target a specific version of the tool.

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/libpmi.so

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) :

 #!/bin/bash
 #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/libpmi.so
 
 srun /softs/vasp.5.4.4.pl2/bin/vasp_std
intel.txt · Last modified: 2024/01/22 04:12 by nico