Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loadbalancing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SLMS
loadbalancing
Commits
b35cd06e
Commit
b35cd06e
authored
Jan 27, 2021
by
Stephan Schulz
Browse files
Options
Downloads
Patches
Plain Diff
fix OpenMPI detection in CMake
parent
2b203541
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
tests/feature/CMakeLists.txt
+17
-9
17 additions, 9 deletions
tests/feature/CMakeLists.txt
with
19 additions
and
11 deletions
CMakeLists.txt
+
2
−
2
View file @
b35cd06e
...
...
@@ -57,9 +57,9 @@ project(ALL
set
(
CMAKE_MODULE_PATH
"
${
PROJECT_SOURCE_DIR
}
/cmake"
${
CMAKE_MODULE_PATH
}
)
if
(
CM_ALL_FORTRAN
)
find_package
(
MPI REQUIRED COMPONENTS CXX Fortran
)
find_package
(
MPI REQUIRED COMPONENTS
C
CXX Fortran
)
else
()
find_package
(
MPI REQUIRED COMPONENTS CXX
)
find_package
(
MPI REQUIRED COMPONENTS
C
CXX
)
endif
(
CM_ALL_FORTRAN
)
# Prepare the Config.cmake.in
...
...
This diff is collapsed.
Click to expand it.
tests/feature/CMakeLists.txt
+
17
−
9
View file @
b35cd06e
...
...
@@ -11,15 +11,23 @@ set(OUTPUTDIR .)
set
(
KNOWNGOOD
${
CMAKE_CURRENT_SOURCE_DIR
}
/knowngood
)
# check if openmpi variable in mpi.h is set to find out, if
# MPI version is openmpi based
include
(
CheckCSourceCompiles
)
check_c_source_compiles
(
"include <mpi.h>
file
(
WRITE
${
CMAKE_CURRENT_BINARY_DIR
}
/have_openmpi.c
"#include <mpi.h>
int main(void) {
#ifndef
_
OPENMPI
#ifndef OPEN
_
MPI
#error
#endif
return 0;
}"
HAVE_OPENMPI
)
}
"
)
try_compile
(
HAVE_OPENMPI
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
/have_openmpi.c
LINK_LIBRARIES MPI::MPI_C
OUTPUT_VARIABLE _try_out
)
if
(
NOT HAVE_OPENMPI
)
message
(
FATAL_ERROR
"DID NOT FIND OPENMPI
\n\n
${
_try_out
}
"
)
endif
()
include
(
FindUnixCommands
)
foreach
(
FEATURE
ALL_Staggered
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment