Commit 2bf36985 authored by Ben Boeckel's avatar Ben Boeckel

vtkPVConfig: remove PARAVIEW_USE_MPI

parent 60ecfb44
......@@ -18,7 +18,7 @@
#include "vtkPVCustomTestDriver.h"
#include "vtkPVConfig.h"
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
#include "vtkMPI.h"
#endif
#include <iostream>
......@@ -30,7 +30,7 @@ int main(int argc, char* argv[])
cerr << "Wrong number of arguments. Command is: <exe> <python script>\n";
return 1;
}
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
MPI_Init(&argc, &argv);
#endif
int errors = 0;
......@@ -53,7 +53,7 @@ int main(int argc, char* argv[])
}
testDriver->Delete();
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
MPI_Finalize();
#endif
......
......@@ -18,9 +18,6 @@
#cmakedefine PARAVIEW_USE_QTHELP
// defined when ParaView is built with MPI.
#cmakedefine PARAVIEW_USE_MPI
#cmakedefine PARAVIEW_ENABLE_PYTHON
#cmakedefine PARAVIEW_FREEZE_PYTHON
......
......@@ -19,6 +19,12 @@ vtk_add_test_cxx(${vtk-modules}ServerFilterTests tests
TestPVAMRDualContour.cxx
)
if (PARAVIEW_USE_MPI)
set_property(SOURCE ParaViewCoreVTKExtensionsPrintSelf.cxx APPEND
PROPERTY
COMPILE_DEFINITIONS PARAVIEW_USE_MPI)
endif ()
if (PARAVIEW_USE_ICE_T)
set_property(SOURCE ParaViewCoreVTKExtensionsPrintSelf.cxx APPEND
PROPERTY
......
......@@ -13,6 +13,13 @@ vtk_module_add_module(CDIReader::vtkCDIReader
SOURCES ${sources}
PRIVATE_HEADERS ${private_headers})
if (TARGET VTK::ParallelMPI)
# FIXME: The API should not depend on this.
vtk_module_definitions(CDIReader::vtkCDIReader
PUBLIC
PARAVIEW_USE_MPI)
endif ()
vtk_module_definitions(CDIReader::vtkCDIReader
PRIVATE
# Please leave these definitions in here and do not change them. We use the
......
......@@ -8,3 +8,6 @@ DEPENDS
VTK::CommonExecutionModel
PRIVATE_DEPENDS
VTK::netcdf
OPTIONAL_DEPENDS
VTK::ParallelCore
VTK::ParallelMPI
......@@ -356,7 +356,8 @@ int ComparePointWithIndex(const void* a, const void* b)
}
vtkStandardNewMacro(vtkCDIReader);
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
#include "vtkDummyController.h"
#include "vtkMultiProcessController.h"
vtkCxxSetObjectMacro(vtkCDIReader, Controller, vtkMultiProcessController);
#endif
......@@ -399,7 +400,7 @@ vtkCDIReader::vtkCDIReader()
this->PointDataArraySelection->AddObserver(vtkCommand::ModifiedEvent, this->SelectionObserver);
this->DomainDataArraySelection->AddObserver(vtkCommand::ModifiedEvent, this->SelectionObserver);
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
this->Controller = nullptr;
this->SetController(vtkMultiProcessController::GetGlobalController());
if (!this->Controller)
......@@ -523,7 +524,7 @@ vtkCDIReader::~vtkCDIReader()
delete this->Internals;
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
this->SetController(nullptr);
#endif
......@@ -551,7 +552,7 @@ int vtkCDIReader::RequestInformation(
return 0;
}
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
if (this->Controller->GetNumberOfProcesses() > 1)
{
this->Decomposition = true;
......@@ -1754,7 +1755,7 @@ int vtkCDIReader::ConstructGridGeometry()
int* vertex_ids2 = new int[size2];
CHECK_NEW(this->VertexIds);
CHECK_NEW(vertex_ids2);
#ifdef PARAVIEW_USE_MPI
#if VTK_MODULE_ENABLE_VTK_ParallelMPI
if (this->Decomposition)
{
if (this->Piece == 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