Skip to content

fixedJumpAMI (cyclicAMI) no longer runs in parallel

The fixedJumpAMI boundary condition can no longer run in parallel.

Steps to reproduce

Create a case using this boundary condition and run it in parallel.

Example case

An example case is added to this bug report. This case consists in a 3-periodic cube using fixedJumpAMI along the x direction. Other directions are cyclicAMI. The solver is simpleFoam.

What is the current bug behaviour?

Computation crashes on a FATAL ERROR.

What is the expected correct behavior?

The computation should run in parallel similar to single core (no crash).

Relevant logs and/or images

simpleFoam crashes in parallel with this kind of message (eg. for processor [1]) :

[1]
[1]
[1] --> FOAM FATAL ERROR: (openfoam-2412)
**[1] Outstanding recv request(s) on** patch xMax field p
[1] 
[1]     From void Foam::cyclicAMIFvPatchField<Type>::initInterfaceMatrixUpdate(Foam::solveScalarField&, bool, const Foam::lduAddressing&, Foam::label, const solveScalarField&, const scalarField&, Foam::direction, Foam::UPstream::commsTypes) const [with Type = double; Foam::solveScalarField = Foam::Field<double>; Foam::label = int; Foam::scalarField = Foam::Field<double>; Foam::direction = unsigned char]
[1]     in file fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C at line 600.
[1] 
[1] 
[1] [stack trace]
[1] =============
[1] #5  [0] #5  Foam::lduMatrix::Amul(Foam::Field<double>&, Foam::tmp<Foam::Field<double> > const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char) constFoam::lduMatrix::Amul(Foam::Field<double>&, Foam::tmp<Foam::Field<double> > const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char) const[2] #5  Foam::lduMatrix::Amul(Foam::Field<double>&, Foam::tmp<Foam::Field<double> > const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char) const in ~/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
[1] #8  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in ~/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
[1] #9  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in  in ~/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
[1] #10  Foam::fvMatrix<double>::solveSegregatedOrCoupled(Foam::dictionary const&)[2] #10  Foam::fvMatrix<double>::solveSegregatedOrCoupled(Foam::dictionary const&)[0] #10  Foam::fvMatrix<double>::solveSegregatedOrCoupled(Foam::dictionary const&) in ~/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
[1] #11[0] #11    Foam::fvMesh::solve(Foam::fvMatrix<double>&, Foam::dictionary const&) constFoam::fvMesh::solve(Foam::fvMatrix<double>&, Foam::dictionary const&) const[2] #11  Foam::fvMesh::solve(Foam::fvMatrix<double>&, Foam::dictionary const&) const in ~/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
[1] #12   in ~/OpenFOAM/OpenFOAM-plus/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
[1] #14   in /usr/lib64/libc.so.6
[1] =============

Environment information

  • OpenFOAM version : v2412
  • Operating system : RedHat (Rocky 8)
  • Hardware info : GenuineIntel platform
  • Compiler : gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-16)

Possible fixes

The source code that might be responsible to this crash is : src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C

In particular, commit 8b85e5c9 added assertions "that all receives are known to have finished". But the cyclicAMIFvPatchField.C crashes on these additions ...

Edited by Mattijs Janssens