<?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 Cmake, Blas, lapack in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cmake-Blas-lapack/m-p/1550786#M35548</link>
    <description>Filling the required questions about the libraries I want to use and my OS from the intel site:&lt;BR /&gt;&amp;gt; &lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It gives me this link line:&lt;BR /&gt;${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a ${MKLROOT}/lib/libmkl_scalapack_ilp64.a -Wl,--start-group ${MKLROOT}/lib/libmkl_intel_ilp64.a ${MKLROOT}/lib/libmkl_sequential.a ${MKLROOT}/lib/libmkl_core.a ${MKLROOT}/lib/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group -lpthread -lm -ldl&lt;BR /&gt;&lt;BR /&gt;and this compiler options:&lt;BR /&gt;-I${MKLROOT}/include/mkl/intel64/ilp64 -i8 -I"${MKLROOT}/include"&lt;BR /&gt;&lt;BR /&gt;I also need mkl_spblas.f90, so I compiled it in a .o files:&lt;BR /&gt;ifort -fpp -I${MKLROOT}/include -w ${MKLROOT}/include/mkl_spblas.f90 -c -o mypath/mkl_spblas.o -Ofast -i8 -static&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I wrote this:&lt;BR /&gt;&lt;BR /&gt;set(Cmake_Fortran_FLAGS "-Ofast -i8")&lt;BR /&gt;&lt;BR /&gt;set(MKL_ARCH intel64)&lt;BR /&gt;set(MKL_THREADING sequential)&lt;BR /&gt;set(MKL_INTERFACE ilp64)&lt;BR /&gt;find_package(MKL CONFIG REQUIRED PATHS ${MKLROOT})&lt;BR /&gt;&lt;BR /&gt;#Home made Fortran module&lt;BR /&gt;add_library(Quantum_Ising_1D STATIC)&lt;BR /&gt;target_sources(Quantum_Ising_1D PUBLIC&lt;BR /&gt;/home/matteobacci/Desktop/Programmi/MODULO_02/executable_and_libraries/src_homemade/Quantum_Ising_1D.f90&lt;BR /&gt;)&lt;BR /&gt;target_link_libraries(Quantum_Ising_1D PUBLIC #MKL::MKL&lt;BR /&gt;mypath/arpack-ng/build/libarpackILP64.a&lt;BR /&gt;mypath/mkl_spblas.o&lt;BR /&gt;${MKLROOT}/lib/libmkl_blas95_ilp64.a&lt;BR /&gt;${MKLROOT}/lib/libmkl_lapack95_ilp64.a&lt;BR /&gt;$&amp;lt;LINK_GROUP:RESCAN, ${MKLROOT}/lib/libmkl_intel_ilp64.a, ${MKLROOT}/lib/libmkl_sequential.a, ${MKLROOT}/lib/libmkl_core.a, ${MKLROOT}/lib/libmkl_blacs_intelmpi_ilp64.a &amp;gt;&lt;BR /&gt;)&lt;BR /&gt;target_include_directories(Quantum_Ising_1D PUBLIC&lt;BR /&gt;${MKLROOT}/include/mkl/intel64/ilp64 BEFORE&lt;BR /&gt;${MKLROOT}/include AFTER&lt;BR /&gt;)&lt;BR /&gt;set_target_properties(Quantum_Ising_1D PROPERTIES&lt;BR /&gt;COMPILE_FLAGS "-fpp -static -lpthread -lm -ldl"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;I followed the official cmake documentation for the circular dependence:&lt;BR /&gt;&amp;gt; &lt;A href="https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:LINK_GROUP" target="_blank"&gt;https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:LINK_GROUP&lt;/A&gt;&lt;BR /&gt;to find out someone achieved the desired result in a different way:&lt;BR /&gt;&lt;A href="https://stackoverflow.com/questions/56200963/how-to-setup-mkl-on-linux-with-cmake?noredirect=1&amp;amp;lq=1" target="_blank"&gt;https://stackoverflow.com/questions/56200963/how-to-setup-mkl-on-linux-with-cmake?noredirect=1&amp;amp;lq=1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;They both work.&lt;BR /&gt;&lt;BR /&gt;This error always pops up, as if I'm configuring mkl_spblas wrong.&lt;BR /&gt;error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MKL_SPBLAS]&lt;BR /&gt;use mkl_spblas&lt;BR /&gt;------------^&lt;BR /&gt;&lt;BR /&gt;Do you know how to fix it?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Tue, 05 Dec 2023 21:13:48 GMT</pubDate>
    <dc:creator>Mattew</dc:creator>
    <dc:date>2023-12-05T21:13:48Z</dc:date>
    <item>
      <title>Cmake, Blas, lapack</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cmake-Blas-lapack/m-p/1550786#M35548</link>
      <description>Filling the required questions about the libraries I want to use and my OS from the intel site:&lt;BR /&gt;&amp;gt; &lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html" target="_blank"&gt;https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It gives me this link line:&lt;BR /&gt;${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a ${MKLROOT}/lib/libmkl_scalapack_ilp64.a -Wl,--start-group ${MKLROOT}/lib/libmkl_intel_ilp64.a ${MKLROOT}/lib/libmkl_sequential.a ${MKLROOT}/lib/libmkl_core.a ${MKLROOT}/lib/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group -lpthread -lm -ldl&lt;BR /&gt;&lt;BR /&gt;and this compiler options:&lt;BR /&gt;-I${MKLROOT}/include/mkl/intel64/ilp64 -i8 -I"${MKLROOT}/include"&lt;BR /&gt;&lt;BR /&gt;I also need mkl_spblas.f90, so I compiled it in a .o files:&lt;BR /&gt;ifort -fpp -I${MKLROOT}/include -w ${MKLROOT}/include/mkl_spblas.f90 -c -o mypath/mkl_spblas.o -Ofast -i8 -static&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I wrote this:&lt;BR /&gt;&lt;BR /&gt;set(Cmake_Fortran_FLAGS "-Ofast -i8")&lt;BR /&gt;&lt;BR /&gt;set(MKL_ARCH intel64)&lt;BR /&gt;set(MKL_THREADING sequential)&lt;BR /&gt;set(MKL_INTERFACE ilp64)&lt;BR /&gt;find_package(MKL CONFIG REQUIRED PATHS ${MKLROOT})&lt;BR /&gt;&lt;BR /&gt;#Home made Fortran module&lt;BR /&gt;add_library(Quantum_Ising_1D STATIC)&lt;BR /&gt;target_sources(Quantum_Ising_1D PUBLIC&lt;BR /&gt;/home/matteobacci/Desktop/Programmi/MODULO_02/executable_and_libraries/src_homemade/Quantum_Ising_1D.f90&lt;BR /&gt;)&lt;BR /&gt;target_link_libraries(Quantum_Ising_1D PUBLIC #MKL::MKL&lt;BR /&gt;mypath/arpack-ng/build/libarpackILP64.a&lt;BR /&gt;mypath/mkl_spblas.o&lt;BR /&gt;${MKLROOT}/lib/libmkl_blas95_ilp64.a&lt;BR /&gt;${MKLROOT}/lib/libmkl_lapack95_ilp64.a&lt;BR /&gt;$&amp;lt;LINK_GROUP:RESCAN, ${MKLROOT}/lib/libmkl_intel_ilp64.a, ${MKLROOT}/lib/libmkl_sequential.a, ${MKLROOT}/lib/libmkl_core.a, ${MKLROOT}/lib/libmkl_blacs_intelmpi_ilp64.a &amp;gt;&lt;BR /&gt;)&lt;BR /&gt;target_include_directories(Quantum_Ising_1D PUBLIC&lt;BR /&gt;${MKLROOT}/include/mkl/intel64/ilp64 BEFORE&lt;BR /&gt;${MKLROOT}/include AFTER&lt;BR /&gt;)&lt;BR /&gt;set_target_properties(Quantum_Ising_1D PROPERTIES&lt;BR /&gt;COMPILE_FLAGS "-fpp -static -lpthread -lm -ldl"&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;I followed the official cmake documentation for the circular dependence:&lt;BR /&gt;&amp;gt; &lt;A href="https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:LINK_GROUP" target="_blank"&gt;https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#genex:LINK_GROUP&lt;/A&gt;&lt;BR /&gt;to find out someone achieved the desired result in a different way:&lt;BR /&gt;&lt;A href="https://stackoverflow.com/questions/56200963/how-to-setup-mkl-on-linux-with-cmake?noredirect=1&amp;amp;lq=1" target="_blank"&gt;https://stackoverflow.com/questions/56200963/how-to-setup-mkl-on-linux-with-cmake?noredirect=1&amp;amp;lq=1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;They both work.&lt;BR /&gt;&lt;BR /&gt;This error always pops up, as if I'm configuring mkl_spblas wrong.&lt;BR /&gt;error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MKL_SPBLAS]&lt;BR /&gt;use mkl_spblas&lt;BR /&gt;------------^&lt;BR /&gt;&lt;BR /&gt;Do you know how to fix it?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 05 Dec 2023 21:13:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cmake-Blas-lapack/m-p/1550786#M35548</guid>
      <dc:creator>Mattew</dc:creator>
      <dc:date>2023-12-05T21:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cmake, Blas, lapack</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cmake-Blas-lapack/m-p/1550895#M35549</link>
      <description>&lt;P&gt;Since this is an MKL question, I will move this to the &lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/bd-p/oneapi-math-kernel-library" target="_blank" rel="noopener"&gt;MKL Community Forum&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 22:13:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cmake-Blas-lapack/m-p/1550895#M35549</guid>
      <dc:creator>Barbara_P_Intel</dc:creator>
      <dc:date>2023-12-05T22:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cmake, Blas, lapack</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cmake-Blas-lapack/m-p/1551377#M35561</link>
      <description>Solved.&lt;BR /&gt;For those who come here it was simply the .mod file:&lt;BR /&gt;I needed to put in the build directory (output directory of the file I'm building) rather than in the same one of the .so/.o file</description>
      <pubDate>Thu, 07 Dec 2023 07:45:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Cmake-Blas-lapack/m-p/1551377#M35561</guid>
      <dc:creator>Mattew</dc:creator>
      <dc:date>2023-12-07T07:45:27Z</dc:date>
    </item>
  </channel>
</rss>

