Commit 074ba8e5 authored by Brad Whitlock's avatar Brad Whitlock
Browse files

Ensure Libsim can be built via cmake

parent 04f961ec
......@@ -5,3 +5,7 @@ set(SENSEI_INCLUDE_DIRS ${SENSEI_SOURCE_DIR}/sensei)
set(VTK_DIR "@VTK_DIR@")
set(LIBSIM_ENABLED @LIBSIM_ENABLED@)
set(LIBSIM_DIR "@LIBSIM_ENABLED@")
......@@ -2,4 +2,4 @@ find_package(LIBSIM REQUIRED)
add_library(libsim INTERFACE)
target_link_libraries(libsim INTERFACE ${LIBSIM_STATIC_PAR_LIBRARIES})
target_include_directories(libsim SYSTEM INTERFACE ${LIBSIM_INCLUDE_DIRS})
target_include_directories(libsim SYSTEM INTERFACE ${LIBSIM_INCLUDE_DIR})
......@@ -39,7 +39,12 @@ Repository Organization
This houses sensei::catalyst::AnalysisAdaptor which implements 'sensei::AnalysisAdaptor'
interface to use Catalyst for the analysis. Since in Catalyst, analysis is performed
via pipelines, this directory contains instances of pipelines (e.g. sensei::catalyst::Slice).
- sensei/libsim
Contains source code for all files under the 'sensei::libsim' namespace.
This houses the Libsim analysis adaptor for making slice images, etc.
- miniapps/
All miniapps generated for various bechmarks and testing is included in this directory.
......@@ -127,6 +132,10 @@ that reads data being serialized by the ADIOS analysis adaptor and pass it back
into a `Sensei` bridge for further analysis. **ADIOSAnalysisEndPoint** itself can be given
configuration XML for select analysis routines to run via Sensei infrastructure.
* **ENABLE_LIBSIM**: (ON/OFF) Set to ON to enable Libsim components. In addition, you must set LIBSIM_DIR so it points
to the location of the installed LIBSIMConfig.cmake file to locate Libsim and set up its dependencies. When these
settings are enabled/set, the Libsim analysis adaptor will be built.
Typical build usage:
make build
......
......@@ -74,8 +74,9 @@ if(ENABLE_ADIOS)
endif()
if(ENABLE_LIBSIM)
target_include_directories(sensei SYSTEM PUBLIC ${LIBSIM_INCLUDE_DIRS})
target_include_directories(sensei SYSTEM PUBLIC ${LIBSIM_INCLUDE_DIR})
target_link_libraries(sensei PRIVATE libsim)
target_compile_definitions(sensei PUBLIC ENABLE_LIBSIM)
endif()
if (ENABLE_VTK_XMLP)
......
......@@ -197,12 +197,16 @@ public:
int AddLibsim(MPI_Comm comm, pugi::xml_node node)
{
if (node.attribute("enabled") && !node.attribute("enabled").as_int())
{
cout << "Libsim NOT enabled" << endl;
return -1;
}
// We keep around a single instance of the libsim adaptor and then tell it to
// do different things.
if (!this->LibsimAnalysisAdaptor)
{
cout << "Creating Libsim Analysis Adaptor" << endl;
this->LibsimAnalysisAdaptor = vtkSmartPointer<libsim::AnalysisAdaptor>::New();
this->LibsimAnalysisAdaptor->SetComm(comm);
if(node.attribute("trace"))
......@@ -212,7 +216,9 @@ public:
this->LibsimAnalysisAdaptor->Initialize();
this->Analyses.push_back(this->LibsimAnalysisAdaptor);
}
else
cout << "NOT creating Libsim Analysis Adaptor" << endl;
// Add slice stuff ...
return 0;
......
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