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

Building issue with mpi not found by the CMakeLists.txt #6050

Open
lhy11009 opened this issue Sep 29, 2024 · 3 comments
Open

Building issue with mpi not found by the CMakeLists.txt #6050

lhy11009 opened this issue Sep 29, 2024 · 3 comments

Comments

@lhy11009
Copy link
Contributor

Description

I am experiencing an issue with MPI detection after the recent changes to CMakeLists.txt. The build works fine in build_0, but build_1 fails to find mpi.h when I try to configure with CMake.

Steps to Reproduce

  1. Clone the repository.
  2. Build in the build_0 directory using an older version of CMakeLists.txt (this works).
  3. Build in the build_1 directory using the newer version of CMakeLists.txt.

Observed Behavior

  • The line CMAKE_CXX_COMPILER in CMakeCache.txt for build_1 is set to /usr/bin/c++ instead of the expected /usr/bin/mpicxx.
  • MPI_C_COMPILER and MPI_CXX_COMPILER remain UNINITIALIZED.

Differences in CMakeLists.txt

Here are the key differences between the two versions of CMakeLists.txt:

  • [List any specific lines or sections that changed and may impact MPI detection]

Environment

  • CMake version: 3.18.4
  • OS: Ubuntu 21.10
  • MPI version: 4.1.0

Additional Information

  • I have verified that both mpicc and mpicxx are available in /usr/bin/.
  • I have tried various configurations without success.

Any insights or guidance would be appreciated!

@lhy11009
Copy link
Contributor Author

Additional information: on the other system with these environments, it works:

CMake version: 3.20.5
OS: Ubuntu 22.04.4 LTS
MPI version: 4.1.5

@tjhei
Copy link
Member

tjhei commented Sep 30, 2024

Recent CMakeLists.txt changes were done by @bangerth, so he might have an idea.

@lhy11009
Copy link
Contributor Author

Thanks @tjhei. I tested building inside the dealii 9.5 docker today and it produces no error. So I am looking at the differences between these environments. I have an idea the environment setup might be the triggering instead of the compiler versions. Anyway, I'll let you know how that goes.

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

2 participants