Commit 3d66d374 authored by Burlen Loring's avatar Burlen Loring

Merge branch 'sensei_3_development' into 'master'

Sensei 3 development

See merge request !152
parents e6211627 30d7af2b
# - Find ADIOS library, routines for scientific, parallel IO
# - Find ADIOS1 library, routines for scientific, parallel IO
# https://www.olcf.ornl.gov/center-projects/adios/
#
# Use this module by invoking find_package with the form:
# find_package(ADIOS
# find_package(ADIOS1
# [version] [EXACT] # Minimum or EXACT version, e.g. 1.6.0
# [REQUIRED] # Fail with an error if ADIOS or a required
# [REQUIRED] # Fail with an error if ADIOS1 or a required
# # component is not found
# [QUIET] # ...
# [COMPONENTS <...>] # Compiled in components: fortran, readonly,
# sequential (all are case insentative)
# )
#
# Module that finds the includes and libraries for a working ADIOS install.
# Module that finds the includes and libraries for a working ADIOS1 install.
# This module invokes the `adios_config` script that should be installed with
# the other ADIOS tools.
# the other ADIOS1 tools.
#
# To provide a hint to the module where to find the ADIOS installation,
# set the ADIOS_ROOT environment variable.
# To provide a hint to the module where to find the ADIOS1 installation,
# set the ADIOS1_ROOT environment variable.
#
# If this variable is not set, make sure that at least the according `bin/`
# directory of ADIOS is in your PATH environment variable.
# directory of ADIOS1 is in your PATH environment variable.
#
# Set the following CMake variables BEFORE calling find_packages to
# influence this module:
# ADIOS_USE_STATIC_LIBS - Set to ON to force the use of static
# ADIOS1_USE_STATIC_LIBS - Set to ON to force the use of static
# libraries. Default: OFF
#
# This module will define the following variables:
# ADIOS_INCLUDE_DIRS - Include directories for the ADIOS headers.
# ADIOS_LIBRARIES - ADIOS libraries.
# ADIOS_FOUND - TRUE if FindADIOS found a working install
# ADIOS_VERSION - Version in format Major.Minor.Patch
# ADIOS1_INCLUDE_DIRS - Include directories for the ADIOS1 headers.
# ADIOS1_LIBRARIES - ADIOS1 libraries.
# ADIOS1_FOUND - TRUE if FindADIOS1 found a working install
# ADIOS1_VERSION - Version in format Major.Minor.Patch
#
# Not used for now:
# ADIOS_DEFINITIONS - Compiler definitions you should add with
# add_definitions(${ADIOS_DEFINITIONS})
# ADIOS1_DEFINITIONS - Compiler definitions you should add with
# add_definitions(${ADIOS1_DEFINITIONS})
#
# Example to find ADIOS (default)
# find_package(ADIOS)
# if(ADIOS_FOUND)
# include_directories(${ADIOS_INCLUDE_DIRS})
# Example to find ADIOS1 (default)
# find_package(ADIOS1)
# if(ADIOS1_FOUND)
# include_directories(${ADIOS1_INCLUDE_DIRS})
# add_executable(foo foo.c)
# target_link_libraries(foo ${ADIOS_LIBRARIES})
# target_link_libraries(foo ${ADIOS1_LIBRARIES})
# endif()
# Example to find ADIOS using component
# find_package(ADIOS COMPONENTS fortran)
# if(ADIOS_FOUND)
# include_directories(${ADIOS_INCLUDE_DIRS})
# Example to find ADIOS1 using component
# find_package(ADIOS1 COMPONENTS fortran)
# if(ADIOS1_FOUND)
# include_directories(${ADIOS1_INCLUDE_DIRS})
# add_executable(foo foo.c)
# target_link_libraries(foo ${ADIOS_LIBRARIES})
# target_link_libraries(foo ${ADIOS1_LIBRARIES})
# endif()
###############################################################################
#Copyright (c) 2014, Axel Huebl and Felix Schmitt from http://picongpu.hzdr.de
......@@ -89,13 +89,13 @@ cmake_minimum_required(VERSION 2.8.5)
###############################################################################
# ADIOS
# ADIOS1
###############################################################################
# get flags for adios_config, -l is the default
#-f for fortran, -r for readonly, -s for sequential (nompi)
set(OPTLIST "-l")
if(ADIOS_FIND_COMPONENTS)
foreach(COMP ${ADIOS_FIND_COMPONENTS})
if(ADIOS1_FIND_COMPONENTS)
foreach(COMP ${ADIOS1_FIND_COMPONENTS})
string(TOLOWER ${COMP} comp)
if(comp STREQUAL "fortran")
set(OPTLIST "${OPTLIST}f")
......@@ -104,97 +104,97 @@ if(ADIOS_FIND_COMPONENTS)
elseif(comp STREQUAL "sequential")
set(OPTLIST "${OPTLIST}s")
else()
message("ADIOS component ${COMP} is not supported. Please use fortran, readonly, or sequential")
message("ADIOS1 component ${COMP} is not supported. Please use fortran, readonly, or sequential")
endif()
endforeach()
endif()
# we start by assuming we found ADIOS and falsify it if some
# dependencies are missing (or if we did not find ADIOS at all)
set(ADIOS_FOUND TRUE)
# we start by assuming we found ADIOS1 and falsify it if some
# dependencies are missing (or if we did not find ADIOS1 at all)
set(ADIOS1_FOUND TRUE)
# find `adios_config` program #################################################
# check the ADIOS_ROOT hint and the normal PATH
find_file(ADIOS_CONFIG
# check the ADIOS1_ROOT hint and the normal PATH
find_file(ADIOS1_CONFIG
NAME adios_config
PATHS ${ADIOS_ROOT}bin ${ADIOS_DIR}/bin $ENV{ADIOS_ROOT}/bin $ENV{ADIOS_DIR}/bin
PATHS ${ADIOS1_ROOT}bin ${ADIOS1_DIR}/bin $ENV{ADIOS1_ROOT}/bin $ENV{ADIOS1_DIR}/bin
$ENV{INSTALL_PREFIX}/bin $ENV{PATH})
if(ADIOS_CONFIG)
message(STATUS "Found 'adios_config': ${ADIOS_CONFIG}")
else(ADIOS_CONFIG)
set(ADIOS_FOUND FALSE)
message(STATUS "Can NOT find 'adios_config' - set ADIOS_ROOT, ADIOS_DIR or INSTALL_PREFIX, or check your PATH")
endif(ADIOS_CONFIG)
if(ADIOS1_CONFIG)
message(STATUS "Found 'adios_config': ${ADIOS1_CONFIG}")
else(ADIOS1_CONFIG)
set(ADIOS1_FOUND FALSE)
message(STATUS "Can NOT find 'adios_config' - set ADIOS1_ROOT, ADIOS1_DIR or INSTALL_PREFIX, or check your PATH")
endif(ADIOS1_CONFIG)
# check `adios_config` program ################################################
if(ADIOS_FOUND)
execute_process(COMMAND ${ADIOS_CONFIG} ${OPTLIST}
OUTPUT_VARIABLE ADIOS_LINKFLAGS
RESULT_VARIABLE ADIOS_CONFIG_RETURN
if(ADIOS1_FOUND)
execute_process(COMMAND ${ADIOS1_CONFIG} ${OPTLIST}
OUTPUT_VARIABLE ADIOS1_LINKFLAGS
RESULT_VARIABLE ADIOS1_CONFIG_RETURN
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT ADIOS_CONFIG_RETURN EQUAL 0)
set(ADIOS_FOUND FALSE)
if(NOT ADIOS1_CONFIG_RETURN EQUAL 0)
set(ADIOS1_FOUND FALSE)
message(STATUS "Can NOT execute 'adios_config' - check file permissions")
endif()
# find ADIOS_ROOT_DIR
execute_process(COMMAND ${ADIOS_CONFIG} -d
OUTPUT_VARIABLE ADIOS_ROOT_DIR
# find ADIOS1_ROOT_DIR
execute_process(COMMAND ${ADIOS1_CONFIG} -d
OUTPUT_VARIABLE ADIOS1_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT IS_DIRECTORY "${ADIOS_ROOT_DIR}")
set(ADIOS_FOUND FALSE)
message(STATUS "The directory provided by 'adios_config -d' does not exist: ${ADIOS_ROOT_DIR}")
if(NOT IS_DIRECTORY "${ADIOS1_ROOT_DIR}")
set(ADIOS1_FOUND FALSE)
message(STATUS "The directory provided by 'adios_config -d' does not exist: ${ADIOS1_ROOT_DIR}")
endif()
endif(ADIOS_FOUND)
endif(ADIOS1_FOUND)
# option: use only static libs ################################################
if(ADIOS_USE_STATIC_LIBS)
if(ADIOS1_USE_STATIC_LIBS)
# carfully: we have to restore the original path in the end
set(_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif()
# we found something in ADIOS_ROOT_DIR and adios_config works #################
if(ADIOS_FOUND)
# ADIOS headers
list(APPEND ADIOS_INCLUDE_DIRS ${ADIOS_ROOT_DIR}/include)
# we found something in ADIOS1_ROOT_DIR and adios_config works #################
if(ADIOS1_FOUND)
# ADIOS1 headers
list(APPEND ADIOS1_INCLUDE_DIRS ${ADIOS1_ROOT_DIR}/include)
# check for compiled in dependencies, recomve ";" in ADIOS_LINKFLAGS (from cmake build)
string(REGEX REPLACE ";" " " ADIOS_LINKFLAGS "${ADIOS_LINKFLAGS}")
message(STATUS "ADIOS linker flags (unparsed): ${ADIOS_LINKFLAGS}")
# check for compiled in dependencies, recomve ";" in ADIOS1_LINKFLAGS (from cmake build)
string(REGEX REPLACE ";" " " ADIOS1_LINKFLAGS "${ADIOS1_LINKFLAGS}")
message(STATUS "ADIOS1 linker flags (unparsed): ${ADIOS1_LINKFLAGS}")
# find all library paths -L
# note: this can cause trouble if some libs are specified twice from
# different sources (quite unlikely)
# http://www.cmake.org/pipermail/cmake/2008-November/025128.html
set(ADIOS_LIBRARY_DIRS "")
string(REGEX MATCHALL " -L([A-Za-z_0-9/\\.-]+)" _ADIOS_LIBDIRS " ${ADIOS_LINKFLAGS}")
foreach(_LIBDIR ${_ADIOS_LIBDIRS})
set(ADIOS1_LIBRARY_DIRS "")
string(REGEX MATCHALL " -L([A-Za-z_0-9/\\.-]+)" _ADIOS1_LIBDIRS " ${ADIOS1_LINKFLAGS}")
foreach(_LIBDIR ${_ADIOS1_LIBDIRS})
string(REPLACE " -L" "" _LIBDIR ${_LIBDIR})
list(APPEND ADIOS_LIBRARY_DIRS ${_LIBDIR})
list(APPEND ADIOS1_LIBRARY_DIRS ${_LIBDIR})
endforeach()
# we could append ${CMAKE_PREFIX_PATH} now but that is not really necessary
#message(STATUS "ADIOS DIRS to look for libs: ${ADIOS_LIBRARY_DIRS}")
#message(STATUS "ADIOS1 DIRS to look for libs: ${ADIOS1_LIBRARY_DIRS}")
# parse all -lname libraries and find an absolute path for them
string(REGEX MATCHALL " -l([A-Za-z_0-9\\.-]+)" _ADIOS_LIBS " ${ADIOS_LINKFLAGS}")
foreach(_LIB ${_ADIOS_LIBS})
string(REGEX MATCHALL " -l([A-Za-z_0-9\\.-]+)" _ADIOS1_LIBS " ${ADIOS1_LINKFLAGS}")
foreach(_LIB ${_ADIOS1_LIBS})
string(REPLACE " -l" "" _LIB ${_LIB})
# find static lib: absolute path in -L then default
find_library(_LIB_DIR NAMES ${_LIB} PATHS ${ADIOS_LIBRARY_DIRS} CMAKE_FIND_ROOT_PATH_BOTH)
find_library(_LIB_DIR NAMES ${_LIB} PATHS ${ADIOS1_LIBRARY_DIRS} CMAKE_FIND_ROOT_PATH_BOTH)
# found?
if(_LIB_DIR)
message(STATUS "Found ${_LIB} in ${_LIB_DIR}")
list(APPEND ADIOS_LIBRARIES "${_LIB_DIR}")
list(APPEND ADIOS1_LIBRARIES "${_LIB_DIR}")
else(_LIB_DIR)
set(ADIOS_FOUND FALSE)
message(STATUS "ADIOS: Could NOT find library '${_LIB}'")
set(ADIOS1_FOUND FALSE)
message(STATUS "ADIOS1: Could NOT find library '${_LIB}'")
endif(_LIB_DIR)
# clean cached var
......@@ -203,25 +203,25 @@ if(ADIOS_FOUND)
endforeach()
#add libraries which are already using cmake format
string(REGEX MATCHALL "/([A-Za-z_0-9/\\.-]+)\\.([a|so]+)" _ADIOS_LIBS_SUB "${ADIOS_LINKFLAGS}")
list(APPEND ADIOS_LIBRARIES "${_ADIOS_LIBS_SUB}")
string(REGEX MATCHALL "/([A-Za-z_0-9/\\.-]+)\\.([a|so]+)" _ADIOS1_LIBS_SUB "${ADIOS1_LINKFLAGS}")
list(APPEND ADIOS1_LIBRARIES "${_ADIOS1_LIBS_SUB}")
# add the version string
execute_process(COMMAND ${ADIOS_CONFIG} -v
OUTPUT_VARIABLE ADIOS_VERSION
execute_process(COMMAND ${ADIOS1_CONFIG} -v
OUTPUT_VARIABLE ADIOS1_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(ADIOS_FOUND)
endif(ADIOS1_FOUND)
# unset checked variables if not found
if(NOT ADIOS_FOUND)
unset(ADIOS_INCLUDE_DIRS)
unset(ADIOS_LIBRARIES)
endif(NOT ADIOS_FOUND)
if(NOT ADIOS1_FOUND)
unset(ADIOS1_INCLUDE_DIRS)
unset(ADIOS1_LIBRARIES)
endif(NOT ADIOS1_FOUND)
# restore CMAKE_FIND_LIBRARY_SUFFIXES if manipulated by this module ###########
if(ADIOS_USE_STATIC_LIBS)
if(ADIOS1_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
......@@ -232,7 +232,7 @@ endif()
# handles the REQUIRED, QUIET and version-related arguments for find_package
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ADIOS
REQUIRED_VARS ADIOS_LIBRARIES ADIOS_INCLUDE_DIRS
VERSION_VAR ADIOS_VERSION
find_package_handle_standard_args(ADIOS1
REQUIRED_VARS ADIOS1_LIBRARIES ADIOS1_INCLUDE_DIRS
VERSION_VAR ADIOS1_VERSION
)
......@@ -49,7 +49,7 @@ find_library(LIBSIM_LIBRARY NAMES simV2
find_library(LIBSIM_LIBRARY NAMES simV2)
mark_as_advanced(LIBSIM_LIBRARY)
set(LIBSIM_LIBRARIES ${LIBSIM_LIBRARY} ${LIBSIM_THIRD_PARTY})
set(LIBSIM_LIBRARIES ${LIBSIM_LIBRARY} ${LIBSIM_THIRD_PARTY} dl)
# header
if(VISIT_DIR)
......
......@@ -30,7 +30,8 @@ set(ENABLE_PYTHON @ENABLE_PYTHON@)
set(ENABLE_CATALYST @ENABLE_CATALYST@)
set(ENABLE_CATALYST_PYTHON @ENABLE_CATALYST_PYTHON@)
set(ENABLE_LIBSIM @ENABLE_LIBSIM@)
set(ENABLE_ADIOS @ENABLE_ADIOS@)
set(ENABLE_ADIOS1 @ENABLE_ADIOS1@)
set(ENABLE_HDF5 @ENABLE_HDF5@)
set(ENABLE_CONDUIT @ENABLE_CONDUIT@)
set(ENABLE_VTK_GENERIC_ARRAYS @ENABLE_VTK_GENERIC_ARRAYS@)
set(ENABLE_VTK_ACCELERATORS @ENABLE_VTK_ACCELERATORS@)
......@@ -60,9 +61,7 @@ endif()
include(thread)
include(sMPI)
include(sVTK)
include(timer)
include(pugixml)
include(timer)
include(sDIY)
if (ENABLE_VTKM)
include(sVTKm)
......@@ -70,8 +69,11 @@ endif()
if (ENABLE_LIBSIM)
include(sLibsim)
endif()
if (ENABLE_ADIOS)
include(sADIOS)
if (ENABLE_ADIOS1)
include(sADIOS1)
endif()
if (ENABLE_HDF5)
include(sHDF5)
endif()
if (ENABLE_CONDUIT)
include(sConduit)
......
if(ENABLE_ADIOS)
find_package(ADIOS REQUIRED)
if(ENABLE_ADIOS1)
find_package(ADIOS1 REQUIRED)
add_library(sADIOS INTERFACE)
target_link_libraries(sADIOS INTERFACE ${ADIOS_LIBRARIES})
target_include_directories(sADIOS SYSTEM INTERFACE ${ADIOS_INCLUDE_DIRS})
if(ADIOS_DEFINITIONS)
target_compile_definitions(sADIOS INTERFACE ${ADIOS_DEFINITIONS})
add_library(sADIOS1 INTERFACE)
target_link_libraries(sADIOS1 INTERFACE ${ADIOS1_LIBRARIES})
target_include_directories(sADIOS1 SYSTEM INTERFACE ${ADIOS1_INCLUDE_DIRS})
if(ADIOS1_DEFINITIONS)
target_compile_definitions(sADIOS1 INTERFACE ${ADIOS1_DEFINITIONS})
endif()
install(TARGETS sADIOS EXPORT sADIOS)
install(EXPORT sADIOS DESTINATION lib/cmake EXPORT_LINK_INTERFACE_LIBRARIES)
install(TARGETS sADIOS1 EXPORT sADIOS1)
install(EXPORT sADIOS1 DESTINATION lib/cmake EXPORT_LINK_INTERFACE_LIBRARIES)
endif()
if (ENABLE_CATALYST)
set(SENSEI_PV_COMPONENTS vtkPVCatalyst vtkPVServerManagerRendering)
set(sensei_pv_components_legacy vtkPVCatalyst vtkPVServerManagerRendering)
set(sensei_pv_components_modern Catalyst ServerManagerRendering)
if(ENABLE_CATALYST_PYTHON)
list(APPEND SENSEI_PV_COMPONENTS vtkPVPythonCatalyst)
list(APPEND sensei_pv_components_legacy vtkPVPythonCatalyst)
list(APPEND sensei_pv_components_modern PythonCatalyst)
endif()
find_package(ParaView CONFIG QUIET)
if(NOT ParaView_FOUND)
message(STATUS ${ParaView_NOT_FOUND_MESSAGE})
message(FATAL_ERROR "Catalyst analysis components require Catalyst build "
"(or install directory. Please set ParaView_DIR to point to directory "
"containing `ParaViewConfig.cmake` or `paraview-config.cmake`.")
endif()
if (ParaView_VERSION VERSION_LESS "5.7.0")
set (SENSEI_PV_COMPONENTS ${sensei_pv_components_legacy} ${SENSEI_VTK_COMPONENTS})
else()
set (SENSEI_PV_COMPONENTS ${sensei_pv_components_modern})
endif()
find_package(ParaView CONFIG COMPONENTS ${SENSEI_PV_COMPONENTS})
find_package(ParaView COMPONENTS ${SENSEI_VTK_COMPONENTS}
${SENSEI_PV_COMPONENTS})
# avoid leaking these internal variables
unset(sensei_pv_components_legacy)
unset(sensei_pv_components_modern)
if(NOT ParaView_FOUND)
message(FATAL_ERROR "Catalyst analysis components require Catalyst build"
"(or install directory. Please set ParaView_DIR to point to " "directory"
"containing `ParaViewConfig.cmake`.")
message(FATAL_ERROR "Catalyst analysis components require Catalyst build "
"(or install directory. Please set ParaView_DIR to point to directory "
"containing `ParaViewConfig.cmake` or `paraview-config.cmake`.")
endif()
add_library(sVTK INTERFACE)
target_link_libraries(sVTK INTERFACE ${VTK_LIBRARIES})
target_include_directories(sVTK SYSTEM INTERFACE ${PARAVIEW_INCLUDE_DIRS})
target_compile_definitions(sVTK INTERFACE ${VTK_DEFINITIONS})
if (ParaView_VERSION VERSION_LESS "5.7.0")
target_link_libraries(sVTK INTERFACE ${VTK_LIBRARIES})
target_include_directories(sVTK SYSTEM INTERFACE ${PARAVIEW_INCLUDE_DIRS})
target_compile_definitions(sVTK INTERFACE ${VTK_DEFINITIONS})
else()
# find VTK separately
find_package(VTK CONFIG QUIET COMPONENTS ${SENSEI_VTK_COMPONENTS})
target_link_libraries(sVTK INTERFACE ${ParaView_LIBRARIES} ${VTK_LIBRARIES})
endif()
install(TARGETS sVTK EXPORT sVTK)
install(EXPORT sVTK DESTINATION lib/cmake EXPORT_LINK_INTERFACE_LIBRARIES)
......
if (ENABLE_HDF5)
find_package(HDF5 REQUIRED COMPONENTS C)
if(NOT HDF5_IS_PARALLEL)
message(SEND_ERROR "Failed to locate parallel hdf5 installation")
endif()
add_library(sHDF5 INTERFACE)
target_link_libraries(sHDF5 INTERFACE ${HDF5_LIBRARIES})
target_include_directories(sHDF5 SYSTEM INTERFACE ${HDF5_INCLUDE_DIRS})
install(TARGETS sHDF5 EXPORT sHDF5)
install(EXPORT sHDF5 DESTINATION lib/cmake EXPORT_LINK_INTERFACE_LIBRARIES)
endif()
find_package(MPI)
if (ENABLE_CRAY_MPICH OR (NOT DEFINED ENABLE_CRAY_MPICH AND NOT ("$ENV{CRAY_MPICH_DIR}" STREQUAL "")))
set(ENV{PKG_CONFIG_PATH} "$ENV{CRAY_MPICH_DIR}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
find_package(PkgConfig QUIET)
pkg_check_modules(CRAY_MPICH REQUIRED QUIET mpich)
set(MPI_C_INCLUDE_PATH ${CRAY_MPICH_INCLUDE_DIRS} CACHE STRING "MPI include directories")
set(MPI_C_LIBRARIES ${CRAY_MPICH_LDFLAGS} CACHE STRING "MPI link dependencies")
set(MPIEXEC srun CACHE STRING "Platform MPI run equivalent")
set(MPI_C_FOUND CACHE BOOL ON "status of MPI config")
else()
find_package(MPI)
endif()
if (NOT MPI_C_FOUND)
message(FETAL_ERROR "Failed to locate MPI C libraries and headers")
......
......@@ -16,8 +16,12 @@ cmake_dependent_option(ENABLE_CATALYST_PYTHON
"Enable analysis methods that use Catalyst Python scripts" OFF
"ENABLE_CATALYST" OFF)
cmake_dependent_option(ENABLE_ADIOS
"Enable analysis methods that use ADIOS" OFF
cmake_dependent_option(ENABLE_ADIOS1
"Enable analysis methods that use ADIOS 1" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_HDF5
"Enable analysis methods that use HDF5" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_CONDUIT
......@@ -44,6 +48,10 @@ cmake_dependent_option(ENABLE_VTK_ACCELERATORS
"Enable analysis methods that use VTK-m via VTK's Accelerators module" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTK_FILTERS
"Enable use of VTK's generic filters library" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTKM
"Enable analysis methods that use VTK-m" OFF
"ENABLE_SENSEI" OFF)
......@@ -52,26 +60,31 @@ cmake_dependent_option(ENABLE_VTKM_RENDERING
"Enable analysis methods that use VTK-m's rendering library" OFF
"ENABLE_VTKM" OFF)
option(ENABLE_PARALLEL3D "Enable Parallel3D miniapp" ON)
option(ENABLE_PROFILER "Enable the internal profiler" OFF)
option(ENABLE_OSCILLATORS "Enable Oscillators miniapp" ON)
option(ENABLE_CONDUITTEST "Enable Conduit miniapp" OFF)
option(ENABLE_KRIPKE "Enable Kripke miniapp" OFF)
option(ENABLE_MANDELBROT "Enable Mandelbrot miniapp" ON)
option(ENABLE_VORTEX "Enable Vortex miniapp" ON)
message(STATUS "ENABLE_SENSEI=${ENABLE_SENSEI}")
message(STATUS "ENABLE_PYTHON=${ENABLE_PYTHON}")
message(STATUS "ENABLE_VTK_GENERIC_ARRAYS=${ENABLE_VTK_GENERIC_ARRAYS}")
message(STATUS "ENABLE_CATALYST=${ENABLE_CATALYST}")
message(STATUS "ENABLE_CATALYST_PYTHON=${ENABLE_CATALYST}")
message(STATUS "ENABLE_ADIOS=${ENABLE_ADIOS}")
message(STATUS "ENABLE_ADIOS1=${ENABLE_ADIOS1}")
message(STATUS "ENABLE_HDF5=${ENABLE_HDF5}")
message(STATUS "ENABLE_CONDUIT=${ENABLE_CONDUIT}")
message(STATUS "ENABLE_LIBSIM=${ENABLE_LIBSIM}")
message(STATUS "ENABLE_VTK_IO=${ENABLE_VTK_IO}")
message(STATUS "ENABLE_VTK_MPI=${ENABLE_VTK_MPI}")
message(STATUS "ENABLE_VTK_RENDERING=${ENABLE_VTK_RENDERING}")
message(STATUS "ENABLE_VTK_ACCELERATORS=${ENABLE_VTK_ACCELERATORS}")
message(STATUS "ENABLE_VTK_FILTERS=${ENABLE_VTK_FILTERS}")
message(STATUS "ENABLE_VTKM=${ENABLE_VTKM}")
message(STATUS "ENABLE_VTKM_RENDERING=${ENABLE_VTKM_RENDERING}")
message(STATUS "ENABLE_PARALLEL3D=${ENABLE_PARALLEL3D}")
message(STATUS "ENABLE_PROFILER=${ENABLE_PROFILER}")
message(STATUS "ENABLE_OSCILLATORS=${ENABLE_OSCILLATORS}")
message(STATUS "ENABLE_CONDUITTEST=${ENABLE_CONDUITTEST}")
message(STATUS "ENABLE_KRIPKE=${ENABLE_KRIPKE}")
if (ENABLE_PYTHON)
# TODO -- Python 3
find_package(PythonInterp REQUIRED)
if(PYTHONINTERP_FOUND)
find_program(PYTHON_CONFIG_EXECUTABLE python-config)
if (NOT PYTHON_CONFIG_EXECUTABLE)
message(SEND_ERROR "python-config executable is required.")
endif()
execute_process(COMMAND ${PYTHON_CONFIG_EXECUTABLE} --prefix
OUTPUT_VARIABLE python_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
set(PYTHON_INCLUDE_DIR ${python_prefix}/include/python2.7)
if (EXISTS ${python_prefix}/lib/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX})
set(PYTHON_LIBRARY ${python_prefix}/lib/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX})
elseif (EXISTS ${python_prefix}/lib64/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX})
set(PYTHON_LIBRARY ${python_prefix}/lib64/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX})
elseif (EXISTS ${python_prefix}/lib/x86_64-linux-gnu/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX})
set(PYTHON_LIBRARY ${python_prefix}/lib/x86_64-linux-gnu/libpython2.7${CMAKE_SHARED_LIBRARY_SUFFIX})
else()
message(SEND_ERROR "Failed to locate Python library for ${python_prefix}")
endif()
endif()
find_package(PythonLibs REQUIRED)
set(SENSEI_PYTHON_VERSION 2 CACHE STRING "The major version number of Python SENSEI should use.")
set_property(CACHE SENSEI_PYTHON_VERSION PROPERTY STRINGS 2 3)
find_package(PythonInterp ${SENSEI_PYTHON_VERSION} REQUIRED)
find_package(PythonLibs ${SENSEI_PYTHON_VERSION} REQUIRED)
find_package(NUMPY REQUIRED)
find_program(swig_cmd NAMES swig swig3.0)
if (swig_cmd-NOTFOUND)
......
......@@ -5,6 +5,9 @@ if (BUILD_TESTING)
include(CTest)
endif()
set(TEST_NP "4" CACHE STRING "Number of procs to use in parallel tests")
math(EXPR TEST_NP_HALF "${TEST_NP}/2")
# senseiAddTest(name
# EXEC_NAME -- optional, name of the copiled test
# SOURCES -- optional, source files to comile
......
set(SENSEI_VTK_COMPONENTS vtkCommonDataModel)
# lets build the list of modules for VTK pre-8.90 and post 8.90
set(sensei_vtk_components_legacy)
set(sensei_vtk_components_modern)
set(sensei_vtk_components_legacy vtkCommonDataModel)
set(sensei_vtk_components_modern CommonDataModel)