Links and further reading

Environment variables

To link a library, the compiler and linker need at minimum

name of and path to the include files

For fftw3, the include files have standard names, but are in a different place than the other MKL-related include files.

name of and path to the library:

The fftw3 library is merged the other MKL libraries. Hence, searching for the typical fftw3 - filenames gives a negative result. This may be of importance for cmake - or configure -scripts trying to explore the system to generate the appropriate compiler- und linker options.

The intel modules define an environment variable MKLROOT that can be used to simplify the handling of path names.

module load intel




Compiling and dynamic linking

The following should link a FORTRAN program myprog.f calling fftw3 - routines:

ifort myprog.f -I$MKLINCLUDE -I$MKLFFTWINCLUDE -L$MKLPATH -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm

For a configure script one has to explore its environment variables to fetch compiler and linker flags to the configuration process. This may be for example:

module load intel


export LIBS="-L$MKLROOT/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm"



ensures that the path to the MKL is stored in the binary. This ensures that no compiler module is needed during runtime and the originally specified library version is used.

Compiling and static linking

To be described ...

Known issues

The linking with OpenMP* threadedIntel® oneAPI Math Kernel Library failed for the nfft - tools.