Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
iwr
amdis
Commits
5d4f9830
Commit
5d4f9830
authored
14 years ago
by
Naumann, Andreas
Browse files
Options
Downloads
Patches
Plain Diff
use the cmake-debug build and create umfpack and parmetis libraries, if desired
parent
c1930d5c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AMDiS/CMakeLists.txt
+45
-40
45 additions, 40 deletions
AMDiS/CMakeLists.txt
with
45 additions
and
40 deletions
AMDiS/CMakeLists.txt
+
45
−
40
View file @
5d4f9830
...
@@ -11,21 +11,22 @@ SET(SOURCE_DIR ${AMDiS_SOURCE_DIR})
...
@@ -11,21 +11,22 @@ SET(SOURCE_DIR ${AMDiS_SOURCE_DIR})
#TODO: use the cmake build type
#TODO: use the cmake build type
SET
(
MTL_DIR
${
LIB_DIR
}
/mtl4/ CACHE PATH
"mtl4 directory"
)
SET
(
MTL_DIR
${
LIB_DIR
}
/mtl4/ CACHE PATH
"mtl4 directory"
)
option
(
ENABLE_DEBUG
"debug"
false
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
-g -Wall -DDEBUG=0"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-Wall -DDEBUG=1 -O0"
)
#define the build type, empty can be everything and nothing
if
(
CMAKE_BUILD_TYPE STREQUAL
""
)
set
(
CMAKE_BUILD_TYPE
"Release"
)
endif
()
#option(ENABLE_INTEL "use intel compiler" false)
#option(ENABLE_INTEL "use intel compiler" false)
option
(
ENABLE_OPENMP
"use openmp"
false
)
option
(
ENABLE_OPENMP
"use openmp"
false
)
option
(
ENABLE_PARMETIS
"use partion of unity and enable parmetis"
false
)
option
(
ENABLE_PARALLEL_DOMAIN
"use parallel domain decomposition"
false
)
option
(
ENABLE_PARALLEL_DOMAIN
"use parallel domain decomposition"
false
)
SET
(
PETSC_DIR
""
CACHE PATH
"Petsc directory for parallel domain decomposition"
)
SET
(
PETSC_DIR
""
CACHE PATH
"Petsc directory for parallel domain decomposition"
)
SET
(
PETSC_ARCH
""
CACHE STRING
"Petsc architecture"
)
SET
(
PETSC_ARCH
""
CACHE STRING
"Petsc architecture"
)
option
(
ENABLE_UMFPACK
"use umfpack solver"
false
)
option
(
ENABLE_UMFPACK
"use umfpack solver"
false
)
option
(
ENABLE_MKL
"use the mkl"
false
)
option
(
ENABLE_MKL
"use the mkl"
false
)
SET
(
MKL_DIR
""
CACHE PATH
"MKL directory"
)
SET
(
MKL_DIR
""
CACHE PATH
"MKL directory"
)
option
(
ENABLE_DUNE
"use dune"
false
)
SET
(
DUNE_DIR
""
CACHE PATH
"Dune directory"
)
#option(ENABLE_BOOST "use the boost library" false)
option
(
ENABLE_MARMOT
"use marmot"
false
)
option
(
ENABLE_GUI
"compile the gui"
false
)
#option(ENABLE_TESTS "compile the tests" false)
#option(ENABLE_TESTS "compile the tests" false)
SET
(
ENABLE_TESTS false
)
SET
(
ENABLE_TESTS false
)
...
@@ -37,20 +38,17 @@ if(ENABLE_INTEL)
...
@@ -37,20 +38,17 @@ if(ENABLE_INTEL)
#SET(CMAKE_C_COMPILER "icc")
#SET(CMAKE_C_COMPILER "icc")
endif
(
ENABLE_INTEL
)
endif
(
ENABLE_INTEL
)
#if(ENABLE_BOOST)
find_package
(
Boost 1.42 REQUIRED
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_BOOST=1"
)
if
(
Boost_FOUND
)
find_package
(
Boost 1.42 REQUIRED
)
include_directories
(
${
Boost_INCLUDE_DIR
}
)
if
(
Boost_FOUND
)
message
(
"boost lib-dirs:
${
Boost_LIBRARY_DIRS
}
"
)
include_directories
(
${
Boost_INCLUDE_DIR
}
)
message
(
"use the boost dir:
${
Boost_INCLUDE_DIR
}
"
)
message
(
"boost lib-dirs:
${
Boost_LIBRARY_DIRS
}
"
)
if
(
WIN32
)
message
(
"use the boost dir:
${
Boost_INCLUDE_DIR
}
"
)
message
(
"the windows find_boost does not set the boost library paths, please set it"
)
if
(
WIN32
)
SET
(
Boost_LIBRARY_DIRS CACHE PATH
"The directory containing the boost libraries"
)
message
(
"the windows find_boost does not set the boost library paths, please set it"
)
endif
(
WIN32
)
SET
(
Boost_LIBRARY_DIRS CACHE PATH
"The directory containing the boost libraries"
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
endif
(
WIN32
)
endif
(
Boost_FOUND
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
endif
(
Boost_FOUND
)
#endif(ENABLE_BOOST)
SET
(
LIB_DIR ./lib
)
SET
(
LIB_DIR ./lib
)
SET
(
SOURCE_DIR
${
AMDiS_SOURCE_DIR
}
)
SET
(
SOURCE_DIR
${
AMDiS_SOURCE_DIR
}
)
...
@@ -158,21 +156,23 @@ SET(AMDIS_SRC ${SOURCE_DIR}/DOFIndexed.cc
...
@@ -158,21 +156,23 @@ SET(AMDIS_SRC ${SOURCE_DIR}/DOFIndexed.cc
${
SOURCE_DIR
}
/time/RosenbrockMethod.cc
${
SOURCE_DIR
}
/time/RosenbrockMethod.cc
)
)
if
(
ENABLE_PAR
METIS
)
if
(
ENABLE_PAR
ALLEL_DOMAIN
)
find_package
(
MPI REQUIRED
)
find_package
(
MPI REQUIRED
)
INCLUDE
(
CMakeForceCompiler
)
INCLUDE
(
CMakeForceCompiler
)
CMAKE_FORCE_C_COMPILER
(
mpicc
"MPI C compiler"
)
CMAKE_FORCE_C_COMPILER
(
mpicc
"MPI C compiler"
)
CMAKE_FORCE_CXX_COMPILER
(
mpiCC
"MPI C++ compiler"
)
CMAKE_FORCE_CXX_COMPILER
(
mpiCC
"MPI C++ compiler"
)
add_custom_target
(
parmetis-lib ALL
make
WORKING_DIRECTORY
${
LIB_DIR
}
/ParMetis-3.1
)
include_directories
(
${
LIB_DIR
}
/ParMetis-3.1
)
include_directories
(
${
LIB_DIR
}
/ParMetis-3.1
)
INSTALL
(
FILES
${
LIB_DIR
}
/ParMetis-3.1/parmetis.h
INSTALL
(
FILES
${
LIB_DIR
}
/ParMetis-3.1/parmetis.h
${
LIB_DIR
}
/ParMetis-3.1/libparmetis.a
${
LIB_DIR
}
/ParMetis-3.1/libparmetis.a
${
LIB_DIR
}
/ParMetis-3.1/libmetis.a
${
LIB_DIR
}
/ParMetis-3.1/libmetis.a
DESTINATION lib/parmetis
DESTINATION lib/parmetis
)
)
endif
(
ENABLE_PARMETIS
)
if
(
ENABLE_PARALLEL_DOMAIN
)
include_directories
(
${
PETSC_DIR
}
/include
${
PETSC_DIR
}
/
${
PETSC_ARCH
}
/include
)
include_directories
(
${
PETSC_DIR
}
/include
${
PETSC_DIR
}
/
${
PETSC_ARCH
}
/include
)
SET
(
PARALLEL_DOMAIN_AMDIS_SRC
SET
(
PARALLEL_DOMAIN_AMDIS_SRC
${
SOURCE_DIR
}
/parallel/ParMetisPartitioner.cc
${
SOURCE_DIR
}
/parallel/ParMetisPartitioner.cc
...
@@ -181,20 +181,18 @@ if(ENABLE_PARALLEL_DOMAIN)
...
@@ -181,20 +181,18 @@ if(ENABLE_PARALLEL_DOMAIN)
${
SOURCE_DIR
}
/parallel/ParallelDebug.cc
${
SOURCE_DIR
}
/parallel/ParallelDebug.cc
${
SOURCE_DIR
}
/parallel/GlobalMatrixSolver.cc
${
SOURCE_DIR
}
/parallel/GlobalMatrixSolver.cc
${
SOURCE_DIR
}
/parallel/MpiHelper.cc
${
SOURCE_DIR
}
/parallel/MpiHelper.cc
${
SOURCE_DIR
}
/parallel/ElementObjectData.cc
)
${
SOURCE_DIR
}
/parallel/ElementObjectData.cc
${
SOURCE_DIR
}
/parallel/PetscSolver.cc
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_PARALLEL_DOMAIN_AMDIS=1"
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_PARALLEL_DOMAIN_AMDIS=1"
)
endif
(
ENABLE_PARALLEL_DOMAIN
)
endif
(
ENABLE_PARALLEL_DOMAIN
)
if
(
ENABLE_DEBUG
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-g -O0 -DDEBUG=1"
)
endif
(
ENABLE_DEBUG
)
if
(
ENABLE_OPENMP
)
if
(
ENABLE_OPENMP
)
if
(
ENABLE_INTEL
)
find_package
(
OpenMP
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-openmp"
)
if
(
OPENMP_FOUND
)
else
(
ENABLE_INTEL
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
${
OpenMP_CXX_FLAGS
}
"
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-fopenmp"
)
else
()
endif
(
ENABLE_INTEL
)
message
(
WARNING
"your compiler seems support openmp"
)
endif
()
endif
(
ENABLE_OPENMP
)
endif
(
ENABLE_OPENMP
)
if
(
ENABLE_UMFPACK
)
if
(
ENABLE_UMFPACK
)
...
@@ -216,6 +214,18 @@ if(ENABLE_UMFPACK)
...
@@ -216,6 +214,18 @@ if(ENABLE_UMFPACK)
INSTALL
(
FILES
${
HEADERS
}
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/amdis/ufconfig/xerbla
)
DESTINATION include/amdis/ufconfig/xerbla
)
#add some rules to build the umfpack and amd libs
# message("adding command for libumfpack:${CMAKE_CURRENT_SOURCE_DIR}/${LIB_DIR}/UMFPACK/Lib/libumfpack.a ")
add_custom_target
(
umfpack-lib ALL
make
WORKING_DIRECTORY
${
LIB_DIR
}
/UMFPACK
)
add_custom_target
(
amd-lib ALL
make
WORKING_DIRECTORY
${
LIB_DIR
}
/AMD
)
INSTALL
(
FILES
${
LIB_DIR
}
/UMFPACK/Lib/libumfpack.a
INSTALL
(
FILES
${
LIB_DIR
}
/UMFPACK/Lib/libumfpack.a
DESTINATION lib/amdis/umfpack/
)
DESTINATION lib/amdis/umfpack/
)
INSTALL
(
FILES
${
LIB_DIR
}
/AMD/Lib/libamd.a
INSTALL
(
FILES
${
LIB_DIR
}
/AMD/Lib/libamd.a
...
@@ -228,11 +238,6 @@ if(ENABLE_MKL)
...
@@ -228,11 +238,6 @@ if(ENABLE_MKL)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_MKL=1"
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_MKL=1"
)
endif
(
ENABLE_MKL
)
endif
(
ENABLE_MKL
)
if
(
ENABLE_DUNE
)
include_directories
(
${
DUNE_DIR
}
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_DUNE=1"
)
endif
(
ENABLE_DUNE
)
SET
(
COMPOSITE_SOURCE_DIR compositeFEM/src
)
SET
(
COMPOSITE_SOURCE_DIR compositeFEM/src
)
SET
(
COMPOSITE_FEM_SRC
${
COMPOSITE_SOURCE_DIR
}
/CFE_Integration.cc
${
COMPOSITE_SOURCE_DIR
}
/CFE_NormAndErrorFcts.cc
SET
(
COMPOSITE_FEM_SRC
${
COMPOSITE_SOURCE_DIR
}
/CFE_Integration.cc
${
COMPOSITE_SOURCE_DIR
}
/CFE_NormAndErrorFcts.cc
${
COMPOSITE_SOURCE_DIR
}
/CompositeFEMMethods.cc
${
COMPOSITE_SOURCE_DIR
}
/LevelSetAdaptMesh.cc
${
COMPOSITE_SOURCE_DIR
}
/CompositeFEMMethods.cc
${
COMPOSITE_SOURCE_DIR
}
/LevelSetAdaptMesh.cc
...
...
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