Compiling Pardiso_MKL module with new cmake

58 views
Skip to first unread message

Susan Alexis Brown

unread,
Feb 26, 2025, 9:55:56 AMFeb 26
to ProjectChrono
Hello,

Following the update to modern cmake I am having an issue configuring with the Pardiso module. The previous update posted Feb 16 noted configuration issues
using both Chrono::PardisoMKL and Chrono::Mumps 
however even without the Mumps module enabled the configuration does not correctly identify the MKL directory. Indeed, rather than two directories (MKL_INCLUDE_DIR, and MKL_RT_LIBRARY) only one is given (MKL_DIR) which is not reflected in the current installation guide. 

Attempts to direct this variable to any of the MKL subdirectories (within \opt\intel\oneapi\mkl) fail. 

Please advise. 

Thanks!
Alexis

Radu Serban

unread,
Feb 26, 2025, 10:04:34 AMFeb 26
to ProjectChrono

Hi Alexis,

 

If you use cmake-gui and hover over MKL_DIR you will see the description of this variable: “The directory containing a CMake configuration file for MKL”.

So, you should set this to something like:

  • (Windows) C:/Program Files (x86)/Intel/oneAPI/mkl/2023.0.0/lib/cmake/mkl
  • (Linux) /opt/intel/oneapi/mkl/latest/lib/cmake/mkl

 

We resolved the problem (mentioned in my Feb 16 post) with having both MUMPS and MKL enabled at the same time.

 

We will update the installation page when we get a chance.

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/2e0e6e6f-bcd6-4f2f-aa81-1fff835efd40n%40googlegroups.com.

Susan Alexis Brown

unread,
Feb 26, 2025, 10:18:35 AMFeb 26
to ProjectChrono
I understand, this solved my issue, thank you!

Susan Alexis Brown

unread,
Feb 26, 2025, 11:27:08 AMFeb 26
to ProjectChrono
Apologies, a follow up issue.

Although the chrono build compiled without issue, configuring a project which uses Pardiso_MKL gives the following error:

  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable MKL_ROOT is set to:

    /opt/intel/oneapi/mkl/2024.0/lib/cmake/mkl/../../../

  For compatibility, CMake is ignoring the variable.

and does not configure with Pardiso. Furthermore, the MKL_DIR variable is once thrown as not found.

What am I missing here?

Susan Alexis Brown

unread,
Feb 26, 2025, 1:00:13 PMFeb 26
to ProjectChrono
Follow up, it does compile with MKL after I re-define the path in the configuration (which it seems I should not have to do?), but does not compile due not finding the chrono files. This seems unrelated, but I am doing this with a basic demo file, so it should run.

[ 50%] Building CXX object CMakeFiles/demo_fea.dir/demo_FEA_basic.cpp.o
/home/sab/workspace/demos/demo_fea/demo_FEA_basic.cpp:19:10: fatal error: chrono/physics/ChSystemSMC.h: No such file or directory
   19 | #include "chrono/physics/ChSystemSMC.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/demo_fea.dir/build.make:76: CMakeFiles/demo_fea.dir/demo_FEA_basic.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/demo_fea.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2


Susan Alexis Brown

unread,
Feb 26, 2025, 1:10:40 PMFeb 26
to ProjectChrono
Follow up follow up it works fine, it was just an error in my cmake file. Sorry for the spam!

Radu Serban

unread,
Feb 27, 2025, 8:27:09 AMFeb 27
to ProjectChrono

No worries, Alexis.

We always encourage users to start with one of the “template” projects we distribute with Chrono and only once they get that to build fine, move to configuring and building their own project.

Reply all
Reply to author
Forward
0 new messages