Skip to content
Snippets Groups Projects
Commit 68e58a5c authored by Andrew Bauer's avatar Andrew Bauer
Browse files

Fix writers to work in parallel

Need only the root node to write the meta-file in parallel
parent 3ec8dede
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,11 @@ int vtkXMLPartitionedDataSetCollectionWriter::RequestData(
}
// Now write the summary XML on the root node.
bool success = this->WriteSummaryXML(inputPDC, allFilenames);
bool success = true;
if (controller == nullptr || controller->GetLocalProcessId() == 0)
{
success = this->WriteSummaryXML(inputPDC, allFilenames);
}
if (controller != nullptr && controller->GetNumberOfProcesses() > 1)
{
int message[2] = { success ? 1 : 0, static_cast<int>(this->GetErrorCode()) };
......
......@@ -129,7 +129,11 @@ int vtkXMLPartitionedDataSetWriter::RequestData(
std::vector<std::string> allFilenames = vtkXMLWriter2::Gather(controller, localFilenames, 0);
// Now write the summary XML on the root node.
bool success = this->WriteSummaryXML(inputPDS, allFilenames);
bool success = true;
if (controller == nullptr || controller->GetLocalProcessId() == 0)
{
success = this->WriteSummaryXML(inputPDS, allFilenames);
}
if (controller != nullptr && controller->GetNumberOfProcesses() > 1)
{
int message[2] = { success ? 1 : 0, static_cast<int>(this->GetErrorCode()) };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment