13.07.2015 Views

Intel(R) - Computational and Systems Biology at MIT

Intel(R) - Computational and Systems Biology at MIT

Intel(R) - Computational and Systems Biology at MIT

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Linking Your Applic<strong>at</strong>ion with <strong>Intel</strong>® M<strong>at</strong>h Kernel Library 5• libmkl_lapack95.a <strong>and</strong> libmkl_blas95.a libraries contain LAPACK95 <strong>and</strong> BLAS95interfaces respectively. They are not included into the original distribution <strong>and</strong> shouldbe built before using the interface. (See “Fortran 90 Interfaces <strong>and</strong> Wrappers toLAPACK <strong>and</strong> BLAS” section in chapter 7 for details on building the libraries <strong>and</strong>“Compiler-dependent Functions <strong>and</strong> Fortran 90 Modules” section on why source code isdistributed in this case.)• To use the <strong>Intel</strong> MKL FFT, Trigonometric Transform, or Poisson, Laplace, <strong>and</strong> HelmholtzSolver routines, link in the m<strong>at</strong>h support Linux library by adding "-lm" to the link line.• In products for Linux, it is necessary to link the pthread library by adding-lpthread. The pthread library is n<strong>at</strong>ive to Linux <strong>and</strong> libguide makes use of thislibrary to support multi-threading. Any time libguide is required, add -lpthread <strong>at</strong>the end of your link line (link order is important).Linking ExamplesBelow are some specific examples of linking using the <strong>Intel</strong>® compilers on systems basedon <strong>Intel</strong>® 64 architecture. In these examples, <strong>and</strong> placeholders are replaced with user-defined environment variables $MKLPATH <strong>and</strong>$MKLINCLUDE, respectively. See also examples on linking with ScaLAPACK <strong>and</strong> Cluster FFTin chapter 9.ifort myprog.f -L$MKLPATH -I$MKLINCLUDE-Wl,--start-group $MKLPATH/libmkl_intel_lp64.a$MKLPATH/libmkl_intel_thread.a $MKLPATH/libmkl_core.a -Wl,--end-group-lguide -lpthreadst<strong>at</strong>ic linking of user code myprog.f <strong>and</strong> parallel <strong>Intel</strong> MKL supporting LP64 interface.ifort myprog.f -L$MKLPATH -I$MKLINCLUDE-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lpthreaddynamic linking of user code myprog.f <strong>and</strong> parallel <strong>Intel</strong> MKL supporting LP64interface.ifort myprog.f -L$MKLPATH -I$MKLINCLUDE-Wl,--start-group $MKLPATH/libmkl_intel_lp64.a$MKLPATH/libmkl_sequential.a $MKLPATH/libmkl_core.a -Wl,--end-group-lpthreadst<strong>at</strong>ic linking of user code myprog.f <strong>and</strong> sequential version of <strong>Intel</strong> MKL supportingLP64 interface.ifort myprog.f -L$MKLPATH -I$MKLINCLUDE-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread5-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!