Commit da17b2f7 authored by Burlen Loring's avatar Burlen Loring

unique MPI communication space etc

* normalize MPI communicator handling by putting some default
  code in DataAdaptor and AnalysisAdaptor base classes. The
  defaults are to use isolate our communciation in a duplicate
  of COMM_WORLD. Adaptors needing to do MPI communicaiton should
  access the communicator by calling GetCommunicator.
* report errors from ConfigurableAnalysis::Execute and ::Finalize
* fix a build issue with new VTK AMR writer.
* clean up warning in parallel 3d miniapp

squash me -- amr reader build fixes"
parent 43608c93
......@@ -32,7 +32,8 @@ set(ENABLE_CATALYST_PYTHON @ENABLE_CATALYST_PYTHON@)
set(ENABLE_LIBSIM @ENABLE_LIBSIM@)
set(ENABLE_ADIOS @ENABLE_ADIOS@)
set(ENABLE_VTK_GENERIC_ARRAYS @ENABLE_VTK_GENERIC_ARRAYS@)
set(ENABLE_VTK_XMLP @ENABLE_VTK_XMLP@)
set(ENABLE_VTK_MPI @ENABLE_VTK_MPI@)
set(ENABLE_VTK_IO @ENABLE_VTK_IO@)
if (NOT CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS@"
......
......@@ -24,13 +24,17 @@ cmake_dependent_option(ENABLE_LIBSIM
"Enable analysis methods that use Libsim" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTK_XMLP
"Enable use of vtk parallel I/O" OFF
cmake_dependent_option(ENABLE_VTK_IO
"Enable use of vtk I/O" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTK_MPI
"Enable use of parallel vtk" OFF
"ENABLE_SENSEI" OFF)
cmake_dependent_option(ENABLE_VTK_M
"Enable analysis methods that use VTK-m" OFF
"ENABLE_SENSEI" OFF)
"ENABLE_VTK_MPI" OFF)
option(ENABLE_PARALLEL3D "Enable Parallel3D miniapp" ON)
......@@ -43,6 +47,7 @@ message(STATUS "ENABLE_CATALYST=${ENABLE_CATALYST}")
message(STATUS "ENABLE_CATALYST_PYTHON=${ENABLE_CATALYST}")
message(STATUS "ENABLE_ADIOS=${ENABLE_ADIOS}")
message(STATUS "ENABLE_LIBSIM=${ENABLE_LIBSIM}")
message(STATUS "ENABLE_VTK_XMLP=${ENABLE_VTK_XMLP}")
message(STATUS "ENABLE_VTK_IO=${ENABLE_VTK_IO}")
message(STATUS "ENABLE_VTK_MPI=${ENABLE_VTK_MPI}")
message(STATUS "ENABLE_PARALLEL3D=${ENABLE_PARALLEL3D}")
message(STATUS "ENABLE_OSCILLATORS=${ENABLE_OSCILLATORS}")
set(SENSEI_VTK_COMPONENTS vtkCommonDataModel)
if (ENABLE_VTK_XMLP)
if (ENABLE_VTK_MPI)
list(APPEND SENSEI_VTK_COMPONENTS vtkParallelMPI)
endif()
if (ENABLE_VTK_IO)
list(APPEND SENSEI_VTK_COMPONENTS vtkIOXML)
if (ENABLE_VTK_MPI)
list(APPEND SENSEI_VTK_COMPONENTS vtkIOParallelXML)
endif()
endif()
if (ENABLE_PYTHON)
list(APPEND SENSEI_VTK_COMPONENTS vtkPython vtkWrappingPythonCore)
endif()
if(ENABLE_VTK_M)
list(APPEND SENSEI_VTK_COMPONENTS vtkAcceleratorsVTKm vtkIOLegacy vtkParallelMPI vtkIOParallelXML vtkFiltersGeometry vtkImagingCore)
if (ENABLE_VTK_M)
list(APPEND SENSEI_VTK_COMPONENTS vtkAcceleratorsVTKm vtkIOLegacy
vtkFiltersGeometry vtkImagingCore)
endif()
if (NOT ENABLE_CATALYST)
......
......@@ -110,7 +110,8 @@ $ make install
| ENABLE_CATALYST_PYTHON | OFF | Enables Python features of the Catalyst analysis adaptor. |
| ENABLE_ADIOS | OFF | Enables ADIOS adaptors and endpoints. Set ADIOS_DIR. |
| ENABLE_LIBSIM | OFF | Enables Libsim data and analysis adaptors. Requires Libsim. Set VTK_DIR and LIBSIM_DIR. |
| ENABLE_VTK_XMLP | OFF | Enables PosthocIO adaptors to write to VTK XML format. |
| 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_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. |
......@@ -140,7 +141,7 @@ Optionally, `-DENABLE_CATALYST_PYTHON=ON` will enable Catalyst Python scripts.
### Enable writing to Visit ".visit" format or ParaView ".pvd" format
```bash
cmake -DENABLE_SENSEI=ON -DENABLE_VTK_XMLP=ON -DVTK_DIR=[your path] ..
cmake -DENABLE_SENSEI=ON -DENABLE_VTK_IO=ON -DVTK_DIR=[your path] ..
```
Can be used with either `ParaView_DIR` or `VTK_DIR`.
......
......@@ -3,7 +3,7 @@
<analysis type="histogram" mesh="bodies" array="v" association="point"
bins="10" enabled="0" />
<!-- Available with ENABLE_VTK_XMLP -->
<!-- Available with ENABLE_VTK_IO -->
<analysis type="PosthocIO" mode="paraview" output_dir="./" enabled="0">
<mesh name="bodies">
<point_arrays> ids, m, v, f </point_arrays>
......
......@@ -73,7 +73,8 @@ int main(int argc, char **argv)
// open the ADIOS stream using the ADIOS adaptor
DataAdaptorPtr dataAdaptor = DataAdaptorPtr::New();
if (dataAdaptor->Open(comm, readmethod, input))
dataAdaptor->SetCommunicator(comm);
if (dataAdaptor->Open(readmethod, input))
{
SENSEI_ERROR("Failed to open \"" << input << "\"")
MPI_Abort(comm, 1);
......@@ -83,7 +84,12 @@ int main(int argc, char **argv)
SENSEI_STATUS("Loading configurable analysis \"" << config_file << "\"")
AnalysisAdaptorPtr analysisAdaptor = AnalysisAdaptorPtr::New();
analysisAdaptor->Initialize(comm, config_file);
analysisAdaptor->SetCommunicator(comm);
if (analysisAdaptor->Initialize(config_file))
{
SENSEI_ERROR("Failed to initialize analysis")
MPI_Abort(comm, 1);
}
// read from the ADIOS stream until all steps have been
// processed
......
......@@ -55,7 +55,12 @@ int main(int argc, char** argv)
vtkSmartPointer<sensei::ConfigurableAnalysis> analysis =
vtkSmartPointer<sensei::ConfigurableAnalysis>::New();
analysis->Initialize(comm, config_file);
if (analysis->Initialize(comm, config_file))
{
SENSEI_ERROR("Failed to initialize the analysis")
MPI_Abort(comm, 1);
}
size_t fname_length = input_pattern.size() + 128;
char *fname = new char[fname_length];
......
......@@ -15,19 +15,17 @@ static vtkSmartPointer<oscillators::DataAdaptor> GlobalDataAdaptor;
static vtkSmartPointer<sensei::ConfigurableAnalysis> GlobalAnalysisAdaptor;
//-----------------------------------------------------------------------------
void initialize(MPI_Comm world,
size_t window,
size_t nblocks,
size_t n_local_blocks,
int domain_shape_x, int domain_shape_y, int domain_shape_z,
int* gid,
int* from_x, int* from_y, int* from_z,
int* to_x, int* to_y, int* to_z,
int* shape, int ghostLevels,
const std::string& config_file)
void initialize(MPI_Comm comm, size_t window, size_t nblocks,
size_t n_local_blocks, int domain_shape_x, int domain_shape_y,
int domain_shape_z, int* gid, int* from_x, int* from_y, int* from_z,
int* to_x, int* to_y, int* to_z, int* shape, int ghostLevels,
const std::string& config_file)
{
(void)window;
timer::MarkEvent mark("oscillators::bridge::initialize");
(void)window;
(void)comm;
GlobalDataAdaptor = vtkSmartPointer<oscillators::DataAdaptor>::New();
GlobalDataAdaptor->Initialize(nblocks, shape, ghostLevels);
GlobalDataAdaptor->SetDataTimeStep(-1);
......@@ -35,8 +33,7 @@ void initialize(MPI_Comm world,
for (size_t cc=0; cc < n_local_blocks; ++cc)
{
GlobalDataAdaptor->SetBlockExtent(gid[cc],
from_x[cc], to_x[cc],
from_y[cc], to_y[cc],
from_x[cc], to_x[cc], from_y[cc], to_y[cc],
from_z[cc], to_z[cc]);
}
......@@ -44,7 +41,7 @@ void initialize(MPI_Comm world,
GlobalDataAdaptor->SetDataExtent(dext);
GlobalAnalysisAdaptor = vtkSmartPointer<sensei::ConfigurableAnalysis>::New();
GlobalAnalysisAdaptor->Initialize(world, config_file);
GlobalAnalysisAdaptor->Initialize(config_file);
}
//-----------------------------------------------------------------------------
......@@ -77,8 +74,8 @@ void finalize(size_t k_max, size_t nblocks)
GlobalAnalysisAdaptor->Finalize();
GlobalAnalysisAdaptor = NULL;
GlobalDataAdaptor = NULL;
GlobalAnalysisAdaptor = nullptr;
GlobalDataAdaptor = nullptr;
timer::MarkEndEvent("oscillators::bridge::finalize");
}
......
......@@ -12,32 +12,24 @@ namespace BridgeInternals
{
static vtkSmartPointer<parallel3d::DataAdaptor> GlobalDataAdaptor;
static vtkSmartPointer<sensei::ConfigurableAnalysis> GlobalAnalysisAdaptor;
static MPI_Comm comm;
}
//-----------------------------------------------------------------------------
void bridge_initialize(MPI_Comm comm,
int g_x, int g_y, int g_z,
int l_x, int l_y, int l_z,
uint64_t start_extents_x, uint64_t start_extents_y, uint64_t start_extents_z,
int tot_blocks_x, int tot_blocks_y, int tot_blocks_z,
int block_id_x, int block_id_y, int block_id_z,
const char* config_file)
void bridge_initialize(MPI_Comm comm, int g_x, int g_y, int g_z,
int l_x, int l_y, int l_z, uint64_t start_extents_x, uint64_t start_extents_y,
uint64_t start_extents_z, int tot_blocks_x, int tot_blocks_y, int tot_blocks_z,
int block_id_x, int block_id_y, int block_id_z, const char* config_file)
{
BridgeInternals::comm = comm;
if (!BridgeInternals::GlobalDataAdaptor)
{
BridgeInternals::GlobalDataAdaptor = vtkSmartPointer<parallel3d::DataAdaptor>::New();
}
BridgeInternals::GlobalDataAdaptor->Initialize(
g_x, g_y, g_z,
l_x, l_y, l_z,
start_extents_x, start_extents_y, start_extents_z,
tot_blocks_x, tot_blocks_y, tot_blocks_z,
block_id_x, block_id_y, block_id_z);
BridgeInternals::GlobalDataAdaptor = vtkSmartPointer<parallel3d::DataAdaptor>::New();
BridgeInternals::GlobalDataAdaptor->SetCommunicator(comm);
BridgeInternals::GlobalDataAdaptor->Initialize(g_x, g_y, g_z, l_x, l_y, l_z,
start_extents_x, start_extents_y, start_extents_z, tot_blocks_x,
tot_blocks_y, tot_blocks_z, block_id_x, block_id_y, block_id_z);
BridgeInternals::GlobalAnalysisAdaptor = vtkSmartPointer<sensei::ConfigurableAnalysis>::New();
BridgeInternals::GlobalAnalysisAdaptor->Initialize(comm, config_file);
BridgeInternals::GlobalAnalysisAdaptor->SetCommunicator(comm);
BridgeInternals::GlobalAnalysisAdaptor->Initialize(config_file);
}
//-----------------------------------------------------------------------------
......@@ -53,12 +45,12 @@ void bridge_update(int tstep, double time, double *pressure, double* temperature
}
//-----------------------------------------------------------------------------
void bridge_finalize()
void bridge_finalize(MPI_Comm comm)
{
BridgeInternals::GlobalAnalysisAdaptor->Finalize();
BridgeInternals::GlobalAnalysisAdaptor = NULL;
BridgeInternals::GlobalDataAdaptor = NULL;
BridgeInternals::GlobalAnalysisAdaptor = nullptr;
BridgeInternals::GlobalDataAdaptor = nullptr;
timer::PrintLog(std::cout, BridgeInternals::comm);
timer::PrintLog(std::cout, comm);
}
......@@ -7,22 +7,19 @@
#ifdef __cplusplus
extern "C" {
#endif
/// This defines the analysis bridge for parallel_3d miniapp.
/// This defines the analysis bridge for parallel_3d miniapp.
/// Called before simulation loop
void bridge_initialize(MPI_Comm comm,
int g_x, int g_y, int g_z,
int l_x, int l_y, int l_z,
uint64_t start_extents_x, uint64_t start_extents_y, uint64_t start_extents_z,
int tot_blocks_x, int tot_blocks_y, int tot_blocks_z,
int block_id_x, int block_id_y, int block_id_z,
const char* config_file);
/// Called before simulation loop
void bridge_initialize(MPI_Comm comm, int g_x, int g_y, int g_z,
int l_x, int l_y, int l_z, uint64_t start_extents_x, uint64_t start_extents_y,
uint64_t start_extents_z, int tot_blocks_x, int tot_blocks_y, int tot_blocks_z,
int block_id_x, int block_id_y, int block_id_z, const char* config_file);
/// Called per timestep in the simulation loop
void bridge_update(int tstep, double time, double *pressure, double* temperature, double* density);
/// Called per timestep in the simulation loop
void bridge_update(int tstep, double time, double *pressure, double* temperature, double* density);
/// Called just before simulation terminates.
void bridge_finalize();
/// Called just before simulation terminates.
void bridge_finalize(MPI_Comm comm);
#ifdef __cplusplus
} // extern "C"
......
......@@ -56,11 +56,10 @@ int main(int argc, char **argv)
{
int nprocs, rank;
int ret;
uint64_t index, slice;
uint64_t slice;
int tot_blocks_x, tot_blocks_y, tot_blocks_z, tot_blocks;
uint64_t start_extents_z, start_extents_y, start_extents_x;
int block_id_x, block_id_y, block_id_z;
int i,j,k;
// The buffers/ variables
......@@ -251,8 +250,7 @@ int main(int argc, char **argv)
/////////////////////////////
#ifdef ENABLE_SENSEI
bridge_finalize();
bridge_finalize(MPI_COMM_WORLD);
if (config_file) {
free(config_file);
......@@ -374,14 +372,12 @@ static void usage(void)
static void gen_data_global_index (double* volume,
long long my_off_z, long long my_off_y, long long my_off_x)
long long my_off_z, long long my_off_y, long long my_off_x)
{
unsigned long long i,j,k, index;
for(k=0; k<l_z; k++){
for(j=0; j<l_y; j++){
for(i=0; i<l_x; i++){
index = (l_x * l_y * k) + (l_x*j) + i;
for(long long k=0; k<l_z; k++){
for(long long j=0; j<l_y; j++){
for(long long i=0; i<l_x; i++){
long long index = (l_x * l_y * k) + (l_x*j) + i;
volume[index] = (g_x * g_y * (my_off_z + k)) + \
(g_x * (my_off_y + j)) + my_off_x + i;
......@@ -396,24 +392,23 @@ static void gen_data_global_index (double* volume,
/* generate a data set */
static void gen_data(double* volume,
long long my_off_z, long long my_off_y, long long my_off_x)
long long my_off_z, long long my_off_y, long long my_off_x)
{
unsigned long long i,j,k;
double center[3];
center[0] = g_x / 2.;
center[1] = g_y / 2.;
center[2] = g_z / 2.;
//printf("l_x: %d, l_y: %d, l_z: %d\n", l_x, l_y, l_z);
for(i = 0; i < l_z; i++)
for(long long i = 0; i < l_z; i++)
{
double zdist = sin((i + my_off_z - center[2])/5.0)*center[2];
// float zdist = sinf((i + my_off_z - center[2])/g_y);
for(j = 0; j < l_y; j++)
for(long long j = 0; j < l_y; j++)
{
double ydist = sin((j + my_off_y - center[1])/3.0)*center[1];
// float ydist = sinf((j + my_off_y - center[1])/g_x);
for(k = 0; k < l_x; k++)
for(long long k = 0; k < l_x; k++)
{
double xdist = sin((k + my_off_x - center[0])/2.0)*center[0];
// float xdist = sinf((k + my_off_x - center[0])/g_z);
......@@ -426,22 +421,21 @@ static void gen_data(double* volume,
}
static void gen_data_sparse(double* volume,
long long my_off_z, long long my_off_y, long long my_off_x)
long long my_off_z, long long my_off_y, long long my_off_x)
{
unsigned long long i,j,k;
double center[3];
center[0] = g_x / 2.;
center[1] = g_y / 2.;
center[2] = g_z / 2.;
//printf("l_x: %d, l_y: %d, l_z: %d\n", l_x, l_y, l_z);
for(i = 0; i < l_z; i++)
for(long long i = 0; i < l_z; i++)
{
double zdist = i + my_off_z - center[2];
for(j = 0; j < l_y; j++)
for(long long j = 0; j < l_y; j++)
{
double ydist = j + my_off_y - center[1];
for(k = 0; k < l_x; k++)
for(long long k = 0; k < l_x; k++)
{
double xdist = k + my_off_x - center[0];
......@@ -453,7 +447,3 @@ static void gen_data_sparse(double* volume,
}
......@@ -317,13 +317,13 @@ SENSEI_DATA_ADAPTOR(ADIOSDataAdaptor)
/****************************************************************************
* VTKPosthocIO
***************************************************************************/
#ifdef ENABLE_VTK_XMLP
#ifdef ENABLE_VTK_IO
VTK_DERIVED(VTKPosthocIO)
#endif
/****************************************************************************
* VTKAmrWriter
***************************************************************************/
#ifdef ENABLE_VTK_XMLP
#ifdef ENABLE_VTK_IO
VTK_DERIVED(VTKAmrWriter)
#endif
......@@ -40,8 +40,8 @@ namespace sensei
senseiNewMacro(ADIOSAnalysisAdaptor);
//----------------------------------------------------------------------------
ADIOSAnalysisAdaptor::ADIOSAnalysisAdaptor() : Comm(MPI_COMM_WORLD),
MaxBufferSize(500), Schema(nullptr), Method("MPI"), FileName("sensei.bp")
ADIOSAnalysisAdaptor::ADIOSAnalysisAdaptor() : MaxBufferSize(500),
Schema(nullptr), Method("MPI"), FileName("sensei.bp")
{
}
......@@ -178,7 +178,7 @@ int ADIOSAnalysisAdaptor::InitializeADIOS(
timer::MarkEvent mark("ADIOSAnalysisAdaptor::IntializeADIOS");
// initialize adios
adios_init_noxml(this->Comm);
adios_init_noxml(this->GetCommunicator());
int64_t gHandle = 0;
......@@ -196,7 +196,7 @@ int ADIOSAnalysisAdaptor::InitializeADIOS(
// define ADIOS variables
this->Schema = new senseiADIOS::DataObjectCollectionSchema;
if (this->Schema->DefineVariables(this->Comm, gHandle, objectNames, objects))
if (this->Schema->DefineVariables(this->GetCommunicator(), gHandle, objectNames, objects))
{
SENSEI_ERROR("Failed to define variables")
return -1;
......@@ -209,7 +209,7 @@ int ADIOSAnalysisAdaptor::InitializeADIOS(
int ADIOSAnalysisAdaptor::FinalizeADIOS()
{
int rank = 0;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_rank(this->GetCommunicator(), &rank);
adios_finalize(rank);
return 0;
}
......@@ -238,13 +238,15 @@ int ADIOSAnalysisAdaptor::WriteTimestep(unsigned long timeStep,
int64_t handle = 0;
adios_open(&handle, "sensei", this->FileName.c_str(),
timeStep == 0 ? "w" : "a", this->Comm);
timeStep == 0 ? "w" : "a", this->GetCommunicator());
uint64_t group_size = this->Schema->GetSize(
this->GetCommunicator(), objectNames, objects);
uint64_t group_size = this->Schema->GetSize(this->Comm, objectNames, objects);
adios_group_size(handle, group_size, &group_size);
if (this->Schema->Write(this->Comm, handle, timeStep, time,
objectNames, objects))
if (this->Schema->Write(this->GetCommunicator(), handle,
timeStep, time, objectNames, objects))
{
SENSEI_ERROR("Failed to write step " << timeStep
<< " to \"" << this->FileName << "\"")
......
......@@ -52,10 +52,6 @@ public:
std::string GetFileName() const
{ return this->FileName; }
/// Set the communicator to use for MPI calls
void SetCommunicator(MPI_Comm comm)
{ this->Comm = comm; }
/// data requirements tell the adaptor what to push
/// if none are given then all data is pushed.
int SetDataRequirements(const DataRequirements &reqs);
......@@ -83,7 +79,6 @@ protected:
// shuts down ADIOS
int FinalizeADIOS();
MPI_Comm Comm;
unsigned int MaxBufferSize;
senseiADIOS::DataObjectCollectionSchema *Schema;
sensei::DataRequirements Requirements;
......
......@@ -16,8 +16,6 @@
#include <sstream>
namespace sensei
{
// associate the mesh name to a data object and mesh metadata
......@@ -51,9 +49,8 @@ static bool good(ObjectMapType &objMap, const ObjectMapIterType &it)
struct ADIOSDataAdaptor::InternalsType
{
InternalsType() : Comm(MPI_COMM_WORLD), Stream() {}
InternalsType() : Stream() {}
MPI_Comm Comm;
senseiADIOS::InputStream Stream;
senseiADIOS::DataObjectCollectionSchema Schema;
ObjectMapType ObjectMap;
......@@ -82,8 +79,8 @@ void ADIOSDataAdaptor::EnableDynamicMesh(const std::string &meshName, int val)
}
//----------------------------------------------------------------------------
int ADIOSDataAdaptor::Open(MPI_Comm comm,
const std::string &method, const std::string& filename)
int ADIOSDataAdaptor::Open(const std::string &method,
const std::string& filename)
{
size_t n = method.size();
std::string lcase_method(n, ' ');
......@@ -106,18 +103,15 @@ int ADIOSDataAdaptor::Open(MPI_Comm comm,
return -1;
}
return this->Open(comm, it->second, filename);
return this->Open(it->second, filename);
}
//----------------------------------------------------------------------------
int ADIOSDataAdaptor::Open(MPI_Comm comm,
ADIOS_READ_METHOD method, const std::string& fileName)
int ADIOSDataAdaptor::Open(ADIOS_READ_METHOD method, const std::string& fileName)
{
timer::MarkEvent mark("ADIOSDataAdaptor::Open");
this->Internals->Comm = comm;
if (this->Internals->Stream.Open(comm, method, fileName))
if (this->Internals->Stream.Open(this->GetCommunicator(), method, fileName))
{
SENSEI_ERROR("Failed to open \"" << fileName << "\"")
return -1;
......@@ -164,7 +158,7 @@ int ADIOSDataAdaptor::UpdateTimeStep()
unsigned long timeStep = 0;
double time = 0.0;
if (this->Internals->Schema.ReadTimeStep(this->Internals->Comm,
if (this->Internals->Schema.ReadTimeStep(this->GetCommunicator(),
this->Internals->Stream, timeStep, time))
{
SENSEI_ERROR("Failed to update time step")
......@@ -176,7 +170,7 @@ int ADIOSDataAdaptor::UpdateTimeStep()
// update the available meshes
std::vector<std::string> names;
if (this->Internals->Schema.ReadObjectNames(this->Internals->Comm,
if (this->Internals->Schema.ReadObjectNames(this->GetCommunicator(),
this->Internals->Stream, names))
{
SENSEI_ERROR("Failed to update object names")
......@@ -252,7 +246,7 @@ int ADIOSDataAdaptor::GetMesh(const std::string &meshName,
}
// other wise we need to read the mesh at the current time step
if (this->Internals->Schema.ReadObject(this->Internals->Comm,
if (this->Internals->Schema.ReadObject(this->GetCommunicator(),
this->Internals->Stream, meshName, mesh, structureOnly))
{
SENSEI_ERROR("Failed to read mesh \"" << meshName << "\"")
......@@ -275,7 +269,7 @@ int ADIOSDataAdaptor::GetMesh(const std::string &meshName,
// cell data arrays
std::set<std::string> cellArrays;
if (this->Internals->Schema.ReadArrayNames(this->Internals->Comm,
if (this->Internals->Schema.ReadArrayNames(this->GetCommunicator(),
this->Internals->Stream, meshName, mesh, vtkDataObject::CELL, cellArrays))
{
SENSEI_ERROR("Failed to read cell associated array names")
......@@ -284,7 +278,7 @@ int ADIOSDataAdaptor::GetMesh(const std::string &meshName,
// point data arrays
std::set<std::string> pointArrays;
if (this->Internals->Schema.ReadArrayNames(this->Internals->Comm,
if (this->Internals->Schema.ReadArrayNames(this->GetCommunicator(),
this->Internals->Stream, meshName, mesh, vtkDataObject::POINT, pointArrays))
{
SENSEI_ERROR("Failed to read point associated array names")
......@@ -390,7 +384,7 @@ int ADIOSDataAdaptor::AddArray(vtkDataObject* mesh,
return -1;
}
if (this->Internals->Schema.ReadArray(this->Internals->Comm,
if (this->Internals->Schema.ReadArray(this->GetCommunicator(),
this->Internals->Stream, meshName, mesh, association, arrayName))
{
SENSEI_ERROR("Failed to read " << VTKUtils::GetAttributesName(association)
......
......@@ -20,8 +20,8 @@ public:
senseiTypeMacro(ADIOSDataAdaptor, ADIOSDataAdaptor);
void PrintSelf(ostream& os, vtkIndent indent) override;
int Open(MPI_Comm comm, const std::string &method, const std::string& filename);
int Open(MPI_Comm comm, ADIOS_READ_METHOD method, const std::string& filename);
int Open(const std::string &method, const std::string& filename);
int Open(ADIOS_READ_METHOD method, const std::string& filename);