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 440f2855 authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

petsc configuration with more than one petsc-library

parent 869dbce6
......@@ -41,7 +41,7 @@ find_library(_AMDiS_LIB amdis PATHS ${AMDiS_LIBRARY_DIR} ${AMDiS_DIR}/../../lib/
if(_AMDiS_LIB)
get_filename_component(AMDiS_LIBRARY_DIR ${_AMDiS_LIB} PATH CACHE)
set(AMDiS_LIBRARY_DIRS ${AMDiS_LIBRARY_DIR})
set(AMDiS_LIBRARIES amdis compositeFEM)
set(AMDiS_LIBRARIES "${_AMDiS_LIB};${AMDiS_LIBRARY_DIR}/libcompositeFEM.so" CACHE STRING "amdis libraries")
else()
message(ERROR "could not detect the AMDiS library directory. Please set the variable AMDiS_LIBRARY_DIR to the directory containg the AMDiS library")
endif()
......@@ -60,16 +60,22 @@ set(AMDiS_NEED_UMFPACK @ENABLE_UMFPACK@)
set(AMDiS_NEED_MKL @ENABLE_MKL@)
set(AMDiS_USE_FILE ${AMDiS_DIR}/AMDiSUse.cmake)
set(AMDiS_COMPILEFLAGS "@COMPILEFLAGS@")
message("find-components: ${AMDiS_FIND_COMPONENTS}")
if(AMDiS_NEED_UMFPACK)
set(BLAS_LIBRARY_DIR "" CACHE PATH "the blas library directory")
set(BLAS_LIBRARY "blas" CACHE STRING "the blas library")
if(NOT BLAS_LIBRARY)
set(BLAS_LIBRARY "blas" CACHE STRING "the blas library")
endif(NOT BLAS_LIBRARY)
find_library(_BLAS_LIB ${BLAS_LIBRARY} PATHS ${BLAS_LIBRARY_DIR})
if(NOT _BLAS_LIB)
if(EXISTS ${BLAS_LIBRARY})
set(_BLAS_LIB ${BLAS_LIBRARY})
endif()
endif(NOT _BLAS_LIB)
if(NOT _BLAS_LIB)
message(ERROR "could not find the blas library. please set the variables BLAS_LIBRARY_DIR and BLAS_LIBRARY")
endif()
list(APPEND AMDiS_LIBRARIES umfpack amd ${BLAS_LIBRARY})
list(APPEND AMDiS_LIBRARIES ${AMDiS_LIBRARY_DIR}/umfpack/libumfpack.a ${AMDiS_LIBRARY_DIR}/amd/libamd.a ${BLAS_LIBRARY})
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
......@@ -80,9 +86,7 @@ if(AMDiS_NEED_UMFPACK)
endif(AMDiS_NEED_UMFPACK)
if(${AMDiS_FIND_COMPONENTS} MATCHES umfpack )
if( AMDiS_NEED_UMFPACK )
list(APPEND AMDiS_LIBRARIES umfpack blas)
else()
if( NOT AMDiS_NEED_UMFPACK )
set( AMDiS_umfpack_FOUND FALSE)
message(SEND_ERROR "the selected amdis was not compiled with umfpack")
endif()
......@@ -90,7 +94,7 @@ endif()
if( AMDiS_NEED_PARMETIS )
list(APPEND AMDiS_LIBRARY_DIRS ${AMDiS_LIBRARY_DIR}/parmetis)
list(APPEND AMDiS_LIBRARIES parmetis metis)
list(APPEND AMDiS_LIBRARIES ${AMDiS_LIBRARY_DIR}/parmetis/libparmetis.a ${AMDiS_LIBRARY_DIR}/parmetis/libmetis.a)
endif()
if(${AMDiS_FIND_COMPONENTS} MATCHES parmetis AND NOT AMDiS_NEED_PARMETIS)
......
......@@ -10,15 +10,15 @@ if(AMDiS_HAS_PARALLEL_DOMAIN)
CMAKE_FORCE_C_COMPILER(mpicc "The MPI C Compiler")
endif(MPI_FOUND)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${AMDiS_DIR})
set(PETSC_EXECUTABLE_RUNS ON)
find_package(PETSc REQUIRED)
if(PETSC_FOUND)
list(APPEND AMDiS_LIBRARIES ${PETSC_LIBRARIES})
list(APPEND AMDiS_LIBRARIES ${PETSC_LIBRARY_SYS} ${PETSC_LIBRARIES})
list(APPEND AMDiS_INCLUDE_DIRS ${PETSC_INCLUDES})
endif(PETSC_FOUND)
endif(NOT AMDiS_NEED_PARMETIS)
endif(AMDiS_HAS_PARALLEL_DOMAIN)
#thats bad because it affects each target
add_definitions(${AMDiS_COMPILEFLAGS})
link_directories(${AMDiS_LIBRARY_DIRS})
include_directories(${AMDiS_INCLUDE_DIRS})
......@@ -171,6 +171,7 @@ if(ENABLE_PARALLEL_DOMAIN)
)
set(ENABLE_PARMETIS ON)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};/usr/share/cmake-2.8/Modules/;${CMAKE_SOURCE_DIR}/")
set(PETSC_EXECUTABLE_RUNS ON)
find_package(PETSc REQUIRED)
include_directories(${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include)
SET(PARALLEL_DOMAIN_AMDIS_SRC
......
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