potential synchronization problem on error (openfoam parallel reader)
By inspection - in vktPOpenFOAMReader::RequestInformation around L480 it looks like it could block, since the broadcast is only called from the ProcessId == 0
branch. The same is done again a few lines down.
Could be missing something very subtly, but looks like a bug. Might be reasonable to wrap the bits in a do/while loop to allow early exit, but still catch things later:
int ret = 1;
if (this->ProcessId == 0)
{
...
do
{
// some code
if (some_error_happens)
{
ret = 0;
break;
}
...
} while (false);
}
if (this->NumProcesses > 1)
{
// check and handle (as per current code)
}
else
{
// Non-parallel
if (!ret)
{
return 0;
}
}
Edited by olesen