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

fix cmake underlinkage error #12478

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Conversation

tjhei
Copy link
Member

@tjhei tjhei commented Jun 19, 2021

The underlinkage MPI check under Ubuntu fails if MPI_CXX_LIBRARIES is
empty, which happens if you configure with CXX=mpicxx (even though you
should not).

In this situation, just disable this hack. Errors look like this:

CMake Error at cmake/modules/FindMPI.cmake:143 (LIST):
LIST GET given empty list
Call Stack (most recent call first):
cmake/macros/macro_find_package.cmake:27 (_FIND_PACKAGE)
cmake/configure/configure_1_mpi.cmake:28 (FIND_PACKAGE)
/a/CMakeFiles/CMakeTmp/evaluate_expression.tmp:1
(FEATURE_MPI_FIND_EXTERNAL)
cmake/macros/macro_evaluate_expression.cmake:30 (INCLUDE)
cmake/macros/macro_configure_feature.cmake:237 (EVALUATE_EXPRESSION)
cmake/configure/configure_1_mpi.cmake:81 (CONFIGURE_FEATURE)
cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
CMakeLists.txt:121 (VERBOSE_INCLUDE)

CMake Error at cmake/modules/FindMPI.cmake:144 (GET_FILENAME_COMPONENT):
GET_FILENAME_COMPONENT called with incorrect number of arguments
Call Stack (most recent call first):
cmake/macros/macro_find_package.cmake:27 (_FIND_PACKAGE)
cmake/configure/configure_1_mpi.cmake:28 (FIND_PACKAGE)
/a/CMakeFiles/CMakeTmp/evaluate_expression.tmp:1
(FEATURE_MPI_FIND_EXTERNAL)
cmake/macros/macro_evaluate_expression.cmake:30 (INCLUDE)
cmake/macros/macro_configure_feature.cmake:237 (EVALUATE_EXPRESSION)
cmake/configure/configure_1_mpi.cmake:81 (CONFIGURE_FEATURE)
cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
CMakeLists.txt:121 (VERBOSE_INCLUDE)

-- _mpi_libopen_pal_library not found! The call was:
-- FIND_LIBRARY(_mpi_libopen_pal_library NAMES open-pal HINTS
NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)

@tjhei
Copy link
Member Author

tjhei commented Jun 19, 2021

@tamiko FYI
reported in dealii/candi#186 (comment)

maybe a candidate for 9.3.1... ? :-(

@tjhei
Copy link
Member Author

tjhei commented Jun 19, 2021

related to #11478, fixes #12358

cmake/modules/FindMPI.cmake Outdated Show resolved Hide resolved
The underlinkage MPI check under Ubuntu fails if MPI_CXX_LIBRARIES is
empty, which happens if you configure with CXX=mpicxx (even though you
should not).

In this situation, just disable this hack. Errors look like this:

CMake Error at cmake/modules/FindMPI.cmake:143 (LIST):
  LIST GET given empty list
Call Stack (most recent call first):
  cmake/macros/macro_find_package.cmake:27 (_FIND_PACKAGE)
  cmake/configure/configure_1_mpi.cmake:28 (FIND_PACKAGE)
/a/CMakeFiles/CMakeTmp/evaluate_expression.tmp:1
(FEATURE_MPI_FIND_EXTERNAL)
  cmake/macros/macro_evaluate_expression.cmake:30 (INCLUDE)
  cmake/macros/macro_configure_feature.cmake:237 (EVALUATE_EXPRESSION)
  cmake/configure/configure_1_mpi.cmake:81 (CONFIGURE_FEATURE)
  cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
  CMakeLists.txt:121 (VERBOSE_INCLUDE)

CMake Error at cmake/modules/FindMPI.cmake:144 (GET_FILENAME_COMPONENT):
  GET_FILENAME_COMPONENT called with incorrect number of arguments
Call Stack (most recent call first):
  cmake/macros/macro_find_package.cmake:27 (_FIND_PACKAGE)
  cmake/configure/configure_1_mpi.cmake:28 (FIND_PACKAGE)
/a/CMakeFiles/CMakeTmp/evaluate_expression.tmp:1
(FEATURE_MPI_FIND_EXTERNAL)
  cmake/macros/macro_evaluate_expression.cmake:30 (INCLUDE)
  cmake/macros/macro_configure_feature.cmake:237 (EVALUATE_EXPRESSION)
  cmake/configure/configure_1_mpi.cmake:81 (CONFIGURE_FEATURE)
  cmake/macros/macro_verbose_include.cmake:19 (INCLUDE)
  CMakeLists.txt:121 (VERBOSE_INCLUDE)

-- _mpi_libopen_pal_library not found! The call was:
--     FIND_LIBRARY(_mpi_libopen_pal_library NAMES open-pal HINTS
NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
@tamiko tamiko merged commit 6c3c660 into dealii:master Jun 22, 2021
@tamiko
Copy link
Member

tamiko commented Jun 22, 2021

@tjhei Let's cherry-pick that onto the 9.3 branch.

@tjhei tjhei deleted the mpi_underlinkage_bug branch June 22, 2021 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants