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
28eb4386
Commit
28eb4386
authored
13 years ago
by
Naumann, Andreas
Browse files
Options
Downloads
Patches
Plain Diff
looking for umfpack (+amd,ufconfig), dont compile it any more
parent
6c170ae4
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
AMDiS/AMDiSConfig.cmake.in
+55
-12
55 additions, 12 deletions
AMDiS/AMDiSConfig.cmake.in
AMDiS/CMakeLists.txt
+70
-41
70 additions, 41 deletions
AMDiS/CMakeLists.txt
with
125 additions
and
53 deletions
AMDiS/AMDiSConfig.cmake.in
+
55
−
12
View file @
28eb4386
...
...
@@ -47,7 +47,7 @@ else()
endif()
unset(_AMDIS_LIB CACHE)
find_package(Boost 1.42 REQUIRED system iostreams)
find_package(Boost 1.42 REQUIRED system iostreams
filesystem
)
if(Boost_FOUND)
list(APPEND AMDIS_LIBRARIES ${Boost_LIBRARIES})
list(APPEND AMDIS_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
...
...
@@ -63,20 +63,63 @@ set(AMDIS_USE_FILE ${AMDIS_DIR}/AMDiSUse.cmake)
set(AMDiS_COMPILEFLAGS "@COMPILEFLAGS@")
if(AMDiS_NEED_UMFPACK)
find_library(BLAS_LIBRARY NAMES "blas" "goto")
#look for umfpack, we need the headers only
find_file(UMFPACK_H umfpack.h
HINTS /usr/include /usr/include/suitesparse
DOC "headerfile umfpack.h for UMFPACK")
if( UMFPACK_H )
#construct the include path
get_filename_component(UMFPACK_PATH ${UMFPACK_H} PATH)
#look for ufconfig
find_file(UFCONFIG_H UFconfig.h
HINTS /usr/include ${UMFPACK_PATH}
DOC "headerfile UFConfig.h")
if( UFCONFIG_H )
get_filename_component(UFCONFIG_PATH ${UFCONFIG_H} PATH)
else()
message(FATAL_ERROR "could not find UFConfig.h, needed for umfpack")
endif()
#look for amd
find_file(AMD_H amd.h
HINTS /usr/include/ ${UMFPACK_PATH}
DOC "headerfile amd.h")
if( AMD_H )
get_filename_component(AMD_PATH ${AMD_H} PATH)
else()
message( FATAL_ERROR "could not find amd.h, needed for umfpack")
endif()
#add the compileflags and directories
list(APPEND AMDIS_INCLUDE_DIRS ${UMFPACK_PATH} ${UFCONFIG_PATH} ${AMD_PATH})
else()
message(FATAL_ERROR "Could not find the umfpack-headers. Please install umfpack")
endif()
find_library(BLAS_LIBRARY NAMES "blas" "goto"
DOC "the blas library")
# message("blaslibrary: ${BLAS_LIBRARY}")
if(NOT BLAS_LIBRARY)
if( BLAS_LIBRARY )
list(APPEND AMDIS_LIBRARIES ${BLAS_LIBRARY})
else()
message(ERROR " could not find the blas library. please set the variable BLAS_LIBRARY to the blas library with full path")
endif()
list(APPEND AMDIS_LIBRARIES ${AMDIS_LIBRARY_DIR}/umfpack/libumfpack.a ${AMDIS_LIBRARY_DIR}/amd/libamd.a ${BLAS_LIBRARY})
#message("amdis-libs: ${AMDIS_LIBRARIES}")
list(APPEND AMDIS_LIBRARY_DIRS ${AMDIS_LIBRARY_DIR}/umfpack ${AMDIS_LIBRARY_DIR}/amd ${BLAS_LIBRARY_DIR})
list(APPEND AMDIS_INCLUDE_DIRS
${AMDIS_INCLUDE_DIR}/umfpack
${AMDIS_INCLUDE_DIR}/amd
${AMDIS_INCLUDE_DIR}/ufconfig
${AMDIS_INCLUDE_DIR}/ufconfig/xerbla
)
find_library(UMFPACK_LIB umfpack
DOC "the UMFPACK library")
if( UMFPACK_LIB )
list(APPEND AMDIS_LIBRARIES ${UMFPACK_LIB})
else()
message(FATAL_ERROR "Did not find the umfpack library")
endif()
find_library(AMD_LIB amd
DOC "the AMD library")
if( AMD_LIB )
list(APPEND AMDIS_LIBRARIES ${AMD_LIB})
else()
message(FATAL_ERROR "Did not find the amd library")
endif()
#message("amdis-libs: ${AMDIS_LIBRARIES}")
list(APPEND AMDIS_LIBRARY_DIRS ${BLAS_LIBRARY_DIR})
endif(AMDiS_NEED_UMFPACK)
if(${AMDIS_FIND_COMPONENTS} MATCHES umfpack )
...
...
This diff is collapsed.
Click to expand it.
AMDiS/CMakeLists.txt
+
70
−
41
View file @
28eb4386
...
...
@@ -213,49 +213,79 @@ if(ENABLE_PARALLEL_DOMAIN)
endif
(
ENABLE_PARALLEL_DOMAIN
)
if
(
ENABLE_UMFPACK
)
include_directories
(
${
LIB_DIR
}
/UFconfig
${
LIB_DIR
}
/AMD/Include
${
LIB_DIR
}
/UMFPACK/Include
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_UMFPACK=1 -DMTL_HAS_UMFPACK"
)
FILE
(
GLOB UMFPACK_HEADERS
"
${
LIB_DIR
}
/UMFPACK/Include/*.h"
)
INSTALL
(
FILES
${
UMFPACK_HEADERS
}
DESTINATION include/amdis/umfpack/
)
list
(
APPEND deb_add_dirs
"include/amdis/umfpack"
)
FILE
(
GLOB UMFPACK_HEADERS
"
${
LIB_DIR
}
/AMD/Include/*.h"
)
INSTALL
(
FILES
${
UMFPACK_HEADERS
}
DESTINATION include/amdis/amd/
)
list
(
APPEND deb_add_dirs
"include/amdis/amd"
)
FILE
(
GLOB HEADERS
"
${
LIB_DIR
}
/UFconfig/*.h"
)
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/amdis/ufconfig/
)
list
(
APPEND deb_add_dirs
"include/amdis/ufconfig"
)
FILE
(
GLOB HEADERS
"
${
LIB_DIR
}
/UFconfig/xerbla/*.h"
)
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/amdis/ufconfig/xerbla
)
list
(
APPEND deb_add_dirs
"include/amdis/ufconfig/xerbla"
)
# include_directories(${LIB_DIR}/UFconfig ${LIB_DIR}/AMD/Include ${LIB_DIR}/UMFPACK/Include)
# FILE(GLOB UMFPACK_HEADERS "${LIB_DIR}/UMFPACK/Include/*.h")
# INSTALL(FILES ${UMFPACK_HEADERS}
# DESTINATION include/amdis/umfpack/)
# list(APPEND deb_add_dirs "include/amdis/umfpack")
# FILE(GLOB UMFPACK_HEADERS "${LIB_DIR}/AMD/Include/*.h")
# INSTALL(FILES ${UMFPACK_HEADERS}
# DESTINATION include/amdis/amd/)
# list(APPEND deb_add_dirs "include/amdis/amd")
# FILE(GLOB HEADERS "${LIB_DIR}/UFconfig/*.h")
# INSTALL(FILES ${HEADERS}
# DESTINATION include/amdis/ufconfig/)
# list(APPEND deb_add_dirs "include/amdis/ufconfig")
# FILE(GLOB HEADERS "${LIB_DIR}/UFconfig/xerbla/*.h")
# INSTALL(FILES ${HEADERS}
# DESTINATION include/amdis/ufconfig/xerbla)
# list(APPEND deb_add_dirs "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
DESTINATION lib/amdis/umfpack/
)
list
(
APPEND deb_add_dirs
"lib/amdis/umfpack"
)
INSTALL
(
FILES
${
LIB_DIR
}
/AMD/Lib/libamd.a
DESTINATION lib/amdis/amd/
)
list
(
APPEND deb_add_dirs
"lib/amdis/amd"
)
# 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
# DESTINATION lib/amdis/umfpack/)
# list(APPEND deb_add_dirs "lib/amdis/umfpack")
# INSTALL(FILES ${LIB_DIR}/AMD/Lib/libamd.a
# DESTINATION lib/amdis/amd/)
# list(APPEND deb_add_dirs "lib/amdis/amd")
#look for umfpack, we need the headers only
find_file
(
UMFPACK_H umfpack.h
HINTS /usr/include /usr/include/suitesparse
DOC
"headerfile umfpack.h for UMFPACK"
)
if
(
UMFPACK_H
)
#construct the include path
get_filename_component
(
UMFPACK_PATH
${
UMFPACK_H
}
PATH
)
#look for ufconfig
find_file
(
UFCONFIG_H UFconfig.h
HINTS /usr/include
${
UMFPACK_PATH
}
DOC
"headerfile UFConfig.h"
)
if
(
UFCONFIG_H
)
get_filename_component
(
UFCONFIG_PATH
${
UFCONFIG_H
}
PATH
)
else
()
message
(
FATAL_ERROR
"could not find UFConfig.h, needed for umfpack"
)
endif
()
#look for amd
find_file
(
AMD_H amd.h
HINTS /usr/include/
${
UMFPACK_PATH
}
DOC
"headerfile amd.h"
)
if
(
AMD_H
)
get_filename_component
(
AMD_PATH
${
AMD_H
}
PATH
)
else
()
message
(
FATAL_ERROR
"could not find amd.h, needed for umfpack"
)
endif
()
#add the compileflags and directories
include_directories
(
${
UMFPACK_PATH
}
${
UFCONFIG_PATH
}
${
AMD_PATH
}
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-DHAVE_UMFPACK=1 -DMTL_HAS_UMFPACK"
)
else
()
message
(
FATAL_ERROR
"Could not find the umfpack-headers. Please install umfpack"
)
endif
()
SET
(
RPM_DEPEND_STR
"blas"
)
LIST
(
APPEND AMDiS_LIBS amdis blas amd umfpack
)
endif
(
ENABLE_UMFPACK
)
SET
(
COMPOSITE_SOURCE_DIR
${
SOURCE_DIR
}
/compositeFEM
)
...
...
@@ -281,7 +311,6 @@ add_library(amdis SHARED ${AMDIS_SRC} ${PARALLEL_DOMAIN_AMDIS_SRC})
add_library
(
compositeFEM SHARED
${
COMPOSITE_FEM_SRC
}
)
add_library
(
reinit STATIC
${
REINIT_SRC
}
)
target_link_libraries
(
compositeFEM amdis
)
LIST
(
APPEND AMDiS_LIBS amdis boost_system boost_iostreams
)
if
(
WIN32
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
)
...
...
@@ -385,7 +414,7 @@ configure_file(${AMDiS_SOURCE_DIR}/postrm.in
${
AMDiS_BINARY_DIR
}
/postrm
@ONLY
)
set
(
CPACK_RPM_PACKAGE_REQUIRES
"boost-devel >= 1.42,
${
RPM_DEPEND_STR
}
"
)
set
(
CPACK_DEBIAN_PACKAGE_DEPENDS
"libboost-dev (>= 1.42), libboost-iostreams-dev (>= 1.42), libboost-system-dev (>= 1.42)"
)
set
(
CPACK_DEBIAN_PACKAGE_DEPENDS
"libboost-dev (>= 1.42), libboost-iostreams-dev (>= 1.42), libboost-system-dev (>=
1.42), libboost-filesystem-dev (>=
1.42)"
)
set
(
CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"
${
AMDiS_BINARY_DIR
}
/preinst"
"
${
AMDiS_BINARY_DIR
}
/postrm"
)
include
(
CPack
)
...
...
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