Fix test with gcc7
Some tests where not compiling with GCC v.7.
I have done a few quick fix, but the following tests are failing
- test27cells.sh
- test125cellsPerturbed.sh
- test-driver (dirty crash)
- testRiemannHLLC
- testPeriodicBC.sh
- testPeriodicBCPerturbed.sh
On my master and with GCC 5.4, only the two first are failing.
TestPeriodicBC[Perturbed].sh
failing due to a segmentation fault
RiemannHLLC
[05783.2] testRiemannHLLC.c:check_riemann_symmetry():76: Asymmetry in flux solution!
[05782.9] check_riemann_symmetry: Flux solver asymmetric: [7.467e+00,1.018e+02,-5.346e+01,-9.949e+01,1.567e+03] == [-7.467e+00,-1.018e+02,5.346e+01,9.949e+01,-1.567e+03]
FAIL testRiemannHLLC (exit status: 134)
Test Cells
Accuracy error (relative error of about 1e-3)
Driver
../test-driver: line 107: 17857 Aborted (core dumped) "$@" > $log_file 2>&1
I will look to theses bugs, but if you have any suggestions before I start. I will gladly listen to them
Merge request reports
Activity
Here is my config (I am using the enable-debug option)
------- Summary -------- SWIFT v.0.6.0 Compiler : mpicc - vendor : gnu - version : 7.2.0 - flags : -g -O0 -gdwarf -fvar-tracking-assignments -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -funroll-loops -march=core-avx2 -mavx2 -pthread -Wall -Wextra -Wno-unused-parameter -Wshadow -Werror MPI enabled : yes HDF5 enabled : yes - parallel : yes Metis enabled : yes FFTW3 enabled : yes libNUMA enabled : yes Using tcmalloc : no Using jemalloc : no CPU profiler : no Pthread barriers : yes Hydro scheme : gadget2 Dimensionality : 3 Kernel function : cubic-spline Equation of state : ideal-gas Adiabatic index : 5/3 Riemann solver : none Cooling function : none External potential : none Multipole order : 5 No gravity below ID : no Individual timers : no Task debugging : no Threadpool debugging : no Debugging checks : no Interaction debugging : no Naive interactions : no Gravity checks : no ------------------------
- Resolved by Matthieu Schaller
73 73 "[%.3e,%.3e,%.3e,%.3e,%.3e]\n", 74 74 totflux1[0], totflux1[1], totflux1[2], totflux1[3], totflux1[4], 75 75 totflux2[0], totflux2[1], totflux2[2], totflux2[3], totflux2[4]); 76 error("Asymmetry in flux solution!"); 76 message("Asymmetry in flux solution!"); I am getting the following error (I have been able to get the same behavior with a different failing test). It is not important, but it would be cleaner if we change this.
PASS: testLogger ../test-driver: line 107: 28213 Aborted (core dumped) "$@" > $log_file 2>&1 FAIL: testRiemannHLLC
@jwillis you can use spack to install/compile gcc v7 ;)
I can't reproduce these crashes on my laptop (Haswell) with gcc 7.2. Everything runs smoothly.
For the accuracy errors, we will replace these tests with something more robust as they are a real pain.
I'll open a discussion thread for exit() vs. abort() and merge in the other two genuine fixes.
@lhausammann for reference your suggestion for the
abort()
has been pushed in !473 (merged).