cea-hpc / wi4mpi

Wrapper interface for MPI
BSD 3-Clause "New" or "Revised" License
80 stars 15 forks source link

wi4mpi command doesn't work with different installations of MPI #48

Closed laurent-nguyen closed 8 months ago

laurent-nguyen commented 1 year ago

See with OpenMPI and IntelOneAPI, it seems wi4mpi command set paths (with lib or lib64). But, the MP installations can be different along the way there are packaged (manually compiled or Fedora packaging for example).

I suggest to detect if ${MPI_ROOT}/lib/libmpi.so does exist, otherwise try with ${MPI_ROOT}/lib64/libmpi.so.

adrien-cotte commented 1 year ago

Obviously... Thanks for your feedback!

kevin-juilly commented 9 months ago

In Fedora (and other Red Hat related distribution), the lib64 is part of the prefix (/usr/lib64/openmpi). If someone manually compiles an mpi and does not use ${MPI_ROOT}/lib, they probably overrided libdir at configure time. It means it can be anything so it's on them to properly export WI4MPIRUN* variables.

But I still did the work, refactoring the script as a bonus.