The Intel compiler is a complex beast for C++. It does not provide a full compilation environment but relies on GNU C++ library. Hence on a machine using environment modules (such as supercomputers), you will typically need to load a GCC module before using Intel C++ compiler. It is however fully compatible with the GNU compiler for C & C++. Only the Fortran compiler uses a different module format.
Otherwise, to use PDI from a code compiled with ifort
, you have 3 options (by order of recommendation):
include
instead of using the module,On a machine using environment modules you will need to load both GCC and Intel modules.
Then, compile PDI by specifying which compiler you want to use for each language to cmake
. You can of course combine these option with the usual cmake
options.
Even if you don't use it to compile your code, you must keep the GCC module loaded on a machine using environment modules.
In order to use Intel compiler, you need to point it to an installation of GCC recent enough with the options:
-gcc-name=/path/to/gcc-7.5.0/bin/gcc
,-gxx-name=/path/to/gcc-7.5.0/bin/g++
. These can be specified through the CFLAGS
, CXXFLAGS
and FFLAGS
environment variables.Then, compile PDI normally, you might want to force the use of Intel compilers. You can of course combine these option with the usual cmake
options.
Even if you don't use it to compile your code, you must keep the GCC module loaded on a machine using environment modules.