Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Leibner
dune-common
Commits
3ec24af8
Commit
3ec24af8
authored
9 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] Don't test for recent enough MPI version
We require MPI 2.1 anyway and nobody has reported problems.
parent
47830f03
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/DuneMPI.cmake
+0
-31
0 additions, 31 deletions
cmake/modules/DuneMPI.cmake
config.h.cmake
+2
-6
2 additions, 6 deletions
config.h.cmake
with
2 additions
and
37 deletions
cmake/modules/DuneMPI.cmake
+
0
−
31
View file @
3ec24af8
...
...
@@ -42,37 +42,6 @@ if(MPI_C_FOUND)
dune_register_package_flags
(
COMPILE_DEFINITIONS
"ENABLE_MPI=1;MPICH_SKIP_MPICXX;MPIPP_H"
INCLUDE_DIRS
"
${
MPI_DUNE_INCLUDE_PATH
}
"
LIBRARIES
"
${
MPI_DUNE_LIBRARIES
}
"
)
# Check whether the MPI-2 standard is supported
include
(
CMakePushCheckState
)
include
(
CheckFunctionExists
)
include
(
CheckCXXSourceCompiles
)
cmake_push_check_state
()
set
(
CMAKE_REQUIRED_LIBRARIES
${
CMAKE_REQUIRED_LIBRARIES
}
;
${
MPI_DUNE_LIBRARIES
}
)
set
(
CMAKE_REQUIRED_DEFINITIONS
${
CMAKE_REQUIRED_DEFINITIONS
}
"-DENABLE_MPI=1 -DMPICH_SKIP_MPICXX -DMPIPP_H"
)
set
(
CMAKE_REQUIRED_INCLUDES
${
CMAKE_REQUIRED_INCLUDES
}
;
${
MPI_DUNE_INCLUDE_PATH
}
)
check_function_exists
(
MPI_Finalized MPI_2
)
# proper version check
check_cxx_source_compiles
(
"
#include <mpi.h>
#if !((MPI_VERSION > 2) || (MPI_VERSION == 2 && MPI_SUBVERSION >= 1))
fail with a horribe compilation error due to old MPI version
#endif
int main(int argc, char** argv)
{
MPI_Init(&argc,&argv);
MPI_Finalize();
}
"
MPI_VERSION_SUPPORTED
)
cmake_pop_check_state
()
if
(
NOT MPI_VERSION_SUPPORTED
)
message
(
FATAL_ERROR
"Your MPI implementation is too old. Please upgrade to an MPI-2.1 compliant version."
)
endif
()
endif
(
MPI_C_FOUND
)
# adds MPI flags to the targets
...
...
This diff is collapsed.
Click to expand it.
config.h.cmake
+
2
−
6
View file @
3ec24af8
...
...
@@ -38,9 +38,7 @@
/* Define to 1 if you have the <malloc.h> header file. */
// Not used!
#cmakedefine01 HAVE_MALLOC_H
/* Define if you have the MPI library. This is only true if MPI was found by
configure _and_ if the application uses the
DUNEMPICPPFLAGS
(
or the
deprecated MPI_CPPFLAGS
)
*/
/* Define if you have the MPI library. */
#cmakedefine HAVE_MPI ENABLE_MPI
/* Define if you have the GNU GMP library. The value should be ENABLE_GMP
...
...
@@ -56,9 +54,6 @@
/* Define to 1 if you have <sys/mman.h>. */
#cmakedefine HAVE_SYS_MMAN_H 1
/* Define to 1 if the MPI2 Standard is supported */
#cmakedefine MPI_2 1
/* begin private */
/* Name of package */
...
...
@@ -96,6 +91,7 @@
#define HAVE_NOEXCEPT_SPECIFIER 1
#define HAVE_STD_DECLVAL 1
#define HAVE_KEYWORD_FINAL 1
#define MPI_2 1
/* Define to 1 if the compiler properly supports testing for operator[] */
#cmakedefine HAVE_IS_INDEXABLE_SUPPORT 1
...
...
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
register
or
sign in
to comment