Developer Guide

Contents

Examples for Linking a C Application

These examples illustrate linking of an application under the following conditions:
  • Main module is in C.
  • You are using the Intel® C++ Compiler.
  • You are using MPICH
    2
    .
  • Intel® MKL
    functions use LP64 interfaces.
  • The
    PATH
    environment variable contains a directory with the MPI linker scripts.
  • $MKLPATH
    is a user-defined variable containing
    <mkl_directory>
    /lib
    /intel64
    _lin
    .
To link dynamically with ScaLAPACK for a cluster of systems based on the Intel® 64 architecture, use the following link line:
mpicc
<user files to link>
                       \
   -L$MKLPATH                                    \
   -lmkl_scalapack_lp64                          \
   -lmkl_blacs_
intelmpi
_lp64                     \
   -lmkl_intel_lp64                              \
   -lmkl_intel_thread -lmkl_core                 \
   -liomp5 -lpthread
To link statically with Cluster FFT for a cluster of systems based on the Intel® 64 architecture, use the following link line:
mpicc
<user files to link>
                
\
   -Wl,--start-group                     
\
   $MKLPATH/libmkl_cdft_core.a            \
   $MKLPATH/libmkl_blacs_
intelmpi
_lp64.a  \
   $MKLPATH/libmkl_intel_lp64.a           \
   $MKLPATH/libmkl_intel_thread.a         \
   $MKLPATH/libmkl_core.a                
\
   -Wl,--end-group                       
\
   -liomp5 -lpthread
To link dynamically with Cluster Sparse Solver for a cluster of systems based on the Intel® 64 architecture, use the following link line:
mpicc
<user files to link>
                       \
   -L$MKLPATH                                    \
   -lmkl_blacs_
intelmpi
_lp64                     \
   -lmkl_intel_lp64                              \
   -lmkl_intel_thread -lmkl_core                 \
   -liomp5 -lpthread

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804