Commit c4a5d2d9 authored by Shawn Waldon's avatar Shawn Waldon

Changed to int datatype so MPI reduce will understand ops

Also changed how the 'are blocks shared across processes' test works slightly.

Change-Id: I140682771dd29371320ae236b8f46fb600d839a4
parent dec68267
......@@ -366,7 +366,7 @@ void vtkPGenericIOMultiBlockWriter::WriteData()
}
if (this->Controller->GetNumberOfProcesses() > 1)
{
std::vector< char > hasBlock, duplicates;
std::vector< int > hasBlock, duplicates;
hasBlock.resize(input->GetNumberOfBlocks(),0);
duplicates.resize(hasBlock.size());
for (unsigned i = 0; i < input->GetNumberOfBlocks(); ++i)
......@@ -378,10 +378,10 @@ void vtkPGenericIOMultiBlockWriter::WriteData()
}
}
this->Controller->AllReduce(&hasBlock[0],&duplicates[0],hasBlock.size(),
vtkCommunicator::LOGICAL_AND_OP);
vtkCommunicator::SUM_OP);
for (size_t i = 0; i < duplicates.size(); ++i)
{
if (duplicates[i] != 0)
if (duplicates[i] > 1)
{
vtkErrorMacro(<< "Blocks are duplicated across processes, this writer expects"
" each block to be present on exactly one process. Aborting write operation.");
......
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