[vtkusers] unable to write multiple .pvtu files with split vtkMPIController
joan.baiges at upc.edu
Tue Feb 20 13:07:20 EST 2018
I am trying to write several .vtu and .pvtu files by using several
MPI_Communicators. For this, I Splitinitialize a vtkMPIController object,
and then set this controller as the controller for a
However, when I ask the vtkXMLPUnstructuredGridWriter->Write(), only one
.pvtu file is written, while I would expect that one .pvtu file is written
for each of the communicators the MPI_COMM_WORLD has been subdivided into.
On the other hand, the .vtu files are written properly for all the
processors in all the split mpi controllers.
The code I am writing looks approximately like this:
//New communicator and spliting of the communicator
communicator = vtkMPICommunicator::New();
communicator = vtkMPICommunicator::GetWorldCommunicator();
//Setting the split communicator as the communicator for the controller
controller = vtkMPIController::New();
//Initializing the parallelwriter with the controller
parallelwriter = vtkSmartPointer<vtkXMLPUnstructuredGridWriter>::New();
//setting file name
fname = std::string(filename);
//Setting the grid
unstructuredGrid = vtkSmartPointer<vtkUnstructuredGrid>::New();
//After writing the grid info, we call the parallelwriter to write
This final line causes all the processors to write the .vtu files, however
only one processor writes the .pvtu file, while I would expect/like one
.pvtu file per split mpi communicator.
Thank you in advance for your help,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers