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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Linking Your Applic<strong>at</strong>ion with <strong>Intel</strong>® M<strong>at</strong>h Kernel Library 5Table 5-1Quick comparison of <strong>Intel</strong>® MKL linkage models (continued)Fe<strong>at</strong>ure Dynamic Linkage St<strong>at</strong>ic LinkageMulti-threaded /thread safeYes Yes YesCustom DynamicLinkage<strong>Intel</strong> MKL-specific Linking Recommend<strong>at</strong>ionsYou are strongly encouraged to dynamically link in <strong>Intel</strong>® Legacy OpenMP* run-timelibrary libguide <strong>and</strong> <strong>Intel</strong>® Comp<strong>at</strong>ibility OpenMP* run-time library libiomp. Linking tost<strong>at</strong>ic OpenMP run-time library is not recommended, as it is very easy with layeredsoftware to link in more than one copy of the library. This causes performance problems(too many threads) <strong>and</strong> may cause correctness problems if more than one copy isinitialized.You are advised to link with libguide <strong>and</strong> libiomp dynamically even if other libraries arelinked st<strong>at</strong>ically.Link Comm<strong>and</strong> SyntaxTo link libraries having filenames libyyy.a or libyyy.so with your applic<strong>at</strong>ion, twooptions are available:• In the link line, list library filenames using rel<strong>at</strong>ive or absolute p<strong>at</strong>hs, for example: myprog.o /opt/intel/mkl/10.0.xxx/lib/32/libmkl_solver.a/opt/intel/mkl/10.0.xxx/lib/32/libmkl_intel.a/opt/intel/mkl/10.0.xxx/lib/32/libmkl_intel_thread.a/opt/intel/mkl/10.0.xxx/lib/32/libmkl_core.a/opt/intel/mkl/10.0.xxx/lib/32/libguide.so -lpthreadwhere is a linker, myprog.o is the user's object file, <strong>and</strong> xxx is the <strong>Intel</strong> MKLpackage number, for example, "039".Appropri<strong>at</strong>e <strong>Intel</strong> MKL libraries are listed first <strong>and</strong> followed by the system librarylibpthread.• In the link line, list library names (with absolute or rel<strong>at</strong>ive p<strong>at</strong>hs, if needed) precededwith -L, which indic<strong>at</strong>es where to search for binaries, <strong>and</strong> -I,which indic<strong>at</strong>es where to search for header files. Discussion of linking with <strong>Intel</strong> MKLlibraries employs this option.To link with the <strong>Intel</strong> MKL libraries, specify p<strong>at</strong>hs <strong>and</strong> libraries in the link line as shownbelow.5-3

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

Saved successfully!

Ooh no, something went wrong!