Examples for Linking a C Application
- Main module is in C.
- You are using theIntel® oneAPIIntel® C++ Compiler.DPC++/C++Compiler
- You are using MPICH.
- functions use LP64 interfaces.Intel® oneAPI Math Kernel Library
- ThePATHenvironment variable contains a directory with the MPI linker scripts.
- $MKLPATHis a user-defined variable containing.<mkl_directory>/lib
To link dynamically with ScaLAPACK for a cluster of systems based on the Intel® 64 architecture, use the following link line:
mpicc
\
-lmkl_intel_lp64 \
-lmkl_intel_thread -lmkl_core \
-liomp5 -lpthread
<user files to link>
\ -L$MKLPATH \
-lmkl_scalapack_lp64 \
-lmkl_blacs_mpich
_lp64 To link statically with Cluster FFT for a cluster of systems based on the Intel® 64 architecture, use the following link line:
mpicc
\
$MKLPATH/libmkl_intel_lp64.a \
$MKLPATH/libmkl_intel_thread.a \
$MKLPATH/libmkl_core.a
\
-liomp5 -lpthread
<user files to link>
\
$MKLPATH/libmkl_cdft_core.a \
$MKLPATH/libmkl_blacs_mpich
_lp64.a To link dynamically with Cluster Sparse Solver for a cluster of systems based on the Intel® 64 architecture, use the following link line:
mpicc
\
-lmkl_intel_lp64 \
-lmkl_intel_thread -lmkl_core \
-liomp5 -lpthread
<user files to link>
\
-L$MKLPATH \
-lmkl_blacs_mpich
_lp64