Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit c7b8f81f authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Added cmake flags for openMP and MPI. Now, ENABLE_PARALLEL_DOMAIN requires ENABLE_MPI.

parent 0362b266
...@@ -16,12 +16,35 @@ endif () ...@@ -16,12 +16,35 @@ endif ()
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# some options to control the build process # some options to control the build process
option(ENABLE_PARALLEL_DOMAIN "Use parallel domain decomposition" false) option(ENABLE_MPI "Compile with MPI compiler and library" false)
option(ENABLE_UMFPACK "Enable support for the UMFPACK solver" true) option(ENABLE_UMFPACK "Enable support for the UMFPACK solver" true)
option(ENABLE_EXTENSIONS "Use extensions for AMDiS" false) option(ENABLE_EXTENSIONS "Use extensions for AMDiS" false)
option(ENABLE_HYPRE "Use HYPRE AMG solver" false) option(ENABLE_HYPRE "Use HYPRE AMG solver" false)
option(ENABLE_PNG "Use png reader/writer" false) option(ENABLE_PNG "Use png reader/writer" false)
option(ENABLE_SEQ_PETSC "Use sequential PETSc solvers" false)
include(CMakeDependentOption)
cmake_dependent_option(ENABLE_PARALLEL_DOMAIN
"Use parallel domain decomposition" true
"ENABLE_MPI" false)
# additional options for parallel_domain
# {
include(CMakeDependentOption)
cmake_dependent_option(ENABLE_ZOLTAN
"Add support for the Parallel Partitioning suite Zoltan" false
"ENABLE_PARALLEL_DOMAIN" false)
include(CMakeDependentOption)
cmake_dependent_option(ENABLE_PARALLEL_SOLVERS
"Add some problem dependent solver, e.g. Feti, Navier-Stokes and Cahn-Hilliard" true
"ENABLE_PARALLEL_DOMAIN" false)
include(CMakeDependentOption)
cmake_dependent_option(ENABLE_BDDCML
"Add support for the BDDCML library" false
"ENABLE_PARALLEL_DOMAIN" false)
# }
# enable/disable some more features # enable/disable some more features
option(ENABLE_COMPRESSION "Use output compression for vtu and arh files" true) option(ENABLE_COMPRESSION "Use output compression for vtu and arh files" true)
...@@ -33,6 +56,12 @@ mark_as_advanced(ENABLE_REINIT) ...@@ -33,6 +56,12 @@ mark_as_advanced(ENABLE_REINIT)
option(ENABLE_COMPOSITE_FEM "Compile compositeFEM library" true) option(ENABLE_COMPOSITE_FEM "Compile compositeFEM library" true)
mark_as_advanced(ENABLE_COMPOSITE_FEM) mark_as_advanced(ENABLE_COMPOSITE_FEM)
option(ENABLE_OPENMP "Compile with OpenMP flags. (Experimental)" false)
mark_as_advanced(ENABLE_OPENMP)
option(ENABLE_SEQ_PETSC "Use sequential PETSc solvers" false)
mark_as_advanced(ENABLE_SEQ_PETSC)
option(BUILD_SHARED_LIBS "Build all libraries as shared or static, default: shared" true) option(BUILD_SHARED_LIBS "Build all libraries as shared or static, default: shared" true)
mark_as_advanced(BUILD_SHARED_LIBS) mark_as_advanced(BUILD_SHARED_LIBS)
......
if (ENABLE_PARALLEL_DOMAIN) if (ENABLE_PARALLEL_DOMAIN)
option(ENABLE_ZOLTAN "Add support for the Parallel Partitioning suite Zoltan" false)
option(ENABLE_PARALLEL_SOLVERS "Add some problem dependent solver, e.g. Feti, Navier-Stokes and Cahn-Hilliard" true)
option(ENABLE_BDDCML "Add support for the BDDCML library" false)
mark_as_advanced(ENABLE_PARALLEL_SOLVERS)
mark_as_advanced(ENABLE_BDDCML)
set(PARALLEL_DOMAIN_AMDIS_SRC set(PARALLEL_DOMAIN_AMDIS_SRC
${SOURCE_DIR}/parallel/DofComm.cc ${SOURCE_DIR}/parallel/DofComm.cc
${SOURCE_DIR}/parallel/CheckerPartitioner.cc ${SOURCE_DIR}/parallel/CheckerPartitioner.cc
......
...@@ -12,22 +12,14 @@ macro(enable_mtl4 _FLAGS_ _INC_DIRS_ _LIBS_) ...@@ -12,22 +12,14 @@ macro(enable_mtl4 _FLAGS_ _INC_DIRS_ _LIBS_)
endif (LINK_EXECUTABLE) endif (LINK_EXECUTABLE)
list(APPEND ${_FLAGS_} "-DMTL_ASSERT_FOR_THROW=1") list(APPEND ${_FLAGS_} "-DMTL_ASSERT_FOR_THROW=1")
set (CXX_ELEVEN_FEATURE_LIST "MOVE" "AUTO" "RANGEDFOR" "INITLIST" "STATICASSERT" "DEFAULTIMPL")
if (ENABLE_CXX11 OR AMDIS_NEED_CXX11) foreach (feature ${CXX_ELEVEN_FEATURE_LIST})
set (CXX_ELEVEN_FEATURE_LIST "MOVE" "AUTO" "RANGEDFOR" "INITLIST" "STATICASSERT" "DEFAULTIMPL") list(APPEND ${_FLAGS_} "-DMTL_WITH_${feature}")
foreach (feature ${CXX_ELEVEN_FEATURE_LIST}) endforeach ()
list(APPEND ${_FLAGS_} "-DMTL_WITH_${feature}")
endforeach ()
endif ()
if (ENABLE_OPENMP) if (ENABLE_OPENMP)
find_package(OpenMP REQUIRED) find_package(OpenMP REQUIRED)
if (OPENMP_FOUND) list(APPEND ${_FLAGS_} "-DMTL_WITH_OPENMP" "-DHAVE_OPENMP" ${OpenMP_CXX_FLAGS})
list(APPEND ${_FLAGS_} "-DMTL_WITH_OPENMP" ${OpenMP_CXX_FLAGS})
else ()
message(FATAL_ERROR "OpenMP not found")
endif (OPENMP_FOUND)
endif (ENABLE_OPENMP) endif (ENABLE_OPENMP)
endmacro(enable_mtl4) endmacro(enable_mtl4)
if (ENABLE_PARALLEL_DOMAIN) if (ENABLE_PARALLEL_DOMAIN)
option(ENABLE_ZOLTAN "Add support for the Parallel Partitioning suite Zoltan" false)
option(ENABLE_PARALLEL_SOLVERS "Add some problem dependent solver, e.g. Feti, Navier-Stokes and Cahn-Hilliard" true)
mark_as_advanced(ENABLE_PARALLEL_SOLVERS)
add_library(amdis_parallel INTERFACE) add_library(amdis_parallel INTERFACE)
target_sources(amdis PRIVATE target_sources(amdis PRIVATE
${SOURCE_DIR}/parallel/DofComm.cc ${SOURCE_DIR}/parallel/DofComm.cc
......
...@@ -18,12 +18,8 @@ macro(target_enable_mtl4 _TARGET_ _SCOPE_) ...@@ -18,12 +18,8 @@ macro(target_enable_mtl4 _TARGET_ _SCOPE_)
endforeach () endforeach ()
if (ENABLE_OPENMP) if (ENABLE_OPENMP)
find_package(OpenMP REQUIRED) find_package(OpenMP REQUIRED)
if (OPENMP_FOUND) target_compile_definitions(${_TARGET_} ${_SCOPE_} MTL_WITH_OPENMP HAVE_OPENMP)
target_compile_definitions(${_TARGET_} ${_SCOPE_} MTL_WITH_OPENMP) target_compile_options(${_TARGET_} ${_SCOPE_} ${OpenMP_CXX_FLAGS})
target_compile_options(${_TARGET_} ${_SCOPE_} ${OpenMP_CXX_FLAGS})
else ()
message(FATAL_ERROR "OpenMP not found")
endif (OPENMP_FOUND)
endif (ENABLE_OPENMP) endif (ENABLE_OPENMP)
endmacro(target_enable_mtl4) endmacro(target_enable_mtl4)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment