snappyHexMesh fails to detect locationInMesh on ARM64 v8
Summary
snappyHexMesh produces "FOAM FATAL ERROR" when not finding the specified point inside the mesh bounding box on ARM64 (v8) architecture for /some/ configurations of coordinates. A small change in coordinates - either locationInMesh or bounding box coordinates produces expected results, i.e. snappyHexMesh run completes without errors. This behaviour is reproducable for OpenFOAM-v1912 and OpenFOAM-v2012 on ARM64 (v8) AARCH64. Effects of compiler flags in wmake/rules and unsafe-math or fast-math optimizations for gcc have already been ruled out by testing and eliminating relevant compiler options.
Steps to reproduce
Run the attached test case on ARM64 v8 with either OpenFOAM-v1912 or OpenFOAM-v2012. OpenFOAM-8 on ARM64 v8 is not affected.
$ blockMesh && snappyHexMesh
Example case
Attached.
What is the current bug behaviour?
--> FOAM FATAL ERROR: Point (0 0 73) is not inside the mesh or on a face or edge. Bounding box of the mesh:(-600 -600 -4.5588) (600 600 160)
From function static Foam::labelList Foam::refinementParameters::findCells(bool, const Foam::polyMesh&, const pointField&)
in file snappyHexMeshDriver/refinementParameters/refinementParameters.C at line 241.
FOAM exiting
What is the expected correct behavior?
snappyHexMesh finds locationInMesh and completes the meshing run without errors.
Relevant logs and/or images
See attached test case: (/uploads/e538090b2c505ccc12ba6c4a1f260d44/OF-v2012-ARM-AARCH64-snappy-bug.zip)
Environment information
OpenFOAM version : v1912 and v2012 are affected Operating system : Ubuntu-20.04 LTS Hardware info : ARM64 v8 AARCH64 Compiler : gcc system compiler [OF-v2012-ARM-AARCH64-snappy-bug.zip]bundled with Ubuntu-20.04 LTS ARM64
Possible fixes
Unknown at the time of writing.