Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pardiso Interface Compile Failure #54

Open
wgledbe opened this issue Apr 16, 2024 · 1 comment
Open

Pardiso Interface Compile Failure #54

wgledbe opened this issue Apr 16, 2024 · 1 comment

Comments

@wgledbe
Copy link

wgledbe commented Apr 16, 2024

Summary

Pardiso interface fails to compile on Windows with the following error:

[build] src\Solvers\PardisoInterface.h:40:17: error: cannot initialize a parameter of type 'const long long *' with an rvalue of type 'int *'
[build]    40 |             pt, &maxfct, &mnum, &type, &phase, &n, a, ia, ja, perm, &nrhs, iparm, &msglvl, b, x, &error);
[build]       |                 ^~~~~~~
[build] src\Solvers\PardisoInterface.h:193:55: note: in instantiation of member function 'Eigen::internal::pardiso_run_selector<int>::run' requested here
[build]   193 |         internal::pardiso_run_selector<StorageIndex>::run(m_pt,
[build]       |                                                       ^
[build] src\Solvers\PardisoInterface.h:135:7: note: in instantiation of member function 'Eigen::PardisoImpl<Eigen::PardisoLDLT<Eigen::SparseMatrix<double, 1>>>::pardisoRelease' requested here
[build]   135 |       pardisoRelease();
[build]       |       ^
[build] src\Solvers\PardisoInterface.h:679:9: note: in instantiation of member function 'Eigen::PardisoImpl<Eigen::PardisoLDLT<Eigen::SparseMatrix<double, 1>>>::~PardisoImpl' requested here
[build]   679 |   class PardisoLDLT : public PardisoImpl<PardisoLDLT<MatrixType, Options>> {
[build]       |         ^
[build] C:/Program Files (x86)/Intel/oneAPI/mkl/latest/include\mkl_pardiso.h:33:52: note: passing argument to parameter 'maxfct' here
[build]    33 | void pardiso( _MKL_DSS_HANDLE_t pt, const MKL_INT *maxfct, const MKL_INT *mnum,
[build]       |                                                    ^
[build] 4 warnings and 1 error generated.

MKL Versions attempted:

  • 2023.1.0
  • 2024.1

Compilers attempted:

  • Clang 17
  • Clang 18

Investigations

The internal type MKL_INT is probably being set to long long int rather than int, causing the arguments to ::pardiso to be const long long int * rather than const int *. Seems to be triggered by the MKL_ILP64 preprocessor definition.

@wgledbe
Copy link
Author

wgledbe commented Apr 16, 2024

Could be because I'm trying to link against CMake target MKL::MKL rather than use MKL_LIBRARIES and MKL_INCLUDE_DIRS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant