mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
BUG: vtk write of uniform field in parallel (fixes #2349)
- used low-level MPI gather, but the wrapping routine contains an additional safety check for is_contiguous which is not defined for various std::pair<..> combination. So std::pair<label,vector> (which is actually contiguous, but not declared as is_contiguous) would falsely trip the check. Avoid by simply gathering unbundled values instead.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -180,6 +180,36 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// This will likely fail - not declared as is_contiguous
|
||||
// Cannot even catch since it triggers an abort()
|
||||
|
||||
#if 0
|
||||
{
|
||||
std::pair<label,vector> sendData(Pstream::myProcNo(), vector::one);
|
||||
|
||||
const bool oldThrowingError = FatalError.throwing(true);
|
||||
|
||||
try
|
||||
{
|
||||
List<std::pair<label,vector>> countValues
|
||||
(
|
||||
UPstream::listGatherValues<std::pair<label, vector>>
|
||||
(
|
||||
sendData
|
||||
)
|
||||
);
|
||||
|
||||
Pout<< "listGather: " << flatOutput(countValues) << nl;
|
||||
}
|
||||
catch (const Foam::error& err)
|
||||
{
|
||||
Info<< err.message().c_str() << nl;
|
||||
}
|
||||
|
||||
FatalError.throwing(oldThrowingError);
|
||||
}
|
||||
#endif
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user