Commit 0c596622 authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

zoltan and goto-blas for AMDiS module on deimos

parent fccd494d
......@@ -55,6 +55,7 @@ if(Boost_FOUND)
endif(Boost_FOUND)
set(AMDiS_NEED_PARMETIS @ENABLE_PARMETIS@)
set(AMDiS_NEED_ZOLTAN @ENABLE_ZOLTAN@)
set(AMDiS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@)
set(AMDiS_NEED_UMFPACK @ENABLE_UMFPACK@)
set(AMDiS_NEED_MKL @ENABLE_MKL@)
......@@ -62,18 +63,13 @@ set(AMDiS_USE_FILE ${AMDiS_DIR}/AMDiSUse.cmake)
set(AMDiS_COMPILEFLAGS "@COMPILEFLAGS@")
if(AMDiS_NEED_UMFPACK)
set(BLAS_LIBRARY_DIR "" CACHE PATH "the blas library directory")
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})
set(BLAS_LIBRARY "blas" CACHE FILEPATH "the blas library")
find_library(_BLAS_LIB NAMES "${BLAS_LIBRARY}" "goto" PATHS ${BLAS_LIBRARY_DIR})
message("blaslibrary: ${_BLAS_LIB}")
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")
message(ERROR " could not find the blas library. please set the variable BLAS_LIBRARY to the blas library with full path")
else()
set(BLAS_LIBRARY "${_BLAS_LIB}")
endif()
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})
......@@ -97,6 +93,10 @@ if( AMDiS_NEED_PARMETIS )
list(APPEND AMDiS_LIBRARIES ${AMDiS_LIBRARY_DIR}/parmetis/libparmetis.a ${AMDiS_LIBRARY_DIR}/parmetis/libmetis.a)
endif()
if( AMDiS_NEED_ZOLTAN )
find_library(ZOLTAN_LIB zoltan DOC "full path to the zoltan library")
list(APPEND AMDiS_LIBRARIES ${ZOLTAN_LIB})
endif()
if(${AMDiS_FIND_COMPONENTS} MATCHES parmetis AND NOT AMDiS_NEED_PARMETIS)
message(SEND_ERROR "amdis was not compiled with parmetis")
endif()
......@@ -5,9 +5,12 @@ if(AMDiS_HAS_PARALLEL_DOMAIN)
else()
find_package(MPI REQUIRED)
if(MPI_FOUND)
INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_CXX_COMPILER(mpicxx "The MPI C++ compiler")
CMAKE_FORCE_C_COMPILER(mpicc "The MPI C Compiler")
# INCLUDE(CMakeForceCompiler)
# CMAKE_FORCE_CXX_COMPILER(mpicxx "The MPI C++ compiler")
# CMAKE_FORCE_C_COMPILER(mpicc "The MPI C Compiler")
list(APPEND AMDiS_LIBRARIES ${MPI_LIBRARIES})
list(APPEND AMDiS_COMPILEFLAGS ${MPI_COMPILE_FLAGS})
list(APPEND AMDiS_INCLUDE_DIRS ${MPI_INCLUDE_PATH})
endif(MPI_FOUND)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${AMDiS_DIR})
set(PETSC_EXECUTABLE_RUNS ON)
......
......@@ -156,9 +156,13 @@ SET(AMDIS_SRC ${SOURCE_DIR}/DOFIndexed.cc
if(ENABLE_PARALLEL_DOMAIN)
find_package(MPI REQUIRED)
INCLUDE (CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(mpicc "MPI C compiler")
CMAKE_FORCE_CXX_COMPILER(mpiCC "MPI C++ compiler")
if(MPI_FOUND)
#INCLUDE (CMakeForceCompiler)
#CMAKE_FORCE_C_COMPILER(mpicc "MPI C compiler")
#CMAKE_FORCE_CXX_COMPILER(mpiCC "MPI C++ compiler")
list(APPEND AMDiS_COMPILEFLAGS ${MPI_COMPILE_FLAGS})
include_directories(${MPI_INCLUDE_PATH})
endif(MPI_FOUND)
add_custom_target(parmetis-lib ALL
make
......@@ -171,6 +175,13 @@ if(ENABLE_PARALLEL_DOMAIN)
DESTINATION lib/amdis/parmetis
)
set(ENABLE_PARMETIS ON)
find_file(ZOLTAN_HEADER_DIR "zoltan_cpp.h")
if( ZOLTAN_HEADER_DIR )
get_filename_component(ZOLTAN_HEADER_DIR "${ZOLTAN_HEADER_DIR}" PATH CACHE)
include_directories(${ZOLTAN_HEADER_DIR})
else()
message( FATAL_ERROR "could not find zoltan.")
endif( ZOLTAN_HEADER_DIR )
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)
......@@ -185,7 +196,8 @@ if(ENABLE_PARALLEL_DOMAIN)
${SOURCE_DIR}/parallel/MpiHelper.cc
${SOURCE_DIR}/parallel/ElementObjectData.cc
${SOURCE_DIR}/parallel/ParallelProblemStatBase.cc
${SOURCE_DIR}/parallel/PetscSolver.cc)
${SOURCE_DIR}/parallel/PetscSolver.cc
${SOURCE_DIR}/parallel/ZoltanPartitioner.cc)
SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_PARALLEL_DOMAIN_AMDIS=1")
INSTALL(FILES ResolveCompilerPaths.cmake FindPackageMultipass.cmake FindPETSc.cmake
DESTINATION share/amdis/)
......@@ -196,7 +208,7 @@ if(ENABLE_OPENMP)
if(OPENMP_FOUND)
SET(COMPILEFLAGS "${COMPILEFLAGS} ${OpenMP_CXX_FLAGS}")
else()
message(WARNING "your compiler seems support openmp")
message(WARNING "your compiler seems not supporting openmp")
endif()
endif(ENABLE_OPENMP)
......
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