<?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 Re:An error occurs when linking mkl pardiso using cmake in linux. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1382799#M33129</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting our solution and glad to know that it worked.&lt;/P&gt;&lt;P&gt;As the issue is resolved we are closing this thread. Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Great Day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 09 May 2022 09:03:25 GMT</pubDate>
    <dc:creator>VidyalathaB_Intel</dc:creator>
    <dc:date>2022-05-09T09:03:25Z</dc:date>
    <item>
      <title>An error occurs when linking mkl pardiso using cmake in linux.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1381678#M33115</link>
      <description>&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="0" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;I am trying to compile a program that uses both the blas function and the pardiso function.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="2" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;However, it works fine on Windows, but a link error occurs on Linux.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="2" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;&lt;SPAN&gt;And if comment out pardiso in the code below, the link works fine, but if&amp;nbsp; use pardiso, a link error occurs.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="2" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;&lt;SPAN&gt;It seems to work well when using only blas, so when using pardiso, there seems to be additional work to be done, but I have no idea what it is.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="4" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;&lt;SPAN&gt;I am linking the static version library of mkl, and I am using Parallel Studio 2019 Update5 Cluster Edition.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="4" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;Below is my code.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="4" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;==========================================================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include "mkl.h"&lt;/P&gt;
&lt;P&gt;using namespace std;&lt;/P&gt;
&lt;P&gt;void gmatgvec_mkl(const double a[], const double b[], const int m, const int n, double c[])&lt;BR /&gt;{&lt;BR /&gt;const double alpha = 1.0;&lt;BR /&gt;const double beta = 0.0;&lt;/P&gt;
&lt;P&gt;if (m == 0 || n == 0) return;&lt;/P&gt;
&lt;P&gt;cblas_dgemv(CblasColMajor, CblasNoTrans,&lt;BR /&gt;m, n, alpha, &amp;amp;a[0], m, &amp;amp;b[0], 1, beta, &amp;amp;c[0], 1);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;int main(int argc, char* argv[])&lt;BR /&gt;{&lt;BR /&gt;cout &amp;lt;&amp;lt; "Hello CMake. - project 1" &amp;lt;&amp;lt; endl;&lt;/P&gt;
&lt;P&gt;double matA[2 * 2];&lt;BR /&gt;double vecB[2];&lt;BR /&gt;double vecC[2];&lt;/P&gt;
&lt;P&gt;matA[0] = 1.0;&lt;BR /&gt;matA[1] = 2.0;&lt;BR /&gt;matA[2] = 3.0;&lt;BR /&gt;matA[3] = 4.0;&lt;/P&gt;
&lt;P&gt;vecB[0] = 5.0;&lt;BR /&gt;vecB[1] = 6.0;&lt;/P&gt;
&lt;P&gt;gmatgvec_mkl(matA, vecB, 2, 2, vecC);&lt;/P&gt;
&lt;P&gt;cout &amp;lt;&amp;lt; "vecC[0] = " &amp;lt;&amp;lt; vecC[0] &amp;lt;&amp;lt; endl;&lt;BR /&gt;cout &amp;lt;&amp;lt; "vecC[1] = " &amp;lt;&amp;lt; vecC[1] &amp;lt;&amp;lt; endl;&lt;/P&gt;
&lt;P&gt;if (argc &amp;gt; 10) {&lt;BR /&gt;PARDISO(NULL, NULL, NULL,&lt;BR /&gt;NULL, NULL, NULL, NULL,&lt;BR /&gt;NULL, NULL, NULL, NULL,&lt;BR /&gt;NULL, NULL, NULL, NULL,&lt;BR /&gt;NULL);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="4" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;==========================================================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="4" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;Below is my cmake file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="4" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;==========================================================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;CMAKE_MINIMUM_REQUIRED (VERSION 2.8.12)&lt;/P&gt;
&lt;P&gt;IF(NOT WIN32)&lt;BR /&gt;SET(CMAKE_C_COMPILER "$ENV{HOME}/intel/bin/icc")&lt;BR /&gt;SET(CMAKE_CXX_COMPILER "$ENV{HOME}/intel/bin/icpc")&lt;/P&gt;
&lt;P&gt;SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -v")&lt;BR /&gt;SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")&lt;BR /&gt;ENDIF()&lt;/P&gt;
&lt;P&gt;PROJECT ("CMakeMKL")&lt;/P&gt;
&lt;P&gt;IF(WIN32)&lt;BR /&gt;SET(MKL_INCLUDE "C:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2019.5.281\\windows\\mkl\\include")&lt;BR /&gt;SET(MKL_LIBRARY "C:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2019.5.281\\windows\\mkl\\lib\\intel64")&lt;BR /&gt;SET(ICPC_LIBRARY "C:\\Program Files (x86)\\IntelSWTools\\compilers_and_libraries_2019.5.281\\windows\\compiler\\lib\\intel64")&lt;BR /&gt;ELSE()&lt;BR /&gt;SET(MKL_INCLUDE "$ENV{HOME}/intel/mkl/include")&lt;BR /&gt;SET(MKL_LIBRARY "$ENV{HOME}/intel/mkl/lib/intel64")&lt;BR /&gt;SET(ICPC_LIBRARY "$ENV{HOME}/intel/lib/intel64")&lt;BR /&gt;ENDIF()&lt;/P&gt;
&lt;P&gt;ADD_EXECUTABLE (${PROJECT_NAME}&lt;BR /&gt;CMakeProject1.cpp&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC&lt;BR /&gt;${MKL_INCLUDE}&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;IF(WIN32)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MKL_LIBRARY}\\mkl_intel_lp64.lib)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MKL_LIBRARY}\\mkl_intel_thread.lib)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MKL_LIBRARY}\\mkl_core.lib)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ICPC_LIBRARY}\\libiomp5md.lib)&lt;BR /&gt;ELSE()&lt;BR /&gt;#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath=${MKL_LIBRARY}")&lt;BR /&gt;#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath=${ICPC_LIBRARY}") &lt;BR /&gt;#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath-link=${MKL_LIBRARY}")&lt;BR /&gt;#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath-link=${ICPC_LIBRARY}")&lt;BR /&gt;#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--start-group ${MKL_LIBRARY}/libmkl_intel_lp64.a ${MKL_LIBRARY}/libmkl_intel_thread.a ${MKL_LIBRARY}/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl")&lt;/P&gt;
&lt;P&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MKL_LIBRARY}/libmkl_intel_lp64.a)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MKL_LIBRARY}/libmkl_intel_thread.a)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MKL_LIBRARY}/libmkl_core.a)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ICPC_LIBRARY}/libiomp5.a)&lt;/P&gt;
&lt;P&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} pthread)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} dl)&lt;BR /&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} m)&lt;BR /&gt;ENDIF()&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;===================================================&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="8" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;Below is the linker error message.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="10" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;==========================================================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;[1/2] Building CXX object CMakeFiles/CMakeMKL.dir/CMakeProject1.cpp.o&lt;BR /&gt;[2/2] Linking CXX executable CMakeMKL&lt;BR /&gt;FAILED: CMakeMKL &lt;BR /&gt;: &amp;amp;&amp;amp; /home/dbae/intel/bin/icpc -g -v -Wl,--no-undefined -rdynamic CMakeFiles/CMakeMKL.dir/CMakeProject1.cpp.o -o CMakeMKL /home/dbae/intel/mkl/lib/intel64/libmkl_intel_lp64.a /home/dbae/intel/mkl/lib/intel64/libmkl_intel_thread.a /home/dbae/intel/mkl/lib/intel64/libmkl_core.a /home/dbae/intel/lib/intel64/libiomp5.a -lpthread -ldl -lm &amp;amp;&amp;amp; :&lt;BR /&gt;icpc version 19.0.5.281 (gcc version 4.8.5 compatibility)&lt;BR /&gt;/home/dbae/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/mcpcom -mGLOB_em64t=TRUE -mP1OPT_version=19.0-intel64 -mGLOB_diag_file=CMakeFiles/CMakeMKL.dir/CMakeProject1.cpp.diag -mGLOB_long_size_64 -mGLOB_routine_pointer_size_64 -mP1OPT_print_version=FALSE -mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE -mGLOB_gcc_version=485 "-mGLOB_options_string=-g -v -Wl,--no-undefined -rdynamic -o CMakeMKL -lpthread -ldl -lm" -mGLOB_cxx_limited_range=FALSE -mCG_extend_parms=FALSE -mGLOB_compiler_bin_directory=/home/dbae/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64 -mP3OPT_emit_line_numbers -mGLOB_debug_target=GLOB_DEBUG_TARGET_ALL -mDEBUG_info_level=2 -mDEBUG_use_indirect_strings=TRUE -mIPOPT_ninl_debug_info=TRUE -mDEBUG_emit_dwarf_inline_info=TRUE -mDEBUG_debug_ranges=TRUE -mGLOB_debug_format=GLOB_DEBUG_FORMAT_DWARF40 -mGLOB_as_output_backup_file_name=/tmp/icpcGA3opZas_.s -mGLOB_dashboard_use_source_name -mIPOPT_activate -mGLOB_product_id_code=0x22006d90 -mP3OPT_use_mspp_call_convention -mP2OPT_subs_out_of_bound=FALSE -mP2OPT_disam_type_based_disam=2 -mP2OPT_disam_assume_ansi_c -mP2OPT_checked_disam_ansi_alias=TRUE -mGLOB_ansi_alias -mPGOPTI_value_profile_use=T -mGLOB_opt_report_use_source_name -mP2OPT_il0_array_sections=TRUE -mGLOB_offload_mode=1 -mP2OPT_offload_unique_var_string=icpc0174938581JqCV9F -mP2OPT_hlo -mP2OPT_hpo_rtt_control=0 -mIPOPT_args_in_regs=0 -mP2OPT_disam_assume_nonstd_intent_in=FALSE -mGLOB_imf_mapping_library=/home/dbae/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/libiml_attr.so -mP2OPT_hlo_embed_loopinfo -mPGOPTI_gen_threadsafe_level=0 -mIPOPT_link -mIPOPT_ipo_activate -mIPOPT_mo_activate -mIPOPT_source_files_list=/tmp/icpcslisxQwR0s -mIPOPT_mo_global_data -mIPOPT_link_script_file=/tmp/icpcscriptuZD6ce "-mIPOPT_cmdline_link="/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o" "-export-dynamic" "--eh-frame-hdr" "--build-id" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-m" "elf_x86_64" "-o" "CMakeMKL" "-L/home/dbae/intel/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/" "-L/lib/../lib64" "-L/lib/../lib64/" "-L/usr/lib/../lib64" "-L/usr/lib/../lib64/" "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../" "-L/lib64" "-L/lib/" "-L/usr/lib64" "-L/usr/lib" "--no-undefined" "CMakeFiles/CMakeMKL.dir/CMakeProject1.cpp.o" "/home/dbae/intel/mkl/lib/intel64/libmkl_intel_lp64.a" "/home/dbae/intel/mkl/lib/intel64/libmkl_intel_thread.a" "/home/dbae/intel/mkl/lib/intel64/libmkl_core.a" "/home/dbae/intel/lib/intel64/libiomp5.a" "-lpthread" "-ldl" "-L/home/dbae/intel/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin" "-Bstatic" "-limf" "-Bdynamic" "-lm" "-Bdynamic" "-Bstatic" "-limf" "-lsvml" "-lirng" "-Bdynamic" "-lstdc++" "-lm" "-Bstatic" "-lipgo" "-ldecimal" "--as-needed" "-Bdynamic" "-lcilkrts" "--no-as-needed" "-lstdc++" "-lgcc" "-lgcc_s" "-Bstatic" "-lirc" "-lsvml" "-Bdynamic" "-lc" "-lgcc" "-lgcc_s" "-Bstatic" "-lirc_s" "-Bdynamic" "-ldl" "-lc" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o" "/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o"" -mIPOPT_il_in_obj -mIPOPT_ipo_activate_warn=FALSE -mIPOPT_obj_output_file_name=/tmp/ipo_icpcrAJlQT.o -mIPOPT_whole_archive_fixup_file_name=/tmp/icpcwarchn1fqPv -mGLOB_linker_version=2.27 -mGLOB_linker=ld -mGLOB_driver_tempfile_name=/tmp/icpctempfileuXX82g -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_async_unwind_tables=TRUE -mGLOB_obj_output_file=/tmp/ipo_icpcrAJlQT.o -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_NONE -mP1OPT_source_file_name=ipo_out.c CMakeFiles/CMakeMKL.dir/CMakeProject1.cpp.o -mIPOPT_object_files=T -mIPOPT_assembly_files=/tmp/icpcalisUlmkeq -mIPOPT_generated_tempfiles=/tmp/icpcelisNDkoqb -mIPOPT_embedded_object_base_name=/tmp/icpceobj8tcvCW -mIPOPT_cmdline_link_new_name=/tmp/icpcllispX7EOH&lt;BR /&gt;ld /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtbegin.o -export-dynamic --eh-frame-hdr --build-id -dynamic-linker /lib64/ld-linux-x86-64.so.2 -m elf_x86_64 -o CMakeMKL -L/home/dbae/intel/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib --no-undefined CMakeFiles/CMakeMKL.dir/CMakeProject1.cpp.o /home/dbae/intel/mkl/lib/intel64/libmkl_intel_lp64.a /home/dbae/intel/mkl/lib/intel64/libmkl_intel_thread.a /home/dbae/intel/mkl/lib/intel64/libmkl_core.a /home/dbae/intel/lib/intel64/libiomp5.a -lpthread -ldl -L/home/dbae/intel/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin -Bstatic -limf -Bdynamic -lm -Bdynamic -Bstatic -limf -lsvml -lirng -Bdynamic -lstdc++ -lm -Bstatic -lipgo -ldecimal --as-needed -Bdynamic -lcilkrts --no-as-needed -lstdc++ -lgcc -lgcc_s -Bstatic -lirc -lsvml -Bdynamic -lc -lgcc -lgcc_s -Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/x86_64-redhat-linux/4.8.5/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crtn.o&lt;BR /&gt;/home/dbae/intel/mkl/lib/intel64/libmkl_core.a(pardiso_lp64.o): In function `mkl_pds_lp64_pardiso':&lt;BR /&gt;pardiso_lp64_h.f:(.text+0x18a): undefined reference to `mkl_pds_lp64_pds_get_omp_num_threads'&lt;BR /&gt;pardiso_lp64_h.f:(.text+0x198): undefined reference to `mkl_pds_lp64_pds_get_num_threads'&lt;BR /&gt;pardiso_lp64_h.f:(.text+0x1a4): undefined reference to `mkl_pds_lp64_pds_get_omp_num_threads'&lt;BR /&gt;pardiso_lp64_h.f:(.text+0x1b0): undefined reference to `mkl_pds_lp64_pds_get_num_threads'&lt;BR /&gt;pardiso_lp64_h.f:(.text+0x31b): undefined reference to `mkl_pds_lp64_get_dynamic_pardiso'&lt;BR /&gt;pardiso_lp64_h.f:(.text+0x351): undefined reference to `mkl_pds_lp64_pardiso_max_threads'&lt;BR /&gt;/home/dbae/intel/mkl/lib/intel64/libmkl_core.a(pds_pardiso_lp64.o): In function `mkl_pds_lp64_dist_pardiso':&lt;BR /&gt;pds_pardiso.c:(.text+0x828): undefined reference to `mkl_pds_lp64_pds_refinement_real'&lt;BR /&gt;pds_pardiso.c:(.text+0x8ed): undefined reference to `mkl_pds_lp64_pds_refinement_cmplx'&lt;BR /&gt;/home/dbae/intel/mkl/lib/intel64/libmkl_core.a(pds_factorization_lp64.o): In function `mkl_pds_lp64_pds_factorization':&lt;BR /&gt;pds_factorization.c:(.text+0x25): undefined reference to `mkl_pds_lp64_pds_copy_a2l_value_omp_cmplx'&lt;BR /&gt;pds_factorization.c:(.text+0x2f): undefined reference to `mkl_pds_lp64_pds_copy_a2l_value_omp_real'&lt;BR /&gt;pds_factorization.c:(.text+0x86): undefined reference to `mkl_pds_lp64_pds_fct_omp_driver_cmplx'&lt;BR /&gt;pds_factorization.c:(.text+0x95): undefined reference to `mkl_pds_lp64_pds_fct_omp_driver_real'&lt;BR /&gt;/home/dbae/intel/mkl/lib/intel64/libmkl_core.a(pardiso_c_lp64.o): In function `mkl_pds_lp64_pardiso_c':&lt;BR /&gt;pardiso_c.c:(.text+0x8df9): undefined reference to `mkl_pds_lp64_convert_to_vbsr'&lt;BR /&gt;/home/dbae/intel/mkl/lib/intel64/libmkl_core.a(kernel_dispatch_lp64.o): In function `mkl_pds_lp64_kernel_dispatch':&lt;BR /&gt;kernel_dispatch.c:(.text+0x2ff): undefined reference to `mkl_pds_lp64_pds_slv_nrhs_seq_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0x37f): undefined reference to `mkl_pds_lp64_pds_slv_nrhs_par_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0x408): undefined reference to `mkl_pds_lp64_pds_slv_nrhs_seq_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0x485): undefined reference to `mkl_pds_lp64_pds_slv_nrhs_par_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0x57c): undefined reference to `mkl_pds_lp64_iter_ref_seq_nrhs_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0x5fa): undefined reference to `mkl_pds_lp64_iter_ref_par_nrhs_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0x692): undefined reference to `mkl_pds_lp64_iter_ref_seq_nrhs_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0x70d): undefined reference to `mkl_pds_lp64_iter_ref_par_nrhs_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0x80d): undefined reference to `mkl_pds_lp64_pds_sym_indef_diag_fct_slv_seq_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0x8ad): undefined reference to `mkl_pds_lp64_pds_sym_indef_bk_fct_slv_seq_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0x95b): undefined reference to `mkl_pds_lp64_pds_sym_indef_diag_fct_slv_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0x9fb): undefined reference to `mkl_pds_lp64_pds_sym_indef_bk_fct_slv_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0xaa8): undefined reference to `mkl_pds_lp64_pds_her_pos_fct_slv_seq_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0xb48): undefined reference to `mkl_pds_lp64_pds_her_pos_fct_slv_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0xc09): undefined reference to `mkl_pds_lp64_pds_unsym_fct_slv_seq_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0xcbd): undefined reference to `mkl_pds_lp64_pds_unsym_fct_slv_cmplx'&lt;BR /&gt;kernel_dispatch.c:(.text+0xd60): undefined reference to `mkl_pds_lp64_pds_sym_pos_fct_slv_seq_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0xdf6): undefined reference to `mkl_pds_lp64_pds_sym_pos_fct_slv_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0xea2): undefined reference to `mkl_pds_lp64_pds_unsym_fct_slv_seq_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0xf38): undefined reference to `mkl_pds_lp64_pds_unsym_fct_slv_t_seq_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0xfd7): undefined reference to `mkl_pds_lp64_pds_unsym_fct_slv_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0x106d): undefined reference to `mkl_pds_lp64_pds_unsym_fct_slv_t_real'&lt;BR /&gt;kernel_dispatch.c:(.text+0x111e): undefined reference to `mkl_pds_lp64_pds_sym_indef_diag_fct_slv_seq_real'&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="10" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="10" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="10" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="10" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="10" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;==========================================================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="10" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;No matter how much I google it, it doesn't fix it.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="11" data-number-of-phrases="12"&gt;&lt;SPAN class="Q4iAWc"&gt;please help me please!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 09:59:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1381678#M33115</guid>
      <dc:creator>Donghee</dc:creator>
      <dc:date>2022-05-04T09:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: An error occurs when linking mkl pardiso using cmake in linux.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1381978#M33121</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;I&gt;but a link error occurs on Linux.&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;I could reproduce the issue from my end with the provided CMake file.&lt;/P&gt;
&lt;P&gt;Since the issue comes during the linking stage, I tried modifying your CMakeLists.txt at the target_link_libraries command as shown below (you can comment out the remaining target_link_libraries commands (for Linux) and just insert this single line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;TARGET_LINK_LIBRARIES(${PROJECT_NAME} "-Wl,--start-group" ${MKL_LIBRARY}/libmkl_intel_lp64.a ${MKL_LIBRARY}/libmkl_intel_thread.a ${MKL_LIBRARY}/libmkl_core.a "-Wl,--end-group -liomp5 -lpthread -lm -ldl")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After the above change, it works successfully. I don't see the linking errors which we saw before.&lt;/P&gt;
&lt;P&gt;Here is the output :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VidyalathaB_Intel_0-1651738965910.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/29116i2B84F797231010D2/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="VidyalathaB_Intel_0-1651738965910.png" alt="VidyalathaB_Intel_0-1651738965910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try it and let me know if you still face any issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vidya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 08:25:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1381978#M33121</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-05-05T08:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: An error occurs when linking mkl pardiso using cmake in linux.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1382783#M33127</link>
      <description>&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="0" data-number-of-phrases="3"&gt;&lt;SPAN class="Q4iAWc"&gt;Thank you so much Vidya!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="ko" data-phrase-index="2" data-number-of-phrases="3"&gt;&lt;SPAN class="Q4iAWc"&gt;I'm very happy that the problem that has been going on for several weeks has been resolved!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 08:16:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1382783#M33127</guid>
      <dc:creator>Donghee</dc:creator>
      <dc:date>2022-05-09T08:16:49Z</dc:date>
    </item>
    <item>
      <title>Re:An error occurs when linking mkl pardiso using cmake in linux.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1382799#M33129</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting our solution and glad to know that it worked.&lt;/P&gt;&lt;P&gt;As the issue is resolved we are closing this thread. Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Great Day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 May 2022 09:03:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/An-error-occurs-when-linking-mkl-pardiso-using-cmake-in-linux/m-p/1382799#M33129</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-05-09T09:03:25Z</dc:date>
    </item>
  </channel>
</rss>

