Intel compiler
Intel compiler is optimized for intel CPUs. It provides the Math Kernel Library (MKL) in which linear algebra computations are optimized. The performance of C and Fortran codes can be improved on Intel CPUs if compiled with Intel compiler. It provides an MPI implemetation for MPI programs that run on multipe nodes. Users should choose the Intel compiler for intel CPUs when possible.
Set up environment
If you use Rocky 8 nodes, log in to an appropriate head node first,
Load an intel module,
Check commands for intel compiler and MPI and environment variables for MKL are ready for use,
$ which icx
/orcd/software/community/001/rocky8/intel/2024.2.1/compiler/2024.2/bin/icx
$ which ifort
/orcd/software/community/001/rocky8/intel/2024.2.1/compiler/2024.2/bin/ifort
$ which mpiicx
/orcd/software/community/001/rocky8/intel/2024.2.1/mpi/2021.13/bin/mpiicx
$ which mpiifort
/orcd/software/community/001/rocky8/intel/2024.2.1/mpi/2021.13/bin/mpiifort
$ echo $MKLROOT
/orcd/software/community/001/rocky8/intel/2024.2.1/mkl/2024.2
If you use CentOS 7 nodes, log in to an appropriate head node first,
Load the modules for intel compiler, intel MPI and MKL,
Check commands for intel compiler and MPI and environment variables for MKL are ready for use,
$ which icc
/home/software/intel/2018-01/bin/icc
$ which ifort
/home/software/intel/2018-01/bin/ifort
$ which mpiicc
/home/software/intel/2018-01/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin/mpiicc
$ which mpiifort
/home/software/intel/2018-01/compilers_and_libraries_2018.1.163/linux/mpi/intel64/bin/mpiifort
$ echo $MKLROOT
/home/software/intel/2018-01/compilers_and_libraries_2018.1.163/linux/mkl/
Compile and run programs with Intel compiler
Once the environment is set up, you can compile your C or Fortran codes like this,
or MPI codes,If you use GNU Make to build your program, set up the varialbes in the Makefile,
Use the variableMKLROOT
in the Makefile when needed.
Finally submit a job script specifying a partition with -p <partition-name>
and loading the intel module,
Once the environment is set up, you can compile your C or Fortran codes like this,
or MPI codes,If you use GNU Make to build your program, set up the varialbes in the Makefile,
Use the variableMKLROOT
in the Makefile when needed.
Finally submit a job script specifying a partition with -p <partition-name>
and loading the intel module,
References
Refer to the following references for more details on logging in, compiling C/Fortran codes, using GNU make, and using partitions in Slurm job scheduler.