The National Institute for Computational Sciences



The ACF has C/C++ and Fortran compilers from GNU and Intel. The module for the Intel programming environment is loaded by default.

Here is a helpful link for linking MKL with Fortran: Compiling the Intel® Math Kernel Library on the Intel® Xeon Phi™ Coprocessor using Fortran
  GNU Intel
C gcc icc/mpiicc
C++ g++ icpc/mpiicpc
Fortran gfortran ifort/mpiifort

Compiling specifically for the KNL nodes

Codes that are targeting the ACF KNL nodes should try to use the Intel compilers which may provide the best performance depending on the code being compiled. The KNLs are binary compatible with earlier Intel architectures and applications built for previous architecutre may run on the KNLs without recompiling, but our recommendation is to recompile applications built on other systems. The Intel compilers for C, C++, and Fortran are loaded by default so the icc, icpc, and ifort commands should already be in the path for every user. When compiling for the KNLs add the KNL feature option to your command line as shown in the following table.
C icc/mpiicc -xMIC-AVX512
C++ icpc/mpiicpc -xMIC-AVX512
Fortran ifort/mpiifort -xMIC-AVX512
If you must use the GCC compilers use the -mavx option which equates to the Intel compiler -xavx compiler option. However, it will not be equivalent to the Intel -xMIC-AVX512 compiler option but will instruct the GCC compiler to provide optimizations for a vector unit of a smaller size. Using the Intel compilers will provide optimizations specific for the KNLs, but GCC is available if using the Intel compilers is desired. Depending on your code you may get better performance with the Intel compilers.