quokka-astro / quokka

Two-moment AMR radiation hydrodynamics (with self-gravity, particles, and chemistry) on CPUs/GPUs for astrophysics
https://quokka-astro.github.io/quokka/
MIT License
45 stars 12 forks source link

HydroShocktubeCMA fails with Intel OneAPI 2024.2 #649

Open BenWibking opened 2 months ago

BenWibking commented 2 months ago

Describe the bug The Intel OneAPI 2024.2 compiler causes the HydroShocktubeCMA test to fail. It produces this output: https://github.com/quokka-astro/quokka/actions/runs/9602632417/job/26483912584?pr=647

We are building with -ffp-model=precise turned on: https://github.com/quokka-astro/quokka/blob/79d6328878f4a7b9020203515dc3dcf431f09b0a/.github/workflows/intel.yml#L39

To Reproduce Steps to reproduce the behavior:

  1. Compile HydroShocktubeCMA
  2. Run HydroShocktubeCMA
  3. See error:

    6/35 Test  #6: HydroShocktubeCMA ................***Failed   40.62 sec
    Initializing AMReX (24.05)...
    MPI initialized with 1 MPI processes
    MPI initialized with thread support level 0
    AMReX (24.05) initialized
    Using default ref_ratio = 2 at all levels
    Successfully read inputs file ... 
    Creating new distribution map on level: 0
    Creating new distribution map on level: 1
    
    Warning:  [Performance] The maximum grid size (32) is too small for reasonable performance. It should be 128 (or greater) when running on GPUs, and 64 (or greater) when running on CPUs.
    
    Coarse STEP 1 at t = 0 (0%) starts ...
    [Level 0 step 1] ADVANCE with time = 0.0000000000e+00 dt = 4.9520757113e-04
        >> CFL violation detected on level 0 with dt_lev = 0.0004952075711 and dt_cfl = 0.0003045886573
           max_signal = 1.923700985
        >> WARNING: Hydro advance failed on level 0
        >> Re-trying hydro advance at level 0 with reduced timestep (nsubsteps = 2, dt_new = 0.0002476037856)
    [Level 0 step 1] Advanced 1024 cells
    [Level 1 step 1] ADVANCE with time = 0.0000000000e+00 dt = 2.4760378556e-04
        >> CFL violation detected on level 1 with dt_lev = 0.0002476037856 and dt_cfl = 0.0001522943286
           max_signal = 1.923700985
        >> WARNING: Hydro advance failed on level 1
        >> Re-trying hydro advance at level 1 with reduced timestep (nsubsteps = 2, dt_new = 0.00012380[18](https://github.com/quokka-astro/quokka/actions/runs/9602632417/job/26483912584?pr=647#step:7:19)928)
    [Level 1 step 1] Advanced 32 cells
    [Level 1 step 2] ADVANCE with time = 2.4760378556e-04 dt = 2.4760378556e-04
        >> CFL violation detected on level 1 with dt_lev = 0.0002476037856 and dt_cfl = 0.000140551[21](https://github.com/quokka-astro/quokka/actions/runs/9602632417/job/26483912584?pr=647#step:7:22)39
           max_signal = 2.084427035
        >> WARNING: Hydro advance failed on level 1
        >> Re-trying hydro advance at level 1 with reduced timestep (nsubsteps = 2, dt_new = 0.0001[23](https://github.com/quokka-astro/quokka/actions/runs/9602632417/job/26483912584?pr=647#step:7:24)8018928)
    [Level 1 step 2] Advanced 32 cells
    Mass scalars not conserved to machine precision!
    Mass scalars not conserved to machine precision!
    Mass scalars not conserved to machine precision!

    [thousands of lines of output follow]

Additional context None

BenWibking commented 2 months ago

@psharda There is too much output for this test when it fails. Is there any way you can update this so it doesn't print the error message for every cell?

BenWibking commented 2 months ago

Error tolerance is defined here: https://github.com/quokka-astro/quokka/blob/79d6328878f4a7b9020203515dc3dcf431f09b0a/src/HydroShocktubeCMA/test_hydro_shocktube_cma.cpp#L226