MFlowCode / MFC

Exascale simulation of multiphase/physics fluid dynamics
https://mflowcode.github.io
MIT License
144 stars 67 forks source link

Add `--debug` builds and tests to CI #124

Closed sbryngelson closed 1 year ago

sbryngelson commented 1 year ago

Add --debug builds and tests to CI for CPU and GPU (can skip wingtip for the CPU case).

sbryngelson commented 1 year ago

Update: The current MFC version (and many prior to it) do not pass tests on CPU with --debug enabled. I am ignoring the full post_process testing, so I don't worry about the h5dump problem @anshgupta1234 experienced. I am adding @wilfonba to the issue since it's occurring in the refactored viscous routine.

Here is the error

shb-m1pro: Downloads/MFC $ ./mfc.sh test -j 8
mfc: OK > (venv) Entered the Python virtual environment.
      ___            ___          ___
     /__/\          /  /\        /  /\       spencer@shb-m1pro.attlocal.net [Darwin]
    |  |::\        /  /:/_      /  /:/       ---------------------------------------
    |  |:|:\      /  /:/ /\    /  /:/        --jobs 8
  __|__|:|\:\    /  /:/ /:/   /  /:/  ___    --mpi
 /__/::::| \:\  /__/:/ /:/   /__/:/  /  /\   --no-gpu
 \  \:\~~\__\/  \  \:\/:/    \  \:\ /  /:/   --debug
  \  \:\         \  \::/      \  \:\  /:/
   \  \:\         \  \:\       \  \:\/:/     --------------------------------------------
    \  \:\         \  \:\       \  \::/      $ ./mfc.sh [build, run, test, clean] --help
     \__\/          \__\/        \__\/

Building pre_process:

  $ cmake --build /Users/spencer/Downloads/MFC/build/pre_process --target pre_process -j 8 --config Debug

[100%] Built target pre_process

  $ cmake --install /Users/spencer/Downloads/MFC/build/pre_process

-- Install configuration: "Debug"
-- Up-to-date: /Users/spencer/Downloads/MFC/build/install/bin/pre_process

Building simulation:

  $ cmake --build /Users/spencer/Downloads/MFC/build/simulation --target simulation -j 8 --config Debug

[100%] Built target simulation

  $ cmake --install /Users/spencer/Downloads/MFC/build/simulation

-- Install configuration: "Debug"
-- Up-to-date: /Users/spencer/Downloads/MFC/build/install/bin/simulation

Test pre_process and simulation | from D79C3E6F to BDD3411B (148 tests)

   tests/UUID    Summary

    3AE495F4    1D -> bc=-5
    D79C3E6F    1D -> bc=-1
    5EC236F2    1D -> bc=-6
    70DAE9E8    1D -> bc=-4
    AED93D34    1D -> bc=-8
    8A59E8E6    1D -> bc=-2
    48CCE072    1D -> bc=-7
    C5B79059    1D -> bc=-9
    727F72ED    1D -> bc=-10
    A60691E7    1D -> bc=-11
    3FC6FC4A    1D -> bc=-12
    2AB32975    1D -> bc=-3
    B3C85904    1D -> weno_order=3 -> mapped_weno=F -> mp_weno=F
    7077C99F    1D -> weno_order=3 -> mapped_weno=T -> mp_weno=F
    84017671    1D -> weno_order=5 -> mapped_weno=F -> mp_weno=F
    F5890628    1D -> weno_order=5 -> mapped_weno=T -> mp_weno=F
    34580912    1D -> weno_order=5 -> mapped_weno=F -> mp_weno=T
    5527832F    1D -> 1 Fluid(s) -> riemann_solver=1 -> mixture_err
    4AEF478A    1D -> 1 Fluid(s) -> riemann_solver=1 -> avg_state=1
    32D0F235    1D -> 1 Fluid(s) -> riemann_solver=1 -> wave_speeds=2
    18BDCBC8    1D -> 1 Fluid(s) -> riemann_solver=2 -> mixture_err
    F4F6AC27    1D -> 1 Fluid(s) -> riemann_solver=2 -> wave_speeds=2
    F97573DB    1D -> 1 Fluid(s) -> riemann_solver=2 -> avg_state=1
    2F35A1FE    1D -> 1 Fluid(s) -> riemann_solver=2 -> model_eqns=3
    8EAC3DA7    1D -> 1 Fluid(s) -> Viscous
    1E738705    1D -> 2 Fluid(s) -> riemann_solver=1 -> mixture_err
    0879E062    1D -> 2 Fluid(s) -> riemann_solver=1 -> avg_state=1
    83EFC30C    1D -> 2 Fluid(s) -> riemann_solver=1 -> wave_speeds=2
    1CCA82F5    1D -> 2 Fluid(s) -> riemann_solver=1 -> mpp_lim
    3A8359F6    1D -> 2 Fluid(s) -> riemann_solver=2 -> mixture_err
    6D24B115    1D -> 2 Fluid(s) -> riemann_solver=2 -> avg_state=1
    461DCB09    1D -> 2 Fluid(s) -> riemann_solver=2 -> wave_speeds=2
    9DAC4DDC    1D -> 2 Fluid(s) -> riemann_solver=2 -> alt_soundspeed
    FD891191    1D -> 2 Fluid(s) -> riemann_solver=2 -> model_eqns=3
    C4907722    1D -> 2 Fluid(s) -> riemann_solver=2 -> mpp_lim
    C79E1D3C    1D -> 2 Fluid(s) -> Viscous
  mfc: OK > (venv) Entered the Python virtual environment.
        ___            ___          ___
       /__/\          /  /\        /  /\       spencer@shb-m1pro.attlocal.net [Darwin]
      |  |::\        /  /:/_      /  /:/       ---------------------------------------
      |  |:|:\      /  /:/ /\    /  /:/        --jobs 1
    __|__|:|\:\    /  /:/ /:/   /  /:/  ___    --mpi
   /__/::::| \:\  /__/:/ /:/   /__/:/  /  /\   --no-gpu
   \  \:\~~\__\/  \  \:\/:/    \  \:\ /  /:/   --debug
    \  \:\         \  \::/      \  \:\  /:/    --targets pre_process and simulation
     \  \:\         \  \:\       \  \:\/:/     --------------------------------------------
      \  \:\         \  \:\       \  \::/      $ ./mfc.sh  --help
       \__\/          \__\/        \__\/

  Run
    Acquiring /Users/spencer/Downloads/MFC/tests/8E3D99E6/case_pre_sim.py...
    Configuration:
      Input               /Users/spencer/Downloads/MFC/tests/8E3D99E6/case_pre_sim.py
      Job Name      (-#)  MFC
      Engine        (-e)  interactive
      Nodes         (-N)  1
      Tasks (/node) (-n)  1
      MPI Binary    (-b)  mpirun
    Generating input files...
    Building pre_process:
      --no-build specified, skipping...
    Building simulation:
      --no-build specified, skipping...
    Ensuring the Interactive Engine works (30s timeout):
  $ mpirun -np 1 hostname
    Running pre_process:

      $ mpirun -np 1 /Users/spencer/Downloads/MFC/build/install/bin/pre_process

   Pre-processing a 299x0x0 case on 1 rank(s)
   Final Time   3.4669999999999979E-003

      Done (in 0:00:00.209397)
    Running simulation:

      $ mpirun -np 1 /Users/spencer/Downloads/MFC/build/install/bin/simulation

   Simulating a 299x0x0 case on 1 rank(s)
            -3
           299           0           0
   [  0%]  Time step        1 of 51 @ t_step = 0
  At line 552 of file /Users/spencer/Downloads/MFC/src/simulation/m_viscous.fpp
  Fortran runtime error: Allocatable actual argument 'dy' is not allocated

  Error termination. Backtrace:

  Could not print backtrace: executable file is not an executable
  #0  0x104e73187
  #1  0x104e73d37
  #2  0x104e740f3
  #3  0x1045d5e5b
  #4  0x1043e210b
  #5  0x10459f3df
  #6  0x104694077
  #7  0x104695abb
wilfonba commented 1 year ago

@sbryngelson Fixed. Also, I don't know if this was already known, but testing with --debug and -a on CPUs works on my local machine.