Commit 865af489 authored by mattijs's avatar mattijs
Browse files

BUG: globalMeshData() : trigger of globalMeshData inside e.g. deltaCoeffs

Original fix (http://www.openfoam.org/mantisbt/view.php?id=1780)
did an increment to create a new communicator. This might
access the communicator-to-mpi_structure tables in PstreamGlobals.H outside
range. Instead allocate and release communicator.
parent 867d0b09
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -2748,7 +2748,13 @@ void Foam::globalMeshData::updateMesh()
// *** Temporary hack to avoid problems with overlapping communication
// *** between these reductions and the calculation of deltaCoeffs
label comm = UPstream::worldComm + 1;
//label comm = UPstream::worldComm + 1;
label comm = UPstream::allocateCommunicator
(
UPstream::worldComm,
identity(UPstream::nProcs(UPstream::worldComm)),
true
);
// Total number of faces.
nTotalFaces_ = returnReduce
......@@ -2785,6 +2791,8 @@ void Foam::globalMeshData::updateMesh()
comm
);
UPstream::freeCommunicator(comm);
if (debug)
{
Pout<< "globalMeshData : nTotalPoints_:" << nTotalPoints_ << endl;
......
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