<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hello Per, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983713#M17604</link>
    <description>&lt;P&gt;Hello Per,&lt;/P&gt;

&lt;P&gt;It looks similiar problem as the one in &lt;A href="http://software.intel.com/en-us/articles/symbol-lookup-error-when-linking-intel-mkl-with-gcc-on-ubuntu"&gt;http://software.intel.com/en-us/articles/symbol-lookup-error-when-linking-intel-mkl-with-gcc-on-ubuntu&lt;/A&gt;.&amp;nbsp; Some ubuntu and&amp;nbsp;GCC have the issue, some have not.&lt;/P&gt;

&lt;P&gt;You may try to add the compiler option : -Wl,--no-as-needed. &amp;nbsp; for example&lt;/P&gt;

&lt;P&gt;g++ -Wall -o test.exe test.cpp &lt;STRONG&gt;-Wl,--no-as-needed &lt;/STRONG&gt;-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -ldl -lpthread -lm&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2014 01:00:21 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2014-02-14T01:00:21Z</dc:date>
    <item>
      <title>Problem linking MKL with pthread and gomp</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983710#M17601</link>
      <description>&lt;P&gt;A minimal test program:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;#include "mkl_lapacke.h"&lt;/P&gt;

	&lt;P&gt;int main(int argc, char** argv)&lt;BR /&gt;
		{&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp; float a = 0.5f;&lt;BR /&gt;
		&amp;nbsp;&amp;nbsp; LAPACKE_slasrt('I', 1, &amp;amp;a);&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&amp;nbsp; return 0;&lt;BR /&gt;
		}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I used the "Library Link Line Advisor" to get the linker command line, but it still fails:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;$ g++ -Wall -o test.exe test.cpp -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -ldl -lpthread -lm&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_core.so: undefined reference to `pthread_mutex_trylock'&lt;BR /&gt;
		collect2: error: ld returned 1 exit status&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;$ g++ -Wall -o test.exe test.cpp -lmkl_intel_lp64 -lmkl_core -lmkl_gnu_thread -ldl -lpthread -lm -lgomp&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_end'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_thread_num'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_end_nowait'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_num_threads'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_num_procs'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_ordered_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_atomic_end'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_core.so: undefined reference to `pthread_mutex_trylock'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_name_end'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_single_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_nested'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_in_parallel'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_end'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_max_threads'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_end_nowait'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_set_nested'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_static_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_dynamic_next'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_name_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_ordered_end'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_dynamic_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_end'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_next'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_atomic_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_barrier'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_sections_start'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_dynamic_next'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_static_next'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_dynamic_start'&lt;BR /&gt;
		collect2: error: ld returned 1 exit status&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;$ g++ -o test.exe test.cpp -lmkl_intel_lp64 -lmkl_core -lmkl_intel_thread -ldl -lpthread -lm -liomp5&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ok_to_fork'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_single'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_ordered'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_thread_num'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_barrier'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_threads'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_num_procs'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_4'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_reduce_nowait'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_critical'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_fini_8'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx8_add'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_add'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_serialized_parallel'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_critical'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_8'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `ompc_set_nested'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_8u'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_core.so: undefined reference to `pthread_mutex_trylock'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_nested'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_max'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_in_parallel'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_push_num_threads'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_reduce_nowait'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `omp_get_max_threads'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_init_4'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_serialized_parallel'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_flush'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_single'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_next_8'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float8_add'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_float4_max'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_master'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_dispatch_init_4'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_global_thread_num'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_end_ordered'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_fork_call'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_fixed8_add'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_for_static_fini'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_master'&lt;BR /&gt;
		/opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/libmkl_intel_thread.so: undefined reference to `__kmpc_atomic_cmplx4_add'&lt;BR /&gt;
		collect2: error: ld returned 1 exit status&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;$ gcc -v&lt;BR /&gt;
		Using built-in specs.&lt;BR /&gt;
		COLLECT_GCC=gcc&lt;BR /&gt;
		COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper&lt;BR /&gt;
		Target: x86_64-linux-gnu&lt;BR /&gt;
		Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu&lt;BR /&gt;
		Thread model: posix&lt;BR /&gt;
		gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Any advice on how to do this is appreciated.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2014 10:03:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983710#M17601</guid>
      <dc:creator>Per_Z_</dc:creator>
      <dc:date>2014-02-13T10:03:54Z</dc:date>
    </item>
    <item>
      <title>I couldn't reproduce your</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983711#M17602</link>
      <description>&lt;P&gt;I couldn't reproduce your problem. I'm using GCC 4.8.1.&lt;/P&gt;

&lt;P&gt;Please check if these env-variables are set properly: INCLUDE, CPATH, LIBRARY_PATH.&lt;/P&gt;

&lt;P&gt;Also, since you've got Intel Compsoer XE 2013 SP1, you can try to build the code using Intel compiler (icc). If it builds fine then it must be a problem with your GCC.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2014 18:20:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983711#M17602</guid>
      <dc:creator>Zhang_Z_Intel</dc:creator>
      <dc:date>2014-02-13T18:20:12Z</dc:date>
    </item>
    <item>
      <title>You might add -v to your g++</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983712#M17603</link>
      <description>&lt;P&gt;You might add -v to your g++ command to get more insight about library paths in use, and check that the OpenMP libraries are present on those paths. &amp;nbsp;One would expect to need a -L specification for the directory including libiomp5.o when using g++ (as Zhang indicated, that should not be required with icpc). &amp;nbsp;I think it would be better to place -lpthread after -liomp5 or -lgomp, and g++ should not require -lm.&lt;/P&gt;

&lt;P&gt;If your libgomp installation is too far off from whatever libmkl_gnu_thread expects, I suppose that could pose a problem.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2014 18:41:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983712#M17603</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2014-02-13T18:41:03Z</dc:date>
    </item>
    <item>
      <title>Hello Per,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983713#M17604</link>
      <description>&lt;P&gt;Hello Per,&lt;/P&gt;

&lt;P&gt;It looks similiar problem as the one in &lt;A href="http://software.intel.com/en-us/articles/symbol-lookup-error-when-linking-intel-mkl-with-gcc-on-ubuntu"&gt;http://software.intel.com/en-us/articles/symbol-lookup-error-when-linking-intel-mkl-with-gcc-on-ubuntu&lt;/A&gt;.&amp;nbsp; Some ubuntu and&amp;nbsp;GCC have the issue, some have not.&lt;/P&gt;

&lt;P&gt;You may try to add the compiler option : -Wl,--no-as-needed. &amp;nbsp; for example&lt;/P&gt;

&lt;P&gt;g++ -Wall -o test.exe test.cpp &lt;STRONG&gt;-Wl,--no-as-needed &lt;/STRONG&gt;-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -ldl -lpthread -lm&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2014 01:00:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Problem-linking-MKL-with-pthread-and-gomp/m-p/983713#M17604</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-02-14T01:00:21Z</dc:date>
    </item>
  </channel>
</rss>

