Commit aca13a71 authored by gsell's avatar gsell

repo reorganization

parents

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
cmake_minimum_required(VERSION 2.6)
set (CMAKE_CXX_FLAGS_RELEASE "-O3")
set (CMAKE_CXX_FLAGS_DEBUG "-g -O2")
#find_package (MPI REQUIRED)
set (CMAKE_CXX_COMPILER ${MPI_COMPILER})
project(OPAL)
set (OPAL_VERSION_MAJOR 1)
set (OPAL_VERSION_MINOR 1.9)
#set(CMAKE_BUILD_TYPE Debug)
option (ENABLE_ML_SOLVER "Enable iteartive SA-AMG-PCG self field solver" OFF)
option (DBG_SCALARFIELD "Enable dump of scalar field rho_m" OFF)
option (DBG_STENCIL "Dump stencil of iterative solver in matlab format" OFF)
option (BUILD_LIBOPAL "Enable building the OPAL library" OFF)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
find_package (IPPL REQUIRED
PATHS /usr/local/include /usr/include $ENV{IPPL_PREFIX})
message("Found IPPL library dir: ${IPPL_LIBRARY_DIR}")
message("Found IPPL include dir: ${IPPL_INCLUDE_DIR}")
find_package (H5Hut REQUIRED)
find_package (HDF5 REQUIRED)
find_package (GSL REQUIRED)
if (DBG_SCALARFIELD)
MESSAGE("\nWrite scalar rho_m field is enabled ")
set (CMAKE_CXX_FLAGS_RELEASE "-D DBG_SCALARFIELD")
endif (DBG_SCALARFIELD)
if (DBG_STENCIL)
MESSAGE("\nWrite stencil is enabled ")
set (CMAKE_CXX_FLAGS_RELEASE "-D DBG_STENCIL")
endif (DBG_STENCIL)
if (BUILD_LIBOPAL)
MESSAGE("\nBuilding OPAL library")
endif (BUILD_LIBOPAL)
if (ENABLE_ML_SOLVER)
# Get Trilinos as one entity
find_package (Trilinos PATHS $ENV{TRILINOS_INCLUDE_PATH})
IF(NOT Trilinos_FOUND)
MESSAGE (FATAL_ERROR "Could not find Trilinos!")
ENDIF()
# Echo trilinos build info just for fun
MESSAGE("\nFound Trilinos! Here are the details: ")
MESSAGE(" Trilinos_DIR = ${Trilinos_DIR}")
MESSAGE(" Trilinos_VERSION = ${Trilinos_VERSION}")
MESSAGE(" Trilinos_PACKAGE_LIST = ${Trilinos_PACKAGE_LIST}")
MESSAGE(" Trilinos_LIBRARIES = ${Trilinos_LIBRARIES}")
MESSAGE(" Trilinos_INCLUDE_DIRS = ${Trilinos_INCLUDE_DIRS}")
MESSAGE(" Trilinos_LIBRARY_DIRS = ${Trilinos_LIBRARY_DIRS}")
MESSAGE(" Trilinos_TPL_LIST = ${Trilinos_TPL_LIST}")
MESSAGE(" Trilinos_TPL_INCLUDE_DIRS = ${Trilinos_TPL_INCLUDE_DIRS}")
MESSAGE(" Trilinos_TPL_LIBRARIES = ${Trilinos_TPL_LIBRARIES}")
MESSAGE(" Trilinos_TPL_LIBRARY_DIRS = ${Trilinos_TPL_LIBRARY_DIRS}")
MESSAGE(" Trilinos_BUILD_SHARED_LIBS = ${Trilinos_BUILD_SHARED_LIBS}")
MESSAGE("End of Trilinos details\n")
# Make sure to use same compilers and flags as Trilinos
#SET(CMAKE_C_COMPILER ${Trilinos_C_COMPILER} )
#SET(CMAKE_CXX_COMPILER ${Trilinos_CXX_COMPILER} )
#SET(CMAKE_Fortran_COMPILER ${Trilinos_Fortran_COMPILER} )
#SET(CMAKE_CXX_FLAGS "${Trilinos_CXX_COMPILER_FLAGS} ${CMAKE_CXX_FLAGS}")
#SET(CMAKE_C_FLAGS "${Trilinos_C_COMPILER_FLAGS} ${CMAKE_C_FLAGS}")
#SET(CMAKE_Fortran_FLAGS "${Trilinos_Fortran_COMPILER_FLAGS} ${CMAKE_Fortran_FLAGS}")
endif (ENABLE_ML_SOLVER)
add_subdirectory (classic/5.0/src)
add_subdirectory (src)
#
# Find GSL includes and library
#
# GSL
# It can be found at:
# http://amas.web.psi.ch/tools/GSL/index.html
#
# GSL_INCLUDE_DIR - where to find ippl.h
# GSL_LIBRARY - qualified libraries to link against.
# GSL_FOUND - do not attempt to use if "no" or undefined.
FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_fft.h
PATHS $ENV{GSL_PREFIX}/include
NO_DEFAULT_PATH
)
FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_fft.h
/usr/include
/usr/local/include
)
FIND_LIBRARY(GSL_LIBRARY gsl
PATHS $ENV{GSL_PREFIX}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY(GSL_LIBRARY gsl
/usr/lib
/usr/local/lib
)
FIND_LIBRARY(GSL_LIBRARY_CBLAS gslcblas
PATHS $ENV{GSL_PREFIX}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY(GSL_LIBRARY_CBLAS gslcblas
/usr/lib
/usr/local/lib
)
set( GSL_LIBRARY
${GSL_LIBRARY}
${GSL_LIBRARY_CBLAS}
)
IF(GSL_INCLUDE_DIR AND GSL_LIBRARY)
SET( GSL_FOUND "YES" )
ENDIF(GSL_INCLUDE_DIR AND GSL_LIBRARY)
IF (GSL_FOUND)
IF (NOT GSL_FIND_QUIETLY)
MESSAGE(STATUS "Found GSL: ${GSL_LIBRARY}")
ENDIF (NOT GSL_FIND_QUIETLY)
ELSE (GSL_FOUND)
IF (GSL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find GSL!")
ENDIF (GSL_FIND_REQUIRED)
ENDIF (GSL_FOUND)
#
# Find H5hut includes and library
#
# H5Hut
# It can be found at:
# http://amas.web.psi.ch/tools/H5hut/index.html
#
# H5Hut_INCLUDE_DIR - where to find H5hut.h
# H5Hut_LIBRARY - qualified libraries to link against.
# H5Hut_FOUND - do not attempt to use if "no" or undefined.
FIND_PATH(H5Hut_INCLUDE_DIR H5hut.h
PATHS $ENV{H5hut}/src $ENV{H5hut}/include
NO_DEFAULT_PATH
)
FIND_PATH(H5Hut_INCLUDE_DIR H5hut.h
/usr/local/include
/usr/include
)
FIND_LIBRARY(H5Hut_LIBRARY H5hut
PATHS $ENV{H5hut}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY(H5Hut_LIBRARY H5hut
/usr/local/lib
/usr/lib
)
FIND_LIBRARY(H5Hut_LIBRARY_C H5hutC
PATHS $ENV{H5hut}/lib
NO_DEFAULT_PATH
)
FIND_LIBRARY(H5Hut_LIBRARY_C H5hutC
/usr/local/lib
/usr/lib
)
IF(H5Hut_INCLUDE_DIR AND H5Hut_LIBRARY)
SET( H5Hut_FOUND "YES" )
ENDIF(H5Hut_INCLUDE_DIR AND H5Hut_LIBRARY)
IF (H5Hut_FOUND)
IF (NOT H5Hut_FIND_QUIETLY)
MESSAGE(STATUS "Found H5Hut: ${H5Hut_LIBRARY}; ${H5Hut_LIBRARY_C}")
ENDIF (NOT H5Hut_FIND_QUIETLY)
ELSE (H5Hut_FOUND)
IF (H5Hut_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find H5Hut!")
ENDIF (H5Hut_FIND_REQUIRED)
ENDIF (H5Hut_FOUND)
#
# Find H5Part includes and library
#
# H5Part
# It can be found at:
# http://amas.web.psi.ch/tools/H5Part/index.html
#
# H5Part_INCLUDE_DIR - where to find ippl.h
# H5Part_LIBRARY - qualified libraries to link against.
# H5Part_FOUND - do not attempt to use if "no" or undefined.
FIND_PATH(H5Part_INCLUDE_DIR H5Part.h
PATHS $ENV{H5Part}/src $ENV{H5Part}/include
NO_DEFAULT_PATH
)
FIND_PATH(H5Part_INCLUDE_DIR H5Part.h
/usr/local/include
/usr/include
)
FIND_LIBRARY(H5Part_LIBRARY pH5Part
PATHS $ENV{H5Part}/src $ENV{H5Part}/lib
)
FIND_LIBRARY(H5Part_LIBRARY pH5Part
/usr/local/lib
/usr/lib
)
IF(H5Part_INCLUDE_DIR AND H5Part_LIBRARY)
SET( H5Part_FOUND "YES" )
ENDIF(H5Part_INCLUDE_DIR AND H5Part_LIBRARY)
IF (H5Part_FOUND)
IF (NOT H5Part_FIND_QUIETLY)
MESSAGE(STATUS "Found H5Part: ${H5Part_LIBRARY}")
ENDIF (NOT H5Part_FIND_QUIETLY)
ELSE (H5Part_FOUND)
IF (H5Part_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find H5Part!")
ENDIF (H5Part_FIND_REQUIRED)
ENDIF (H5Part_FOUND)
#
# Find HDF5 includes and library
#
# HDF5
# It can be found at:
# http://amas.web.psi.ch/tools/HDF5/index.html
#
# HDF5_INCLUDE_DIR - where to find hdf5.h
# HDF5_LIBRARY - qualified libraries to link against.
# HDF5_FOUND - do not attempt to use if "no" or undefined.
SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
FIND_PATH(HDF5_INCLUDE_DIR hdf5.h
PATHS $ENV{HDF5_INCLUDE_PATH}
NO_DEFAULT_PATH
)
FIND_PATH(HDF5_INCLUDE_DIR hdf5.h