SimVascular / svFSI_archived

SimVascular svFSI
Other
4 stars 7 forks source link

CMake fails to find Fortran, MPI_Fortran, BLAS on Clusters #9

Open vvedula22 opened 5 years ago

vvedula22 commented 5 years ago

This is a weird behavior that happens when compiling svFSI on clusters. While CMake finds MPI_C and MPI_CXX correctly, MPI_Fortran and thereby, MPI are very sensitive to module environment. Likewise, FindBLAS fails to find Intel MKL and LAPACK/ScaLAPACK packages very often.

While the user can explicitly provide paths to C and CXX compilers during configuration, such options for Fortran and BLAS are not available. This leads to finding modules by trial and error until a particular combination works which is very annoying. Sometimes, using older versions of CMake helps.

Interestingly, the same module environment can be used to compile and install Trilinos which automatically finds Fortran, MPI and BLAS but fails in svFSI even using latest versions of CMake.

I am attaching a sample screen output from compiling svFSI on Stampede2. Note that mpicc and mpicxx are found correctly while mpif90 and BLAS fails. However, LD_LIBRARY_PATH clearly includes Intel MKL libraries and I was able to install Trilinos using the same module environ svFSI_CMake.log ment.

updega2 commented 5 years ago

Hey @vvedula22 , it sounds like a lot of these issues are due to the find_package command used by CMake. It is CMake's way of finding external packages. If it cannot find the package in a default location, it will complain. You can then specify the location of these packages with the provided CMake variables. Are you providing the locations of BLAS and LAPACK with CMake variables after CMake complains about them?