precice icon indicating copy to clipboard operation
precice copied to clipboard

QR Factorization test in acceleration fails for Release builds with Intel Compiler

Open fsimonis opened this issue 2 years ago • 6 comments

Describe your setup

Operating system (e.g. Linux distribution and version): Ubuntu 22.04 docker: precice/ci-intel:latest preCICE Version: 37a8111670971986fca96604cf93b60e7a8b8668

Add the versions/commit hashes of further adapter and/or bindings.

Describe the problem

The testQRFactorization test fails when compiling with the latest Intel Compiler icpx, in release with -ffp-model=precise.

mpirun -n 4 ./testprecice -t AccelerationTests/testQRFactorization
error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.5!=0.2
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.333333!=0.2
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.25!=0.2
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.333333!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.25!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.25!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.1!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.1!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.0909091!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.1!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.0909091!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/root/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.0833333!=0.0769231
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.

*** 32 failures are detected in the test module "preCICE Tests"

Step To Reproduce

  1. Install the latest intel compiler or use the precice/ci-intel:latest image.
  2. cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-ffp-model=precise . and build.
  3. mpirun -n 4 ./testprecice -t AccelerationTests/testQRFactorization

Expected behaviour Passing test

Additional context

See #1826

fsimonis avatar Oct 25 '23 18:10 fsimonis

~~After #1854, this issue doesn't seem to persist.~~ Aaaand it's back #1826

The current state, however, doesn't require -ffp-model=precise, but instead adds -fhonor-infinities -fhonor-nans when compiling with IntelLLVM.

fsimonis avatar Oct 26 '23 09:10 fsimonis

Try this again when we have a release candidate for 3.0.0

BenjaminRodenberg avatar Nov 20 '23 14:11 BenjaminRodenberg

Testing this again now. The remaining PRs of 3.0.0 shouldn't have an impact on this.

fsimonis avatar Dec 01 '23 12:12 fsimonis

I can reproduce this with a release build with both -ffp-model=precice and -fhonor-infinities -fhonor-nans

/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.5!=0.2
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.333333!=0.2
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.25!=0.2
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.333333!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.25!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.25!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.1!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.1!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.0909091!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.2!=0.166667
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.166667!=0.142857
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.142857!=0.125
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.125!=0.111111
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.111111!=0.1
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.1!=0.0909091
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.0909091!=0.0833333
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.
/home/precice/precice/src/acceleration/test/QRFactorizationTest.cpp(26): error: in "AccelerationTests/testQRFactorization": check testing::equals(A_prime(i, j), A(i, j)) has failed. Not equal: 0.0833333!=0.0769231
Failure occurred in a following context:
    Test context represents "Serial" and runs on rank 0 out of 1.

*** 32 failures are detected in the test module "preCICE Tests"

fsimonis avatar Dec 01 '23 13:12 fsimonis

Also, I cannot reproduce this with clang++ in Release and -ffast-math.

fsimonis avatar Dec 05 '23 12:12 fsimonis

Given how specific this problem is, it's worth dealing with once a becomes a problem and not now for 3.0. Moving to 3.x.x

fsimonis avatar Dec 06 '23 12:12 fsimonis

We integrated the new intel compilers into the CI #1826. While working on this, the issue has not popped up again.

I cannot reproduce this anymore. And users deliberately compiling preCICE with fast-math know that this can backfire. We tell intel to use the precise float model as it breaks the time handling.

Closing

fsimonis avatar Aug 16 '24 08:08 fsimonis