This does not reproduce with gcc 9.1 nor 10.2 so I assume it is quite gcc version-specific. Can you check another gcc version? Could you try -O2 and -O1 optimization levels just so we know at which level does it appear?
The numbers seem quite off, so if this does reproduce, I suggest filing an issue on gitlab.
I’m also seeing this error with GROMACS 2022.2 when building it with the easybuild gofbf-2020a toolchain.
[----------] 1 test from FourCenter
[ RUN ] FourCenter.ListedForcesProperDihedralTest
/tmp/stuekero/avx2/GROMACS/2022.2/gofbf-2020a/gromacs-2022.2/src/testutils/refdata.cpp:949: Failure
In item: /forces/[1]/Z
Actual: 2.9845132827758789
Reference: -14.707831382751465
Difference: 17.6923 (2175423883 single-prec. ULPs, rel. 1.2), signs differ
Tolerance: abs. 1e-06, rel. 0.0001, 200 ULPs, sign must match
/tmp/stuekero/avx2/GROMACS/2022.2/gofbf-2020a/gromacs-2022.2/src/testutils/refdata.cpp:949: Failure
In item: /forces/[2]/Z
Actual: -5.9854907989501953
Reference: 29.496799468994141
Difference: 35.4823 (2192278166 single-prec. ULPs, rel. 1.2), signs differ
Tolerance: abs. 1e-06, rel. 0.0001, 200 ULPs, sign must match
/tmp/stuekero/avx2/GROMACS/2022.2/gofbf-2020a/gromacs-2022.2/src/testutils/refdata.cpp:949: Failure
In item: /forces/[3]/Z
Actual: 3.0009775161743164
Reference: -14.788968086242676
Difference: 17.7899 (2175578017 single-prec. ULPs, rel. 1.2), signs differ
Tolerance: abs. 1e-06, rel. 0.0001, 200 ULPs, sign must match
[ FAILED ] FourCenter.ListedForcesProperDihedralTest (0 ms)
[----------] 1 test from FourCenter (0 ms total)
[...]
99% tests passed, 1 tests failed out of 84
Label Time Summary:
GTest = 131.61 sec*proc (81 tests)
IntegrationTest = 43.81 sec*proc (25 tests)
MpiTest = 85.80 sec*proc (19 tests)
QuickGpuTest = 15.77 sec*proc (17 tests)
SlowTest = 84.00 sec*proc (13 tests)
UnitTest = 3.80 sec*proc (43 tests)
The toolchain consists of:
gcc/9.3.0
openmpi/4.0.3
flexiblas/3.0.4
fftw-mpi/3.3.8
scalapack/2.1.0
As our build-node has Intel SkyLake CPUs (though I’m building for avx2 first), flexiblas should use the BLAS and LAPACK implementation from Intel MKL imkl/2020.1.217.
When I don’t do -fno-math-errno (*), the tests pass just fine.
@ake_s Have you opened a GitLab issue for this? @pszilard Shall I open a GitLab issue, or is gcc/9.3.0 now too old for you to worry about?
Oliver
*) To all the easybuilders (like Åke):
I’ve disabled -fno-math-errno by adding 'precise': True to the toolchainopts.