Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

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

Open
vvedula22 opened this issue Sep 5, 2019 · 1 comment
Open

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

vvedula22 opened this issue Sep 5, 2019 · 1 comment
Assignees

Comments

@vvedula22
Copy link
Contributor

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
Copy link

updega2 commented Sep 11, 2019

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?

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

No branches or pull requests

4 participants