Commit 922302cb authored by Burlen Loring's avatar Burlen Loring

Merge branch 'sensei_3_development' into 'master'

sensei 3.1.0

See merge request !206
parents 3d66d374 e5df0176
###############################################################################
# Expects ASCENT_DIR to point to a Ascent installation.
#
# This file defines the following CMake variables:
# ASCENT_FOUND - If Ascent was found
# ASCENT_INCLUDE_DIRS - The Ascent include directories
# target_link_libraries(<target> ascent::ascent)
#
###############################################################################
# Check for ASCENT_DIR
if(NOT ASCENT_DIR)
MESSAGE(FATAL_ERROR "Could not find Ascent. Ascent requires explicit ASCENT_DIR.")
endif()
if(NOT EXISTS ${ASCENT_DIR}/lib/cmake/AscentConfig.cmake)
MESSAGE(FATAL_ERROR "Could not find Ascent CMake include file (${ASCENT_DIR}/lib/cmake/AscentConfig.cmake)")
endif()
# Use CMake's find_package to import Ascent's targets
find_package(Ascent REQUIRED
NO_DEFAULT_PATH
PATHS ${ASCENT_DIR}/lib/cmake)
......@@ -42,85 +42,49 @@
#
###############################################################################
###############################################################################
#
# Kripke CMake Build for Ascent
# Setup VTKm
#
###############################################################################
#
# Expects VTKM_DIR to point to a Conduit installations.
#
# This file defines the following CMake variables:
# VTKM_FOUND - If Conduit was found
# VTKM_INCLUDE_DIRS - The Conduit include directories
#
# If found, the vtkm CMake targets will also be imported.
# The main vtkm library targets are:
# vtkm
# vtkm_cont
# vtkm_rendering
#
###############################################################################
###############################################################################
# Check for VTKM_DIR
###############################################################################
if(NOT VTKH_DIR)
MESSAGE(FATAL_ERROR "Could not find VTKH_DIR. Conduit requires explicit VTKH_DIR.")
endif()
set(KRIPKE_SOURCES
Kripke/Directions.cpp
Kripke/Grid.cpp
Kripke/Kernel.cpp
Kripke/Layout.cpp
Kripke/Subdomain.cpp
Kripke/Sweep_Solver.cpp
Kripke/ParallelComm.cpp
Kripke/Timing.cpp
Kripke/Kernel/Kernel_3d_GDZ.cpp
Kripke/Kernel/Kernel_3d_DGZ.cpp
Kripke/Kernel/Kernel_3d_ZDG.cpp
Kripke/Kernel/Kernel_3d_DZG.cpp
Kripke/Kernel/Kernel_3d_ZGD.cpp
Kripke/Kernel/Kernel_3d_GZD.cpp
Kripke/ParallelComm/BlockJacobiComm.cpp
Kripke/ParallelComm/SweepComm.cpp
tools/kripke.cpp
tools/testKernels.cpp
)
# kripke reqs mpi
if(MPI_FOUND)
# copy over example command line
configure_file(run_kripke_simple_example.sh
${CMAKE_CURRENT_BINARY_DIR}/run_kripke_simple_example.sh
COPYONLY)
configure_file(ascent_actions.json ${CMAKE_CURRENT_BINARY_DIR}/ascent_actions.json COPYONLY)
configure_file(ascent_options.json ${CMAKE_CURRENT_BINARY_DIR}/ascent_options.json COPYONLY)
if(ENABLE_OPENMP)
set(kripke_openmp_flags "-DKRIPKE_USE_OPENMP")
else()
set(kripke_openmp_flags "")
endif()
include_directories(.)
include_directories("tools")
set(kripke_par_deps ascent_mpi mpi)
if(ENABLE_OPENMP)
list(APPEND kripke_par_deps openmp)
endif()
blt_add_executable(
NAME kripke_par
SOURCES ${KRIPKE_SOURCES}
DEPENDS_ON ${kripke_par_deps}
OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
blt_add_target_compile_flags(TO kripke_par FLAGS "-D PARALLEL ${kripke_openmp_flags}")
# install target for kripke mpi
install(TARGETS kripke_par
EXPORT ascent
LIBRARY DESTINATION examples/proxies/kripke
ARCHIVE DESTINATION examples/proxies/kripke
RUNTIME DESTINATION examples/proxies/kripke
)
install(FILES ASCENT_README.md
ascent_actions.json
ascent_options.json
DESTINATION examples/proxies/kripke)
if(NOT EXISTS ${VTKH_DIR}/lib/VTKhConfig.cmake)
MESSAGE(FATAL_ERROR "Could not find VTKh CMake include file (${VTKH_DIR}/lib/VTKhConfig.cmake)")
endif()
###############################################################################
# Import VTKm CMake targets
###############################################################################
include(${VTKH_DIR}/lib/VTKhConfig.cmake)
###############################################################################
# Set remaning CMake variables
###############################################################################
# we found VTKh
set(VTKH_FOUND TRUE)
# provide location of the headers in VTKM_INCLUDE_DIRS
set(VTKH_INCLUDE_DIRS ${VTKH_DIR}/include/)
......
......@@ -39,6 +39,7 @@ set(ENABLE_VTK_MPI @ENABLE_VTK_MPI@)
set(ENABLE_VTK_IO @ENABLE_VTK_IO@)
set(ENABLE_VTKM @ENABLE_VTKM@)
set(ENABLE_VTKM_RENDERING @ENABLE_VTKM_RENDERING@)
set(ENABLE_ASCENT @ENABLE_ASCENT@)
if (NOT CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS@"
......@@ -76,8 +77,19 @@ if (ENABLE_HDF5)
include(sHDF5)
endif()
if (ENABLE_CONDUIT)
if(NOT CONDUIT_DIR)
set(CONDUIT_DIR "@CONDUIT_DIR@")
endif()
find_package(Conduit REQUIRED NO_DEFAULT_PATH PATHS ${CONDUIT_DIR}/lib/cmake)
include(sConduit)
endif()
if(ENABLE_ASCENT)
if(NOT ASCENT_DIR)
set(ASCENT_DIR "@ASCENT_DIR@")
endif()
find_package(Ascent REQUIRED NO_DEFAULT_PATH PATHS ${ASCENT_DIR}/lib/cmake)
include(sAscent)
endif()
include(senseiCore)
if (ENABLE_PYTHON)
include(sPython)
......
if(ENABLE_ASCENT)
find_package(Ascent REQUIRED NO_DEFAULT_PATH PATHS ${ASCENT_DIR}/lib/cmake)
if(NOT ENABLE_CONDUIT)
add_library(sConduit INTERFACE)
endif()
add_library(sAscent INTERFACE)
target_link_libraries(sAscent INTERFACE ascent::ascent_mpi)
target_include_directories(sAscent SYSTEM INTERFACE ${ASCENT_INCLUDE_DIRS})
install(TARGETS sAscent EXPORT sAscent)
install(EXPORT sAscent DESTINATION lib/cmake EXPORT_LINK_INTERFACE_LIBRARIES)
endif()
if(ENABLE_CONDUIT)
find_package(Conduit REQUIRED)
find_package(Conduit REQUIRED NO_DEFAULT_PATH PATHS ${CONDUIT_DIR}/lib/cmake)
add_library(sconduit INTERFACE)
add_library(sConduit INTERFACE)
target_link_libraries(sconduit INTERFACE conduit conduit_relay conduit_blueprint)
target_link_libraries(sConduit INTERFACE conduit::conduit_mpi)
target_include_directories(sConduit SYSTEM INTERFACE ${CONDUIT_INCLUDE_DIRS})
target_include_directories(sconduit SYSTEM INTERFACE ${CONDUIT_INCLUDE_DIRS})
install(TARGETS sconduit EXPORT sconduit)
install(EXPORT sconduit DESTINATION lib/cmake EXPORT_LINK_INTERFACE_LIBRARIES)
install(TARGETS sConduit EXPORT sConduit)
install(EXPORT sConduit DESTINATION lib/cmake EXPORT_LINK_INTERFACE_LIBRARIES)
endif()
......@@ -4,10 +4,6 @@ cmake_dependent_option(ENABLE_PYTHON
"Enable Python binding to Sensei infrastucture" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTK_GENERIC_ARRAYS
"VTK build has Generic arrays" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_CATALYST
"Enable analysis methods that use Catalyst" OFF
"ENABLE_SENSEI" OFF)
......@@ -28,10 +24,22 @@ cmake_dependent_option(ENABLE_CONDUIT
"Enable analysis methods that use Conduit" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_ASCENT
"Enable analysis methods that use Ascent" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_ASCENT
"Enable analysis methods that use ASCENT" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_LIBSIM
"Enable analysis methods that use Libsim" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTK_GENERIC_ARRAYS
"VTK build has Generic arrays" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTK_IO
"Enable use of vtk I/O" OFF
"ENABLE_SENSEI" OFF)
......@@ -60,8 +68,9 @@ cmake_dependent_option(ENABLE_VTKM_RENDERING
"Enable analysis methods that use VTK-m's rendering library" OFF
"ENABLE_VTKM" OFF)
option(ENABLE_PROFILER "Enable the internal profiler" OFF)
option(ENABLE_OPTS "A version of the getopt function" 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)
......@@ -70,13 +79,14 @@ 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_ADIOS1=${ENABLE_ADIOS1}")
message(STATUS "ENABLE_HDF5=${ENABLE_HDF5}")
message(STATUS "ENABLE_CONDUIT=${ENABLE_CONDUIT}")
message(STATUS "ENABLE_ASCENT=${ENABLE_ASCENT}")
message(STATUS "ENABLE_LIBSIM=${ENABLE_LIBSIM}")
message(STATUS "ENABLE_VTK_GENERIC_ARRAYS=${ENABLE_VTK_GENERIC_ARRAYS}")
message(STATUS "ENABLE_VTK_IO=${ENABLE_VTK_IO}")
message(STATUS "ENABLE_VTK_MPI=${ENABLE_VTK_MPI}")
message(STATUS "ENABLE_VTK_RENDERING=${ENABLE_VTK_RENDERING}")
......@@ -85,6 +95,8 @@ 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_PROFILER=${ENABLE_PROFILER}")
message(STATUS "ENABLE_DIY=${ENABLE_DIY}")
message(STATUS "ENABLE_OPTS=${ENABLE_OPTS}")
message(STATUS "ENABLE_OSCILLATORS=${ENABLE_OSCILLATORS}")
message(STATUS "ENABLE_CONDUITTEST=${ENABLE_CONDUITTEST}")
message(STATUS "ENABLE_KRIPKE=${ENABLE_KRIPKE}")
if(ENABLE_OPTS)
add_library(sOPTS INTERFACE)
target_include_directories(sOPTS SYSTEM INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/utils/opts/include>
$<INSTALL_INTERFACE:include>)
install(TARGETS sOPTS EXPORT sOPTS)
install(EXPORT sOPTS DESTINATION lib/cmake)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/utils/opts/include" DESTINATION include)
endif()
......@@ -18,6 +18,8 @@ include(libsim)
include(catalyst)
include(vtkm)
include(conduit)
include(ascent)
include(opts)
include(python)
include(version)
include(config)
......
......@@ -36,12 +36,13 @@ data in a consistent way; and a number of implementations of both. For more
information see our [SC16 paper](http://dl.acm.org/citation.cfm?id=3015010).
#### DataAdaptors
| Class | Description |
|-------------------|-------------|
| DataAdaptor | Base class declaring data adaptor API |
| VTKDataAdaptor | Implementation for use with VTK data sets. This adaptor can be used to pass VTK data sets from the simulation to the Analysis. |
| ADIOS1DataAdaptor | Implementation that serves up data from ADIOS 1. For use in an ADIOS 1 End point. |
| HDF5DataAdaptor | Implementation that serves up data from HDF5. For use in a HDF5 End point. |
| Class | Description |
|----------------------|-------------|
| DataAdaptor | Base class declaring data adaptor API |
| InTransitDataAdaptor | Base class declaring in transit data adaptor API |
| VTKDataAdaptor | Implementation for use with VTK data sets. This adaptor can be used to pass VTK data sets from the simulation to the Analysis. |
| ADIOS1DataAdaptor | Implementation that serves up data from ADIOS 1. For use in the SENSEI End point. |
| HDF5DataAdaptor | Implementation that serves up data from HDF5. For use in the SENSEI End point. |
#### AnalysisAdaptors
| Class | Description |
......@@ -50,11 +51,12 @@ information see our [SC16 paper](http://dl.acm.org/citation.cfm?id=3015010).
| ADIOS1AnalysisAdaptor | Implementation for using ADIOS 1 from your simulation. |
| HDF5AnalysisAdaptor | Implementation for using HDF5 from your simulation. |
| LibsimAnalysisAdaptor | Implementation for using Libsim from your simulation. |
| CatalystAnalysisAdaptor | Implementation for using Catalyst from your simulaiton. |
| CatalystAnalysisAdaptor | Implementation for using Catalyst from your simulation. |
| AscentAnalysisAdaptor | Implementation for using Ascent from your simulation. |
| Autocorrelation | Implementation that computes [autocorrelation](https://en.wikipedia.org/wiki/Autocorrelation) |
| Histogram | Implementation that computes histograms. |
| PosthocIO | Implementation that writes uniform meshes using VTK or MPI I/O. This was used in year II miniapp campaign. |
| VTKPosthocIO | Implementation that writes VTK data sets using VTK XML format to the ".visit" format readable by VisIt, or ".pvd" format readable by ParaView. |
| VTKAmrWriter | Implementation that writes AMR data in VTK's XML format. Consumable by ParaView. |
| ConfigurableAnalysis | Implementation that reads an XML configuration to select and configure one or more of the other analysis adaptors. This can be used to quickly switch between the analysis adaptors at run time. |
### Mini-apps
......@@ -68,10 +70,6 @@ autocorrelation.
More information on each mini-app is provided in the coresponding README in the
mini-app's source directory.
* [Parallel3D](miniapps/parallel3d/README.md) The miniapp from year I generates
data on a uniform mesh and demonstrates usage with in situ infrasturctures
and histogram analysis.
* [Oscillators](miniapps/oscillators/README.md) The miniapp from year II
generates time varying data on a uniform mesh and demonstrates usage with in
situ infrasturctures, histogram, and autocorrelation analyses.
......@@ -79,14 +77,12 @@ mini-app's source directory.
* [Newton](miniapps/newton/README.md) This Python n-body miniapp demonstrates
usage of in situ infrastructures and custom analyses from Python.
### End points
### The SENSEI End point
End points are programs that receive and analyze simulation data through transport
layers such as ADIOS and LibIS. The end point uses the transport's data adaptor to
reads data being serialized by the transport's analysis adaptor and pass it back
layers such as ADIOS and LibIS. The SENSEI end point uses the transport's data adaptor to
read data being serialized by the transport's analysis adaptor and pass it back
into a SENSEI analysis for further processing.
* [ADIOSAnalysisEndPoint](endpoints/README.md)
## Build and Install
The SENSEI project uses CMake 3.0 or later. The CMake build options allow you
to choose which of the mini-apps to build as well as which frameworks to enable.
......@@ -106,33 +102,35 @@ $ make install
### Build Options
| Build Option | Default | Description |
|--------------|---------|---------------------------------|
| `ENABLE_SENSEI` | ON | Enables the core SENSEI library. Requires VTK. When this is disabled, the included mini-apps will run fixed analyses. When enabled, the mini-apps will pass data through SENSEI and the analysis may be configured at run-time. This allows SENSEI overhead to be characterized.|
| `ENABLE_PYTHON` | OFF | Enables Python bindings. Requires VTK, Python, Numpy, mpi4py, and SWIG. |
| `ENABLE_VTK_GENERIC_ARRAYS` | OFF | Enables use of VTK's generic array feature. |
| `ENABLE_CATALYST` | OFF | Enables the Catalyst analysis adaptor. Depends on ParaView Catalyst. Set `ParaView_DIR`. |
| `ENABLE_CATALYST_PYTHON` | OFF | Enables Python features of the Catalyst analysis adaptor. |
| `ENABLE_ASCENT` | OFF | Enables the Ascent analysis adaptor. |
| `ENABLE_ADIOS1` | OFF | Enables ADIOS 1 adaptors and endpoints. Set `ADIOS_DIR`. |
| `ENABLE_HDF5` | OFF | Enables HDF5 adaptors and endpoints. Set `HDF5_DIR`. |
| `ENABLE_LIBSIM` | OFF | Enables Libsim data and analysis adaptors. Requires Libsim. Set `VTK_DIR` and `LIBSIM_DIR`. |
| `ENABLE_VTK_IO` | OFF | Enables adaptors to write to VTK XML format. |
| `ENABLE_VTK_MPI` | OFF | Enables MPI parallel VTK filters, such as parallel I/O. |
| `ENABLE_VTKM` | ON | Enables analyses that use VTKm directly instead of via VTK. |
| `ENABLE_PARALLEL3D` | ON | Enables the parallel 3D mini-app. |
| `ENABLE_OSCILLATORS` | ON | Enables the oscillators mini-app. |
| `VTK_DIR` | | Set to the directory containing VTKConfig.cmake. |
| `ParaView_DIR` | | Set to the directory containing ParaViewConfig.cmake. |
| `ADIOS_DIR` | | Set to the directory containing ADIOSConfig.cmake |
| `LIBSIM_DIR` | | Path to libsim install. |
### For use with ADIOS 1
### For use with Ascent
```bash
cmake -DENABLE_SENSEI=ON -DENABLE_ADIOS1=ON -DVTK_DIR=[your path] -DADIOS_DIR=[your path] ..
cmake -DENABLE_ASCENT=ON -DVTKM_DIR=[your path] -DVTKH_DIR=[your path] \
-DCONDUIT_DIR=[your path] -DAscent_DIR=[your path] -DVTK_DIR=[your path] \
..
```
Can be used with either `ParaView_DIR` when configuring in conjunction with
Catalyst, or `VTK_DIR` otherwise.
Note that the VTK build needs to explicitly disable use of VTK-m as this will
conflict with the version required by Ascent. We used the instructions for
building Ascent and its dependencies (VTK-m, VTK-h, Conduit, etc) manually as
described in the Ascent documentation.
### For use with Libsim
### For use the Libsim
```bash
cmake -DENABLE_SENSEI=ON -DENABLE_LIBSIM=ON -DVTK_DIR=[your path] -DLIBSIM_DIR=[your path] ..
```
......@@ -147,13 +145,29 @@ Note that a development version of ParaView is required when building with
both `ENABLE_CATALYST` and `ENABLE_VTKM` are enabled as released versions of
ParaView (5.5.2 and earlier) do not include a modern-enough version of vtk-m.
### For use with ADIOS 1
```bash
cmake -DENABLE_SENSEI=ON -DENABLE_ADIOS1=ON -DVTK_DIR=[your path] -DADIOS_DIR=[your path] ..
```
Can be used with either `ParaView_DIR` when configuring in conjunction with
Catalyst, or `VTK_DIR` otherwise.
### For use with Python
In essence this is as simple as adding `-DENABLE_PYTHON=ON -DSENSEI_PYTHON_VERSION=3`
However, VTK (or ParaView when used with Catalyst) needs to be built with
Python enabled and the SENSEI build needs to use the same version; and NumPy,
mpi4py, and SWIG are required. Note that there are some caveats when used with
Catalyst and Libsim. These are described in more detail in the Newton mini app
[README](miniapps/newton/README.md).
### Enable writing to Visit ".visit" format or ParaView ".pvd" format
```bash
cmake -DENABLE_SENSEI=ON -DENABLE_VTK_IO=ON -DVTK_DIR=[your path] ..
```
Can be used with either `ParaView_DIR` or `VTK_DIR`.
### For use with VTK-m
### For use with experimental VTK-m analyses
```bash
cmake -DENABLE_SENSEI=ON -DENABLE_VTKM=ON -DVTK_DIR=[your path] ..
```
......@@ -161,14 +175,7 @@ Note that a development version of VTK is required when building with
both `ENABLE_SENSEI` and `ENABLE_VTKM` are enabled as released versions of
VTK (8.1.1 and earlier) do not include a modern-enough version of vtk-m.
### Enabling Python bindings
In essence this is as simple as adding `-DENABLE_PYTHON=ON`. However, VTK (or
ParaView when used with Catalyst) needs to be built with Python enabled, and
NumPy, mpi4py, and SWIG are required. Note that there are some caveats when
used with Catalyst and Libsim. These are described in more detail in the Newton
mini app [README](miniapps/newton/README.md).
## Using the SENSEI library
## Using the SENSEI library from another project
To use SENSEI from your CMake based project include the SENSEI CMake config in
your CMakeLists.txt.
```cmake
......@@ -187,7 +194,6 @@ The SENSEI framework includes the following software:
* [DIY2](https://github.com/diatomic/diy), Copyright (c) 2015, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from the U.S. Dept. of Energy).
* [{fmt}](https://github.com/fmtlib/fmt), Copyright (c) 2012-2016, Victor Zverovich.
* [pugixml](https://github.com/zeux/pugixml), Copyright (c) 2006-2016 Arseny Kapoulkine.
The SENSEI framework makes use of (links to) the following software:
......
[
{
"action": "add_pipelines",
"pipelines":
{
"pl1":
{
"f1":
{
"type": "iso_volume",
"params":
{
"field": "braid",
"min_value": 2.0,
"max_value": 5.0
}
}
}
}
},
{
"action": "add_scenes",
"scenes":
{
"scene1":
{
"plots":
{
"plt1":
{
"params":
{
"field": "braid"
},
"type": "pseudocolor",
"pipeline": "pl1"
}
}
}
}
},
{
"action": "execute"
},
{
"action": "reset"
}
]
<!-- SENSEI ConfigurableAnalysis Configuration file.
set enabled="1" on analyses you wish to enable -->
<sensei>
<!-- Contour Tests -->
<analysis type="ascent" action="add_pipelines" pipeline="contour" levels="5" plot="pseudocolor" plotvars="braid" enabled="1" />
<analysis type="ascent" action="add_pipelines" pipeline="contour" value="-0.4" plot="pseudocolor" plotvars="braid" enabled="1" />
<analysis type="ascent" action="add_pipelines" pipeline="contour" levels="5" plot="pseudocolor" plotvars="radial" enabled="1" />
<!-- Threshold Tests -->
<analysis type="ascent" action="add_pipelines" pipeline="threshold" min_value="-0.2" max_value="0.2" plot="pseudocolor" plotvars="braid" enabled="1" />
<!-- Slice Tests -->
<analysis type="ascent" action="add_pipelines" pipeline="slice" plane="0,0,0" normal="0,0,1" plot="pseudocolor" plotvars="braid" enabled="1" />
<!-- 3D Slice Tests -->
<analysis type="ascent" action="add_pipelines" pipeline="3slice" offset="1.0,0.0,-1.0" plot="pseudocolor" plotvars="braid" enabled="1" />
<!-- Clip Tests options: shape:"sphere", "box", "plane" -->
<!-- sphere: radius (5.0) and center (0, 0, 0) -->
<!-- box: box_min (0, 0, 0) and box_max (10, 10, 10) -->
<!-- plane: plane (0, 0, 0) and normal (0, 0, 1) -->
<analysis type="ascent" action="add_pipelines" pipeline="clip" shape="sphere" radius="11.0" center="0,0,0" plot="pseudocolor" plotvars="braid" enabled="1" />
<analysis type="ascent" action="add_pipelines" pipeline="clip" shape="box" box_min="0,0,0" box_max="10.01,10.01,10.01" plot="pseudocolor" plotvars="braid" enabled="1" />
<analysis type="ascent" action="add_pipelines" pipeline="clip" shape="plane" plane="0,0,0" normal="1,0,0" plot="pseudocolor" plotvars="braid" enabled="1" />
<!-- Clip with Field Tests -->
<analysis type="ascent" action="add_pipelines" pipeline="clip_with_field" clip_value="3" plot="pseudocolor" plotvars="braid" enabled="1" />
<!-- ISO Volume Tests -->
<!-- analysis type="ascent" action="add_pipelines" pipeline="iso_volume" min_value="-5" max_value="5" plot="pseudocolor" plotvars="braid" enabled="1" /-->
<!-- Scenes Tests -->
<analysis type="ascent" action="add_scenes" plot="pseudocolor" plotvars="braid" enabled="1"/>
<analysis type="ascent" action="add_scenes" plot="pseudocolor" plotvars="radial" enabled="1"/>
</sensei>
set(endPointLibs opts sensei sMPI)
set(endPointLibs sOPTS sensei sMPI)
if(ENABLE_ADIOS1)
list(APPEND endPointLibs sADIOS1)
......
if(ENABLE_CONDUITTEST)
message(STATUS "Enabled: CONDUIT TEST miniapp.")
message(STATUS "Enabled: Conduit miniapp.")
add_subdirectory(conduit_test)
else()
message(STATUS "Disabled: conduit_test miniapp.")
message(STATUS "Disabled: conduit miniapp.")
endif()
if(ENABLE_OSCILLATORS)
......@@ -32,3 +32,4 @@ if(ENABLE_VORTEX)
else()
message(STATUS "Disabled: Vortex miniapp.")
endif()
set(sources conduitTest.cpp bridge.cpp)
set(libs opts thread timer util sensei sConduit sDIY sMPI)
add_executable(conduitTest ${sources})
target_link_libraries(conduitTest ${libs})
#include <conduit.hpp>
#include <ConduitDataAdaptor.h>
#include "bridge.h"
#include <Error.h>
#include <mpi.h>
#include <string>
#include <ConfigurableAnalysis.h>
#include <vtkNew.h>
#include <vtkSmartPointer.h>
#include <vtkDataObject.h>
#include <vtkObjectBase.h>
#include <iostream>
namespace BridgeGuts
{
static vtkSmartPointer<sensei::ConduitDataAdaptor> DataAdaptor;
static vtkSmartPointer<sensei::ConfigurableAnalysis> AnalysisAdaptor;
static MPI_Comm comm;
}
void initialize(MPI_Comm comm,
conduit::Node* node,
const std::string& config_file)
{
//setup communication
BridgeGuts::comm = comm;
//data adaptor
BridgeGuts::DataAdaptor = vtkSmartPointer<sensei::ConduitDataAdaptor>::New();
BridgeGuts::DataAdaptor->Initialize(node);
//analysis adaptor
BridgeGuts::AnalysisAdaptor = vtkSmartPointer<sensei::ConfigurableAnalysis>::New();
BridgeGuts::AnalysisAdaptor->Initialize(config_file);
}
void analyze(conduit::Node* node)
{
BridgeGuts::DataAdaptor->SetNode(node);
if(!BridgeGuts::AnalysisAdaptor->Execute(BridgeGuts::DataAdaptor))
{
SENSEI_ERROR("ERROR: Failed to execute analysis")
abort();
}
BridgeGuts::DataAdaptor->ReleaseData();
}
void finalize()
{
BridgeGuts::AnalysisAdaptor->Finalize();
BridgeGuts::AnalysisAdaptor = NULL;
BridgeGuts::DataAdaptor = NULL;
}
#ifndef _CONDUIT_SENSI_BRIDGE_H
#define _CONDUIT_SENSI_BRIDGE_H
#include <mpi.h>
#include <string>
#include <conduit.hpp>
//called before the simulation loops
void initialize(MPI_Comm world,
conduit::Node* node,
const std::string& config_file);
//called during simulation loop to update node
void analyze(conduit::Node* node);
//called for cleanup
void finalize();
#endif
#include <conduit.hpp>
#include <cstring>
#include <conduit_blueprint.hpp>
#include <mpi.h>
#include "bridge.h"
int main(int argc, char* argv[])
{
int rank, size;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
conduit::Node res;
conduit::blueprint::mesh::examples::spiral( 7, res);
initialize(MPI_COMM_WORLD, &res, argv[1]);
analyze(&res);
finalize();
MPI_Finalize();
return 0;
}
###############################################################################
# Copyright (c) 2015-2018, Lawrence Livermore National Security, LLC.
#
# Produced at the Lawrence Livermore National Laboratory
#
# LLNL-CODE-716457
#
# All rights reserved.
#
# This file is part of Ascent.
#
# For details, see: http://ascent.readthedocs.io/.
#
# Please also read ascent/LICENSE
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the disclaimer below.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the disclaimer (as noted below) in the
# documentation and/or other materials provided with the distribution.