mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: PPCR: check outstanding request. Fixes #2577
If the exit is through maxIter it should still wait for outstanding requests
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019-2020 Mattijs Janssens
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -170,7 +170,7 @@ Foam::solverPerformance Foam::PPCG::scalarSolveCG
|
||||
)
|
||||
{
|
||||
// Make sure gamma,delta are available
|
||||
if (Pstream::parRun())
|
||||
if (Pstream::parRun() && outstandingRequest != -1)
|
||||
{
|
||||
Pstream::waitRequest(outstandingRequest);
|
||||
outstandingRequest = -1;
|
||||
@ -248,6 +248,12 @@ Foam::solverPerformance Foam::PPCG::scalarSolveCG
|
||||
matrix_.Amul(n, m, interfaceBouCoeffs_, interfaces_, cmpt);
|
||||
}
|
||||
|
||||
// Cleanup any outstanding requests
|
||||
if (Pstream::parRun() && outstandingRequest != -1)
|
||||
{
|
||||
Pstream::waitRequest(outstandingRequest);
|
||||
}
|
||||
|
||||
return solverPerf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user