./setup does not find MPI any more

25 views
Skip to first unread message

reut...@gmail.com

unread,
Mar 24, 2025, 10:23:41 AMMar 24
to dirac-users
Hi,

running "./setup --mpi --int64 --mkl=sequential" with Dirac25 leads to:

-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_WORKS)
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND MPI_Fortran_FOUND)
-- Configuring incomplete, errors occurred!

Doing the same in an older directory with Dirac22 results in:

-- Found MPI_C: /a_path_to/bin/mpicc (found version "3.1")
-- Found MPI_CXX: /a_path_to/bin/mpicxx (found version "3.1")
-- Found MPI_Fortran: /a_path_to/bin/mpif90 (found version "3.1")
-- Found MPI: TRUE (found version "3.1")

The used versions are GCC 13.3.0, Open MPI 5.0.7, Cmake 3.31.6

The issue does only occur with "--mkl=sequential" (or "--mkl=parallel"). Leaving this out does succeed even in Dirac25. Did the behavior of "--mkl=…" change?

-- Reuti

reut...@gmail.com

unread,
Mar 26, 2025, 8:18:53 AMMar 26
to dirac-users
The original error and title of this thread is a little bit misleading.

I missed that "--mkl=…" is meant only to be used for Intel compilers. In DIRAC22 it’s filtered out automatically in ./setup for this reason (up to the linking stage during build), but not in DIRAC25’s setup which led to the decribed error as gfortran does not know anything about this argument. An error output stating this mismatch would be nice during ./setup.

For DIRAC22 I  specified at that time all libraries by hand in --extra-fc-flags/--extra-cc-flags/--explicit-libs as I wasn’t aware that cmake will detect the MKL libraries for the gcc-case on it’s own already. Depending whether someone wants threaded or sequential use of MKL, one can adjust "cmake/downloaded/autocmake_math_libs.cmake" to get plain serial MKL, i.e. to change "set(_thread_lib mkl_gnu_thread)" to "set(_thread_lib mkl_sequential)".

For DIRAC25 I’m happy with the autodetection by cmake with the above adjustment, no further action required.

-- Reuti
Reply all
Reply to author
Forward
0 new messages