turbulentDigitalFilterInlet crash after parallel run when not all partitions have the inlet BC
Parallel run using turbulentDigitalFilterInlet runs ok, but crashes in the reconstruction when not all partitions have the turbulentDigitalFilterInlet BC Summary
Steps to reproduce
- Using the tutorial
cp -r $FOAM_TUTORIALS/tutorials/verificationAndValidation/turbulentInflow/oneCellThickPlaneChannel .
- Change blockMesh to have two grid elements in the x direction
vi setups.orig/common/system/blockMeshDict
blocks
(
hex ( 0 1 2 5 6 7 8 11) (2 23 82) simpleGrading (1 10.7028 1)
hex ( 5 2 3 4 11 8 9 10) (2 23 82) simpleGrading (1 -10.7028 1)
);
- Change decomposeParDict to split the grid in the x and y directions. In this way, two partitions do not have the turbulentDigitalFilterInlet BC.
vi setups.orig/common/system/decomposeParDict
method simple;
simpleCoeffs
{
n (2 2 1);
}
-
Run Allrun
-
Observe the issue in
vi ./results/DFM/log.reconstructPar
vi ./results/FSM/log.reconstructPar
(./results/DFSEM/log.reconstructPar runs fine, but uses other BC)
Example case
See above
What is the current bug behaviour?
After a successful parallel run using turbulentDigitalFilterInlet, the reconstruction of the grid using reconstructPar crashes when not all partitions have the turbulentDigitalFilterInlet BC. The problem occurs when interpolating the input profiles (UMean and R). Apparently, the function tries to read values even when the BC is not present in one partition.
As the tutorial test case has only one cell in the x direction, all partitions have a part of the inlet BC, regardless of the partitioning method. To see the bug, the grid from the tutorial has to be altered.
What is the expected correct behavior?
The correct behavior would allow a parallel run to be reconstructed after a successful simulation phase, regardless of the partitioning method and if the BC is present in all partitions or not.
Relevant logs and/or images
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : _c15bfde3cb-20210624 OPENFOAM=2106
Arch : "LSB;label=32;scalar=64"
Exec : reconstructPar
Date : Nov 08 2021
Time : 16:58:37
Host : cl5fr3
PID : 195486
I/O : uncollated
Case : /zhome/academic/HLRS/hlrs/hpcfcunh/scratch/ws3/hpcfcunh-HPCWE_1/oneCellThickPlaneChannel
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Reconstructing fields
region=region0
Time = 0.3
Reconstructing FV fields
Reconstructing volScalarFields
nut
p
Reconstructing volVectorFields
U
turbulentDigitalFilterInlet patch inlet: Interpolating field R from "/zhome/academic/HLRS/hlrs/hpcfcunh/scratch/ws3/hpcfcunh-HPCWE_1/oneCellThickPlaneChannel/constant/boundaryData/inlet/0/R"
# Reynolds stress tensor on patch is consistent #
turbulentDigitalFilterInlet patch inlet: Interpolating field UMean from "/zhome/academic/HLRS/hlrs/hpcfcunh/scratch/ws3/hpcfcunh-HPCWE_1/oneCellThickPlaneChannel/constant/boundaryData/inlet/0/UMean"
# turbulentDigitalFilterInlet initialisation completed #
turbulentDigitalFilterInlet patch inlet: Interpolating field R from "/zhome/academic/HLRS/hlrs/hpcfcunh/scratch/ws3/hpcfcunh-HPCWE_1/oneCellThickPlaneChannel/constant/boundaryData/inlet/0/R"
# Reynolds stress tensor on patch is consistent #
turbulentDigitalFilterInlet patch inlet: Interpolating field UMean from "/zhome/academic/HLRS/hlrs/hpcfcunh/scratch/ws3/hpcfcunh-HPCWE_1/oneCellThickPlaneChannel/constant/boundaryData/inlet/0/UMean"
# turbulentDigitalFilterInlet initialisation completed #
--> FOAM Warning :
From Type Foam::gAverage(const Foam::UList<T>&, Foam::label) [with Type = Foam::Vector<double>; Foam::label = int]
in file /zhome/academic/HLRS/hlrs/hpcfcunh/OpenFOAM/OpenFOAM-v2106/src/OpenFOAM/lnInclude/FieldFunctions.C at line 649
empty field, returning zero.
--> FOAM FATAL ERROR: (openfoam-2106)
Dominant coordinate axis cannot have zero length
From static Foam::tensor Foam::coordinateRotations::axes::rotation(const vector&, const vector&, Foam::coordinateRotations::axes::axisOrder)
in file coordinate/rotation/axesRotation.C at line 76.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::exitOrAbort(int, bool) at ??:?
#2 Foam::coordinateRotations::axes::rotation(Foam::Vector<double> const&, Foam::Vector<double> const&, Foam::coordinateRotations::axes::axisOrder) at ??:?
#3 Foam::coordinateRotations::axes::R() const at ??:?
#4 Foam::coordinateSystem::coordinateSystem(Foam::word const&, Foam::Vector<double> const&, Foam::Vector<double> const&, Foam::Vector<double> const&) at ??:?
#5 Foam::coordSystem::cartesian::cartesian(Foam::Vector<double> const&, Foam::Vector<double> const&, Foam::Vector<double> const&) at ??:?
#6 Foam::turbulentDigitalFilterInletFvPatchVectorField::indexPairs() at ??:?
#7 Foam::turbulentDigitalFilterInletFvPatchVectorField::turbulentDigitalFilterInletFvPatchVectorField(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#8 Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::turbulentDigitalFilterInletFvPatchVectorField>::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#9 Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#10 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::readField(Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#11 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) at ??:?
#12 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:?
#13 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, bool) at ??:?
#14 ? at ??:?
#15 ? at ??:?
#16 ? at ??:?
#17 ? at ??:?
#18 __libc_start_main in /lib64/libc.so.6
#19 ? at ??:?
Environment information
- OpenFOAM version : v2106
- Operating system : centos 8
- Hardware info : AMD EPYC Rome
- Compiler : GCC 9.2