Skip to content
Snippets Groups Projects
Commit 2a007b00 authored by mattijs's avatar mattijs
Browse files

BUG: PPCR: check outstanding request. Fixes #2577

If the exit is through maxIter it should still wait
for outstanding requests
parent b6a6e40c
Branches
Tags
No related merge requests found
......@@ -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;
}
......
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