MFC icon indicating copy to clipboard operation
MFC copied to clipboard

WENO7

Open ChrisZYJ opened this issue 1 year ago • 63 comments

Description

Adds WENO7-BS (the original WENO-JS but 7th order), WENO7-M, WENO7-Z, and TENO7. Only works for uniform grid.

Type of change

  • [x] New feature (non-breaking change which adds functionality)

Scope

  • [x] This PR comprises a set of related changes with a common goal

How Has This Been Tested?

  • [x] 1D Shu-Osher Problem (comparison)

compare_weno7_new

  • [x] 1D 2-Way Shu-Osher Problem (TENO-7)

2_way_shuosher_teno_rho

The left and right-travelling waves are nearly identical. The max-norm difference increases as the simulation proceeds, but is comparable to that of the original WENO5 schemes.

  • [x] 2D Riemann Problem (comparison)

weno7_comparison_2D_riemann

The loss of symmetry is expected for chaotic simulations using high order schemes (see Fu, et al., 2016 for examples). The symmetry of the WENO7 schemes has been checked (see 2-Way Shu-Osher Problem above).

Checklist

  • [x] I have added comments for the new code
  • [x] I added Doxygen docstrings to the new code
  • [x] I have made corresponding changes to the documentation (docs/)
  • [x] I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
  • [x] I have added example cases in examples/ that demonstrate my new feature performing as expected. They run to completion and demonstrate "interesting physics"
  • [x] I ran ./mfc.sh format before committing my code
  • [x] New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
  • [x] This PR does not introduce any repeated code (it follows the DRY principle)
  • [x] I cannot think of a way to condense this code and reduce any introduced additional line count

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

  • [x] Checked that the code compiles using NVHPC compilers
  • [x] Checked that the code compiles using CRAY compilers
  • [x] Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
  • [x] Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
  • [x] Enclosed the new feature via nvtx ranges so that they can be identified in profiles
  • [x] Ran a Nsight Systems profile using ./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR nsys.txt
  • [ ] Ran an Omniperf profile using ./mfc.sh run XXXX --gpu -t simulation --omniperf, and have attached the output file and plain text results to this PR. (omni not attached as it took forever to complete. Instead, performence on Frontier is shown below)
  • [x] Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature

speed_new

The performance comparison between WENO7 variants is as expected. In terms of speed: WENO-JS ≈ WENO-Z > WENO-M > TENO. TENO is more expensive than WENO-M due to the extra stencil required. WENO-Z has a variable power, which requires case-optimization to avoid significant performance penalties. Benchmarking shows that case-optimization for teno_CT has no impact on speed, so it has not been implemented.

What's surprising is that the WENO7 speed appears comparable to that of WENO5. This might be due to the use of hard-coded coefficients for uniform grids, which enables better compiler optimization. I can investigate this further in the future.

ChrisZYJ avatar Sep 28 '24 00:09 ChrisZYJ

Excellent! Glad to have new features. I still need to do code review...

sbryngelson avatar Sep 28 '24 03:09 sbryngelson

Excellent! Glad to have new features. I still need to do code review...

Thanks for helping us review the code! Just to let you know, I still need to rebase to the newest commit, which I can't do right now.

It's probably a dependency issue: On the newest commit, a fresh build works, but afterwards, if I modify anything in m_weno.fpp, even if it's just a comment, the compilation fails. It continues to fail even after I change it back. It only works again if I delete the build folder and build again from scratch. This issue wasn't present several commits ago.

The compilation error is:

(venv) chris@GRAM:~/source/MFC$ ./mfc.sh build -j 4
mfc: OK > (venv) Entered the Python 3.10.12 virtual environment (>= 3.8).

      .=++*:          -+*+=.        | chris@GRAM [Linux]
     :+   -*-        ==   =* .      | ------------------
   :*+      ==      ++    .+-       | 
  :*##-.....:*+   .#%+++=--+=:::.   | --jobs 4
  -=-++-======#=--**+++==+*++=::-:. | --mpi --no-gpu --no-debug --no-gcov --no-unified
 .:++=----------====+*= ==..:%..... | --targets pre_process, simulation, and post_process
  .:-=++++===--==+=-+=   +.  :=     | 
  +#=::::::::=%=. -+:    =+   *:    | ----------------------------------------------------------
 .*=-=*=..    :=+*+:      -...--    | $ ./mfc.sh (build, run, test, clean, count, packer) --help

 Build | syscheck, pre_process, simulation, and post_process | Generic Build

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /home/chris/source/MFC/build/staging/7d9b728a37 --target syscheck --parallel 4 --config Release

[100%] Built target syscheck

 $ cmake --install /home/chris/source/MFC/build/staging/7d9b728a37

-- Install configuration: "Release"
-- Up-to-date: /home/chris/source/MFC/build/install/7d9b728a37/bin/syscheck

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /home/chris/source/MFC/build/staging/9a4af0a3bd --target pre_process --parallel 4 --config Release

[100%] Built target pre_process

 $ cmake --install /home/chris/source/MFC/build/staging/9a4af0a3bd

-- Install configuration: "Release"
-- Up-to-date: /home/chris/source/MFC/build/install/9a4af0a3bd/bin/pre_process

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /home/chris/source/MFC/build/staging/98998883b5 --target simulation --parallel 4 --config Release

[  1%] Preprocessing (Fypp) m_weno.fpp
Scanning dependencies of target simulation
[  2%] Building Fortran object CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o
/home/chris/source/MFC/src/simulation/m_weno.fpp:916:35:

  916 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:917:35:

  917 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_rs_vf, vR_rs_vf
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:917:35:

  917 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_rs_vf, vR_rs_vf
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:510:35:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:510:35:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:510:35:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:511:35:

  511 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:511:35:

  511 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:511:35:

  511 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:916:35:

  916 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:917:35:

  917 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_rs_vf, vR_rs_vf
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:917:35:

  917 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_rs_vf, vR_rs_vf
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:518:37:

  518 |         real(kind(0d0)), dimension(0:weno_polyn) :: alpha
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:518:37:

  518 |         real(kind(0d0)), dimension(0:weno_polyn) :: alpha
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:520:37:

  520 |         real(kind(0d0)), dimension(0:weno_polyn) :: beta
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:520:37:

  520 |         real(kind(0d0)), dimension(0:weno_polyn) :: beta
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:521:37:

  521 |         real(kind(0d0)), dimension(0:weno_polyn) :: delta
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:521:37:

  521 |         real(kind(0d0)), dimension(0:weno_polyn) :: delta
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:516:35:

  516 |         real(kind(0d0)), dimension(-weno_polyn:weno_polyn - 1) :: dvd
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:516:47:

  516 |         real(kind(0d0)), dimension(-weno_polyn:weno_polyn - 1) :: dvd
      |                                               1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:516:35:

  516 |         real(kind(0d0)), dimension(-weno_polyn:weno_polyn - 1) :: dvd
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:519:37:

  519 |         real(kind(0d0)), dimension(0:weno_polyn) :: omega
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:519:37:

  519 |         real(kind(0d0)), dimension(0:weno_polyn) :: omega
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:517:37:

  517 |         real(kind(0d0)), dimension(0:weno_polyn) :: poly
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:517:37:

  517 |         real(kind(0d0)), dimension(0:weno_polyn) :: poly
      |                                     1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:510:35:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:510:35:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:510:35:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:511:35:

  511 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:511:35:

  511 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:511:35:

  511 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/home/chris/source/MFC/src/simulation/m_weno.fpp:816:30:

  816 |                         do k = is1_weno%beg - weno_polyn, is1_weno%end + weno_polyn
      |                              1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:816:57:

  816 |                         do k = is1_weno%beg - weno_polyn, is1_weno%end + weno_polyn
      |                                                         1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:855:34:

  855 |                             do k = is1_weno%beg - weno_polyn, is1_weno%end + weno_polyn
      |                                  1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:855:61:

  855 |                             do k = is1_weno%beg - weno_polyn, is1_weno%end + weno_polyn
      |                                                             1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:887:34:

  887 |                             do k = is1_weno%beg - weno_polyn, is1_weno%end + weno_polyn
      |                                  1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:887:61:

  887 |                             do k = is1_weno%beg - weno_polyn, is1_weno%end + weno_polyn
      |                                                             1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:608:40:

  608 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:611:44:

  611 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:617:44:

  617 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:635:40:

  635 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:638:44:

  638 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:644:44:

  644 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:608:40:

  608 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:611:44:

  611 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:617:44:

  617 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:635:40:

  635 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:638:44:

  638 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:644:44:

  644 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:608:40:

  608 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:611:44:

  611 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:617:44:

  617 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:635:40:

  635 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:638:44:

  638 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:644:44:

  644 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:703:40:

  703 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:706:44:

  706 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:712:44:

  712 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:717:44:

  717 |                                     elseif (teno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:744:40:

  744 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:747:44:

  747 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:753:44:

  753 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:756:44:

  756 |                                     elseif (teno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:771:24:

  771 |                     if (mp_weno) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:703:40:

  703 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:706:44:

  706 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:712:44:

  712 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:717:44:

  717 |                                     elseif (teno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:744:40:

  744 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:747:44:

  747 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:753:44:

  753 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:756:44:

  756 |                                     elseif (teno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:771:24:

  771 |                     if (mp_weno) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:703:40:

  703 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:706:44:

  706 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:712:44:

  712 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:717:44:

  717 |                                     elseif (teno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:744:40:

  744 |                                     if (wenojs) then
      |                                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:747:44:

  747 |                                     elseif (mapped_weno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:753:44:

  753 |                                     elseif (wenoz) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:756:44:

  756 |                                     elseif (teno) then
      |                                            1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:771:24:

  771 |                     if (mp_weno) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:285:27:

  285 |             s = m; s_cb => x_cb; bc_s = bc_x
      |                           1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:287:27:

  287 |             s = n; s_cb => y_cb; bc_s = bc_y
      |                           1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:289:27:

  289 |             s = p; s_cb => z_cb; bc_s = bc_z
      |                           1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:296:26:

  296 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                          1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:296:51:

  296 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                                                   1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:325:24:

  325 |                     if (null_weights) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:341:26:

  341 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                          1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:341:51:

  341 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                                                   1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:471:24:

  471 |                     if (null_weights) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:296:26:

  296 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                          1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:296:51:

  296 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                                                   1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:325:24:

  325 |                     if (null_weights) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:341:26:

  341 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                          1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:341:51:

  341 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                                                   1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:471:24:

  471 |                     if (null_weights) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:296:26:

  296 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                          1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:296:51:

  296 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                                                   1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:325:24:

  325 |                     if (null_weights) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:341:26:

  341 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                          1
Warning: Deleted feature: Start expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:341:51:

  341 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                                                   1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
/home/chris/source/MFC/src/simulation/m_weno.fpp:471:24:

  471 |                     if (null_weights) then
      |                        1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/chris/source/MFC/src/simulation/m_weno.fpp:184:30:

  184 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:184:56:

  184 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:184:85:

  184 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                     1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:184:111:

  184 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                               1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:186:30:

  186 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:186:56:

  186 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:186:85:

  186 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                     1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:186:111:

  186 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                               1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:189:24:

  189 |         @:ALLOCATE_GLOBAL(d_cbL_x(0:weno_polyn, is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn))
      |                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:189:36:

  189 |         @:ALLOCATE_GLOBAL(d_cbL_x(0:weno_polyn, is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn))
      |                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:189:62:

  189 |         @:ALLOCATE_GLOBAL(d_cbL_x(0:weno_polyn, is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn))
      |                                                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:190:24:

  190 |         @:ALLOCATE_GLOBAL(d_cbR_x(0:weno_polyn, is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn))
      |                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:190:36:

  190 |         @:ALLOCATE_GLOBAL(d_cbR_x(0:weno_polyn, is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn))
      |                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:190:62:

  190 |         @:ALLOCATE_GLOBAL(d_cbR_x(0:weno_polyn, is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn))
      |                                                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:192:26:

  192 |         @:ALLOCATE_GLOBAL(beta_coef_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                          1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:192:52:

  192 |         @:ALLOCATE_GLOBAL(beta_coef_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:192:81:

  192 |         @:ALLOCATE_GLOBAL(beta_coef_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                 1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:192:107:

  192 |         @:ALLOCATE_GLOBAL(beta_coef_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                           1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:216:30:

  216 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:216:56:

  216 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:216:85:

  216 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                     1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:216:111:

  216 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                               1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:218:30:

  218 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:218:56:

  218 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:218:85:

  218 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                     1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:218:111:

  218 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                               1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:221:24:

  221 |         @:ALLOCATE_GLOBAL(d_cbL_y(0:weno_polyn, is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn))
      |                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:221:36:

  221 |         @:ALLOCATE_GLOBAL(d_cbL_y(0:weno_polyn, is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn))
      |                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:221:62:

  221 |         @:ALLOCATE_GLOBAL(d_cbL_y(0:weno_polyn, is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn))
      |                                                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:222:24:

  222 |         @:ALLOCATE_GLOBAL(d_cbR_y(0:weno_polyn, is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn))
      |                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:222:36:

  222 |         @:ALLOCATE_GLOBAL(d_cbR_y(0:weno_polyn, is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn))
      |                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:222:62:

  222 |         @:ALLOCATE_GLOBAL(d_cbR_y(0:weno_polyn, is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn))
      |                                                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:224:26:

  224 |         @:ALLOCATE_GLOBAL(beta_coef_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                          1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:224:52:

  224 |         @:ALLOCATE_GLOBAL(beta_coef_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:224:81:

  224 |         @:ALLOCATE_GLOBAL(beta_coef_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                 1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:224:107:

  224 |         @:ALLOCATE_GLOBAL(beta_coef_y(is2_weno%beg + weno_polyn:is2_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                           1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:241:30:

  241 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:241:56:

  241 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:241:85:

  241 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                     1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:241:111:

  241 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                               1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:243:30:

  243 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:243:56:

  243 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:243:85:

  243 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                     1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:243:111:

  243 |         @:ALLOCATE_GLOBAL(poly_coef_cbR_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                               1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:246:24:

  246 |         @:ALLOCATE_GLOBAL(d_cbL_z(0:weno_polyn, is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn))
      |                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:246:36:

  246 |         @:ALLOCATE_GLOBAL(d_cbL_z(0:weno_polyn, is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn))
      |                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:246:62:

  246 |         @:ALLOCATE_GLOBAL(d_cbL_z(0:weno_polyn, is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn))
      |                                                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:247:24:

  247 |         @:ALLOCATE_GLOBAL(d_cbR_z(0:weno_polyn, is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn))
      |                        1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:247:36:

  247 |         @:ALLOCATE_GLOBAL(d_cbR_z(0:weno_polyn, is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn))
      |                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:247:62:

  247 |         @:ALLOCATE_GLOBAL(d_cbR_z(0:weno_polyn, is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn))
      |                                                              1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:249:26:

  249 |         @:ALLOCATE_GLOBAL(beta_coef_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                          1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:249:52:

  249 |         @:ALLOCATE_GLOBAL(beta_coef_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                    1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:249:81:

  249 |         @:ALLOCATE_GLOBAL(beta_coef_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                 1
Warning: Legacy Extension: REAL array index at (1)
/home/chris/source/MFC/src/simulation/m_weno.fpp:249:107:

  249 |         @:ALLOCATE_GLOBAL(beta_coef_z(is3_weno%beg + weno_polyn:is3_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                                                                           1
Warning: Legacy Extension: REAL array index at (1)
gmake[3]: *** [CMakeFiles/simulation.dir/build.make:749: CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/simulation.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/simulation.dir/rule] Error 2
gmake: *** [Makefile:170: simulation] Error 2
 

Error: Failed to build the simulation target.

Terminated

mfc: ERROR > main.py finished with a 143 exit code.
mfc: (venv) Exiting the Python virtual environment.

ChrisZYJ avatar Sep 28 '24 07:09 ChrisZYJ

Having a look... in the meantime I found this

   Failed test tests/16A922E4: 1D -> weno_order=3 -> mapped_weno=T after 3 attempt(s).

which follows from your

 mapped_weno is not supported for weno_order = 7. Exiting ...

sbryngelson avatar Sep 28 '24 12:09 sbryngelson

It's probably a dependency issue: On the newest commit, a fresh build works, but afterwards, if I modify anything in m_weno.fpp, even if it's just a comment, the compilation fails.

I can't reproduce this on my computer. Added some new lines and comments and deleted a few lines in m_weno and it rebuilt and tested fine (except for the failing test above).

sbryngelson avatar Sep 28 '24 12:09 sbryngelson

Thanks for helping to test it! Looks like the dependency issue is specific to my system... I'll look for the cause

ChrisZYJ avatar Sep 28 '24 18:09 ChrisZYJ

Having a look... in the meantime I found this

   Failed test tests/16A922E4: 1D -> weno_order=3 -> mapped_weno=T after 3 attempt(s).

which follows from your

 mapped_weno is not supported for weno_order = 7. Exiting ...

Sorry forgot to push the commit that fixed this for WENO7M

ChrisZYJ avatar Sep 28 '24 18:09 ChrisZYJ

It's unclear why WENO7 is incompatible with grid stretching? We use the stretching feature often.

sbryngelson avatar Sep 28 '24 18:09 sbryngelson

It's unclear why WENO7 is incompatible with grid stretching? We use the stretching feature often.

It should be compatible, but I haven't done it. Will need to find a paper with the extremely long 7th order WENO smoothness coefficients (beta's) formulas for stretched grids. If not, maybe I'll need to derive that

ChrisZYJ avatar Sep 28 '24 23:09 ChrisZYJ

Also, the build error is not specific to my machine. The same error appears on both Bridges2 and Delta for CPU compilation when I:

  1. build
  2. add a comment in m_weno.fpp
  3. build again

I've narrowed down the problematic commit to: 2d1de77b Remove deprecated build hacks. Includes move to CCE18 (Frontier) (#620)

but I'm not exactly sure what exactly causes the problem. Maybe @henryleberre you have some ideas? (I'm not in a rush to merge this - please feel free to look into it when you have time. No need to interrupt your weekend!)

ChrisZYJ avatar Sep 28 '24 23:09 ChrisZYJ

Here's the error message on Bridges2 (same on Delta):

[yzhang28@bridges2-login013 MFC]$ [yzhang28@bridges2-login013 MFC]$ ./mfc.sh build -j 4
mfc: OK > (venv) Entered the Python 3.8.6 virtual environment (>= 3.8).

      .=++*:          -+*+=.        | [email protected] [Linux]
     :+   -*-        ==   =* .      | ------------------------------------------
   :*+      ==      ++    .+-       |
  :*##-.....:*+   .#%+++=--+=:::.   | --jobs 4
  -=-++-======#=--**+++==+*++=::-:. | --mpi --no-gpu --debug --no-gcov --no-unified
 .:++=----------====+*= ==..:%..... | --targets pre_process, simulation, and post_process
  .:-=++++===--==+=-+=   +.  :=     |
  +#=::::::::=%=. -+:    =+   *:    | ----------------------------------------------------------
 .*=-=*=..    :=+*+:      -...--    | $ ./mfc.sh (build, run, test, clean, count, packer) --help

 Build | syscheck, pre_process, simulation, and post_process | Generic Build

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/d55d7675f9 --target syscheck --parallel 4 --config Debug

[100%] Built target syscheck

 $ cmake --install /ocean/projects/phy230019p/yzhang28/MFC/build/staging/d55d7675f9

-- Install configuration: "Debug"
-- Installing: /jet/home/yzhang28/ocean/MFC/build/install/d55d7675f9/bin/syscheck

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/01e791bfe0 --target pre_process --parallel 4 --config Debug

[100%] Built target pre_process

 $ cmake --install /ocean/projects/phy230019p/yzhang28/MFC/build/staging/01e791bfe0

-- Install configuration: "Debug"
-- Installing: /jet/home/yzhang28/ocean/MFC/build/install/01e791bfe0/bin/pre_process

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/7e1418ef14 --target simulation --parallel 4 --config Debug

[  1%] Preprocessing (Fypp) m_weno.fpp
Scanning dependencies of target simulation
[  2%] Building Fortran object CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:916:41:

  916 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                         1
Error: Symbol 'startx' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:510:41:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                         1
Error: Symbol 'startx' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:916:50:

  916 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                                  1
Error: Symbol 'starty' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:916:59:

  916 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                                           1
Error: Symbol 'startz' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:816:56:

  816 |                         do k = is1_weno%beg - weno_polyn, is1_weno%end + weno_polyn
      |                                                        1
Error: Symbol 'weno_polyn' at (1) has no IMPLICIT type; did you mean 'weno_dir'?
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:516:46:

  516 |         real(kind(0d0)), dimension(-weno_polyn:weno_polyn - 1) :: dvd
      |                                              1
Error: Symbol 'weno_polyn' at (1) has no IMPLICIT type; did you mean 'weno_dir'?
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:611:55:

  611 |                                     elseif (mapped_weno) then
      |                                                       1
Error: Symbol 'mapped_weno' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:771:31:

  771 |                     if (mp_weno) then
      |                               1
Error: Symbol 'mp_weno' at (1) has no IMPLICIT type; did you mean 'is3_weno_d'?
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:510:50:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                                  1
Error: Symbol 'starty' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:510:59:

  510 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z
      |                                                           1
Error: Symbol 'startz' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:717:48:

  717 |                                     elseif (teno) then
      |                                                1
Error: Symbol 'teno' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:723:79:

  723 |                                         delta = merge(0d0, 1d0, omega < teno_CT)    ! Equation 26
      |                                                                               1
Error: Symbol 'teno_ct' at (1) has no IMPLICIT type; did you mean 'weno_dir'?
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:604:56:

  604 |                                               + weno_eps
      |                                                        1
Error: Symbol 'weno_eps' at (1) has no IMPLICIT type; did you mean 'weno_dir'?
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:608:46:

  608 |                                     if (wenojs) then
      |                                              1
Error: Symbol 'wenojs' at (1) has no IMPLICIT type; did you mean 'weno_dir'?
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:617:49:

  617 |                                     elseif (wenoz) then
      |                                                 1
Error: Symbol 'wenoz' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:325:36:

  325 |                     if (null_weights) then
      |                                    1
Error: Symbol 'null_weights' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:296:50:

  296 |                     do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn
      |                                                  1
Error: Symbol 'weno_polyn' at (1) has no IMPLICIT type; did you mean 'weno_dir'?
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:184:55:

  184 |         @:ALLOCATE_GLOBAL(poly_coef_cbL_x(is1_weno%beg + weno_polyn:is1_weno%end - weno_polyn, 0:weno_polyn, &
      |                                                       1
Error: Symbol 'weno_polyn' at (1) has no IMPLICIT type
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:285:27:

  285 |             s = m; s_cb => x_cb; bc_s = bc_x
      |                           1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:287:27:

  287 |             s = n; s_cb => y_cb; bc_s = bc_y
      |                           1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:289:27:

  289 |             s = p; s_cb => z_cb; bc_s = bc_z
      |                           1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
gmake[3]: *** [CMakeFiles/simulation.dir/build.make:749: CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/simulation.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/simulation.dir/rule] Error 2
gmake: *** [Makefile:170: simulation] Error 2


Error: Failed to build the simulation target.

./mfc.sh: line 53: 2546486 Terminated              python3 "$(pwd)/toolchain/main.py" "$@"

mfc: ERROR > main.py finished with a 143 exit code.
mfc: (venv) Exiting the Python virtual environment.

ChrisZYJ avatar Sep 28 '24 23:09 ChrisZYJ

@ChrisZYJ what compiler?

sbryngelson avatar Sep 29 '24 01:09 sbryngelson

FYI we've seen some weird issues like this before. I don't think it is MFC specific, though it's hard to know for sure. I haven't seen it in weno, to my memory, but in maybe other source code spots. In each case I really don't remember how we rectified the issue, but we did fix it, I think usually by accident. I would consider merging with upstream so at least you're consistent with master. Maybe that will "accidentally" fix it.

sbryngelson avatar Sep 29 '24 01:09 sbryngelson

FYI we've seen some weird issues like this before. I don't think it is MFC specific, though it's hard to know for sure. I haven't seen it in weno, to my memory, but in maybe other source code spots. In each case I really don't remember how we rectified the issue, but we did fix it, I think usually by accident. I would consider merging with upstream so at least you're consistent with master. Maybe that will "accidentally" fix it.

Thanks for the suggestions! I apologize for not being clear in my explanation - the error occurs on a fresh clone of MFC, unrelated to this PR (I probably should have opened a separate issue for it).

The error wasn't present before commit 2d1de77 but has been consistent since then. Therefore, it's most likely a problem with MFC introduced in that specific commit. I'm not certain if it's limited to m_weno.fpp.

I've chosen to work from an earlier commit so I can continue working on WENO7 while this issue gets fixed. Otherwise, I'd need to delete the build directory and rebuild every time I want to test a change.

ChrisZYJ avatar Sep 29 '24 02:09 ChrisZYJ

@ChrisZYJ what compiler?

I'm using GNU v11.4.0 on Ubuntu. For Bridges2 and Delta, I'm loading the default modules.

ChrisZYJ avatar Sep 29 '24 02:09 ChrisZYJ

Also, the build error is not specific to my machine. The same error appears on both Bridges2 and Delta for CPU compilation when I:

  1. build
  2. add a comment in m_weno.fpp
  3. build again

I've narrowed down the problematic commit to: 2d1de77 Remove deprecated build hacks. Includes move to CCE18 (Frontier) (#620)

but I'm not exactly sure what exactly causes the problem. Maybe @henryleberre you have some ideas? (I'm not in a rush to merge this - please feel free to look into it when you have time. No need to interrupt your weekend!)

Regarding narrowing down the commit that seems potentially responsible, I only find these things possibly suspicious:

  • https://github.com/MFlowCode/MFC/commit/2d1de77b5cf1e8b0977e4937eb1222803d8286e2#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL92
  • https://github.com/MFlowCode/MFC/commit/2d1de77b5cf1e8b0977e4937eb1222803d8286e2#diff-9a1dd4fc9560263519cc674465a6d1954d5ec14ef00cd7d27256b2ae7fbdc8cbR8
  • https://github.com/MFlowCode/MFC/commit/2d1de77b5cf1e8b0977e4937eb1222803d8286e2#diff-6f668b6b9aa11ef9d012448223a4c73096e52557b2d2f4e70309db6b3076f3c9R61
  • https://github.com/MFlowCode/MFC/commit/2d1de77b5cf1e8b0977e4937eb1222803d8286e2#diff-6f668b6b9aa11ef9d012448223a4c73096e52557b2d2f4e70309db6b3076f3c9R100

sbryngelson avatar Sep 29 '24 04:09 sbryngelson

Also, the build error is not specific to my machine. The same error appears on both Bridges2 and Delta for CPU compilation when I:

  1. build
  2. add a comment in m_weno.fpp
  3. build again

I've narrowed down the problematic commit to: 2d1de77 Remove deprecated build hacks. Includes move to CCE18 (Frontier) (#620)

but I'm not exactly sure what exactly causes the problem. Maybe @henryleberre you have some ideas? (I'm not in a rush to merge this - please feel free to look into it when you have time. No need to interrupt your weekend!)

@ChrisZYJ I tried this on Bridges2 and cannot replicate the issue.

sbryngelson avatar Sep 30 '24 13:09 sbryngelson

Reminder to add WENO7 and new variants to the readme.md in the root dir.

sbryngelson avatar Sep 30 '24 16:09 sbryngelson

@ChrisZYJ I tried this on Bridges2 and cannot replicate the issue.

Sorry for the trouble! This is really weird - I'll ask someone from my group to try it too. It could be a really silly mistake on my end.

ChrisZYJ avatar Sep 30 '24 17:09 ChrisZYJ

Reminder to add WENO7 and new variants to the readme.md in the root dir.

Thanks for the reminder, and thanks for helping me add it for WENO5 variants last time!

ChrisZYJ avatar Sep 30 '24 17:09 ChrisZYJ

Jose kindly helped me test on Bridges2 and he saw the exact same thing - first build works, second build fails after changing m_weno.fpp, then deleting build directory and rebuilding works

ChrisZYJ avatar Oct 01 '24 00:10 ChrisZYJ

I tried building again on Bridges2 and Delta using 1 processor, and got the same thing again.

Here's the complete log from cloning to getting the errors, with the build details omitted:

[yzhang28@bridges2-login011 ocean]$ git clone https://github.com/MFlowCode/MFC.git
Cloning into 'MFC'...
remote: Enumerating objects: 22139, done.
remote: Counting objects: 100% (1262/1262), done.
remote: Compressing objects: 100% (891/891), done.
remote: Total 22139 (delta 497), reused 969 (delta 304), pack-reused 20877 (from 1)
Receiving objects: 100% (22139/22139), 499.08 MiB | 32.94 MiB/s, done.
Resolving deltas: 100% (14291/14291), done.
Updating files: 100% (1020/1020), done.
[yzhang28@bridges2-login011 ocean]$ cd MFC
[yzhang28@bridges2-login011 MFC]$ git log --oneline
e9da4425 (HEAD -> master, origin/master, origin/HEAD) Update expectedPerformance.md (#637)
edd755f0 Add NVIDIA T4 performance (#636)
07fd9191 Fix #628: Fetch Pyro from upstream (#633)
41357f9a SEO on the website (#635)
f032ad88 Add/fix Macbooks performance (#634)
bf373312 Small correction to CFL time-stepping (#630)
17eb3def (tag: v4.9.6) Upstream CheMFC infrastructure (#544)
b9e6875d Documentation clarification (#625)
3cf7fb6c Add Cleanness CI #2 (#619)
2d1de77b Remove deprecated build hacks. Includes move to CCE18 (Frontier) (#620)
32b764ee Add some more arm processors to the performance table (#624)
63c79cbf Add CFL Based Adaptive Time-Stepping (#515)
1f586b93 Add BlueField3 CPU (Arm Cortex) to performance docs (#618)
12b127c0 add Sapphire Rapids Max HBM to benchmarks (#617)
2651071e Add -Wall for debug build GNU (#610)
bac18ffa Relentless fix (#605)
4ad7a412 DRY m_check_patches & m_check_ib_patches (#607)
0c345eac haswell (#604)
fa76abe6 fix typo (#603)
8a488a52 Fastest CPU yet (#602)
dec9171c DRY m_checker (#592)
cf3ac9fe CCE 18 on Frontier & Benchmarking fixes among others (#596)
c4c15581 Add Power10 specs (#595)
56a71b4b A better performance table (#593)
530e1a5f Improve Acoustic performance (#540)
cbbc8ec3 (tag: v4.9.5) Benchmarks report grind time (#589)
3aac2c3c Two-stage IPO for NVHPC (#581)
7bdf4e32 Updates docs for grammar and removes unstable links (#588)
19878a32 Remove Perl dependency for time-tracking (#587)
e63b8d62 Migrate GT runners to RHEL9 (#585)
75f82f2d Add a new cpu to performance benchmarks (#584)
1efef2ab minor change to mi300a (#583)
4a908702 Performance on AMD MI300A (#582)
50542a50 readme updates (#579)
e12a666c Fix adding footer output to runtimeinfo Fixes #574 (#576)
4c4fb743 Add examples (#573)
4ebd9b03 Codecov improvements (#572)
4dbbeed0 Add support for analytic definition of color function (#571)
465bd4f5 Non-reflecting BC for linear stability analysis solvers (#560)
2fb0a626 2D IBM SHOCK (#542)
cbf1cfab new sapphire rapids chip (#570)
4c3e34de Fixes a parallel i/o issue (#567)
560a1c69 Update compiler-tickets.md (#565)
[yzhang28@bridges2-login011 MFC]$ source ./mfc.sh load
mfc: Select a system:
mfc: ORNL:    Ascent     (a) | Frontier (f) | Summit (s) | Wombat (w)
mfc: ACCESS:  Bridges2   (b) | Expanse (e) | Delta  (d)
mfc: Gatech:  Phoenix    (p)
mfc: Caltech: Richardson (r)
mfc: DoD:     Carpenter  (c) | Nautilus (n)
mfc: (a/f/s/w/b/e/d/p/r/c/n): b
mfc:
mfc: Select configuration:
mfc:  - CPU (c | cpu)
mfc:  - GPU (g | gpu)
mfc: (c/cpu/g/gpu): c
mfc:
mfc: Loading modules (& env variables) for PSC Bridges2 on CPUs:
mfc:  $ module load python/3.8.6 allocations/1.0 gcc/10.2.0 openmpi/4.0.5-gcc10.2.0
mfc: OK > All modules and environment variables have been loaded.
[yzhang28@bridges2-login011 MFC]$ ./mfc.sh build -j 32
mfc: OK > Created a Python virtual environment (venv).
mfc: OK > (venv) Entered the Python 3.8.6 virtual environment (>= 3.8).
mfc: (venv) (Re)Installing mfc.sh's Python dependencies (via Pip).
...
[built successfully]
...
[ 94%] Building Fortran object CMakeFiles/post_process.dir/src/post_process/m_start_up.f90.o
[ 97%] Building Fortran object CMakeFiles/post_process.dir/fypp/post_process/p_main.fpp.f90.o
[100%] Linking Fortran executable post_process
[100%] Built target post_process

 $ cmake --install /ocean/projects/phy230019p/yzhang28/MFC/build/staging/03b34a2688

-- Install configuration: "Release"
-- Installing: /jet/home/yzhang28/ocean/MFC/build/install/03b34a2688/bin/post_process


mfc: (venv) Exiting the Python virtual environment.
[yzhang28@bridges2-login011 MFC]$ vi src/simulation/m_weno.fpp
[here I added a single !]
[yzhang28@bridges2-login011 MFC]$ ./mfc.sh build
mfc: OK > (venv) Entered the Python 3.8.6 virtual environment (>= 3.8).

      .=++*:          -+*+=.        | [email protected] [Linux]
     :+   -*-        ==   =* .      | ------------------------------------------
   :*+      ==      ++    .+-       |
  :*##-.....:*+   .#%+++=--+=:::.   | --jobs 1
  -=-++-======#=--**+++==+*++=::-:. | --mpi --no-gpu --no-debug --no-gcov --no-unified
 .:++=----------====+*= ==..:%..... | --targets pre_process, simulation, and post_process
  .:-=++++===--==+=-+=   +.  :=     |
  +#=::::::::=%=. -+:    =+   *:    | ----------------------------------------------------------
 .*=-=*=..    :=+*+:      -...--    | $ ./mfc.sh (build, run, test, clean, count, packer) --help

 Build | syscheck, pre_process, simulation, and post_process | Generic Build

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/7d9b728a37 --target syscheck --parallel 1 --config Release

[100%] Built target syscheck

 $ cmake --install /ocean/projects/phy230019p/yzhang28/MFC/build/staging/7d9b728a37

-- Install configuration: "Release"
-- Installing: /jet/home/yzhang28/ocean/MFC/build/install/7d9b728a37/bin/syscheck

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/9a4af0a3bd --target pre_process --parallel 1 --config Release

[100%] Built target pre_process

 $ cmake --install /ocean/projects/phy230019p/yzhang28/MFC/build/staging/9a4af0a3bd

-- Install configuration: "Release"
-- Installing: /jet/home/yzhang28/ocean/MFC/build/install/9a4af0a3bd/bin/pre_process

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/98998883b5 --target simulation --parallel 1 --config Release

[  1%] Preprocessing (Fypp) m_weno.fpp
Scanning dependencies of target simulation
[  2%] Building Fortran object CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:916:35:

  916 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:917:35:

  917 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_rs_vf, vR_rs_vf
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:917:35:

  917 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_rs_vf, vR_rs_vf
      |                                   1
...
[same error message]
...
gmake[3]: *** [CMakeFiles/simulation.dir/build.make:749: CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/simulation.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/simulation.dir/rule] Error 2
gmake: *** [Makefile:170: simulation] Error 2


Error: Failed to build the simulation target.

./mfc.sh: line 53: 4134441 Terminated              python3 "$(pwd)/toolchain/main.py" "$@"

mfc: ERROR > main.py finished with a 143 exit code.
mfc: (venv) Exiting the Python virtual environment.
[yzhang28@bridges2-login011 MFC]$ git status -s
 M src/simulation/m_weno.fpp
[yzhang28@bridges2-login011 MFC]$ git reset --hard master
HEAD is now at e9da4425 Update expectedPerformance.md (#637)
[yzhang28@bridges2-login011 MFC]$ git log --oneline
e9da4425 (HEAD -> master, origin/master, origin/HEAD) Update expectedPerformance.md (#637)
edd755f0 Add NVIDIA T4 performance (#636)
07fd9191 Fix #628: Fetch Pyro from upstream (#633)
41357f9a SEO on the website (#635)
f032ad88 Add/fix Macbooks performance (#634)
bf373312 Small correction to CFL time-stepping (#630)
17eb3def (tag: v4.9.6) Upstream CheMFC infrastructure (#544)
b9e6875d Documentation clarification (#625)
3cf7fb6c Add Cleanness CI #2 (#619)
2d1de77b Remove deprecated build hacks. Includes move to CCE18 (Frontier) (#620)
32b764ee Add some more arm processors to the performance table (#624)
63c79cbf Add CFL Based Adaptive Time-Stepping (#515)
1f586b93 Add BlueField3 CPU (Arm Cortex) to performance docs (#618)
12b127c0 add Sapphire Rapids Max HBM to benchmarks (#617)
2651071e Add -Wall for debug build GNU (#610)
bac18ffa Relentless fix (#605)
4ad7a412 DRY m_check_patches & m_check_ib_patches (#607)
0c345eac haswell (#604)
fa76abe6 fix typo (#603)
8a488a52 Fastest CPU yet (#602)
dec9171c DRY m_checker (#592)
cf3ac9fe CCE 18 on Frontier & Benchmarking fixes among others (#596)
c4c15581 Add Power10 specs (#595)
56a71b4b A better performance table (#593)
530e1a5f Improve Acoustic performance (#540)
cbbc8ec3 (tag: v4.9.5) Benchmarks report grind time (#589)
3aac2c3c Two-stage IPO for NVHPC (#581)
7bdf4e32 Updates docs for grammar and removes unstable links (#588)
19878a32 Remove Perl dependency for time-tracking (#587)
e63b8d62 Migrate GT runners to RHEL9 (#585)
75f82f2d Add a new cpu to performance benchmarks (#584)
1efef2ab minor change to mi300a (#583)
4a908702 Performance on AMD MI300A (#582)
50542a50 readme updates (#579)
e12a666c Fix adding footer output to runtimeinfo Fixes #574 (#576)
4c4fb743 Add examples (#573)
4ebd9b03 Codecov improvements (#572)
4dbbeed0 Add support for analytic definition of color function (#571)
465bd4f5 Non-reflecting BC for linear stability analysis solvers (#560)
2fb0a626 2D IBM SHOCK (#542)
cbf1cfab new sapphire rapids chip (#570)
4c3e34de Fixes a parallel i/o issue (#567)
560a1c69 Update compiler-tickets.md (#565)
[yzhang28@bridges2-login011 MFC]$ git status -s
[yzhang28@bridges2-login011 MFC]$ ./mfc.sh build
mfc: OK > (venv) Entered the Python 3.8.6 virtual environment (>= 3.8).

      .=++*:          -+*+=.        | [email protected] [Linux]
     :+   -*-        ==   =* .      | ------------------------------------------
   :*+      ==      ++    .+-       |
  :*##-.....:*+   .#%+++=--+=:::.   | --jobs 1
  -=-++-======#=--**+++==+*++=::-:. | --mpi --no-gpu --no-debug --no-gcov --no-unified
 .:++=----------====+*= ==..:%..... | --targets pre_process, simulation, and post_process
  .:-=++++===--==+=-+=   +.  :=     |
  +#=::::::::=%=. -+:    =+   *:    | ----------------------------------------------------------
 .*=-=*=..    :=+*+:      -...--    | $ ./mfc.sh (build, run, test, clean, count, packer) --help

 Build | syscheck, pre_process, simulation, and post_process | Generic Build

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/7d9b728a37 --target syscheck --parallel 1 --config Release

[100%] Built target syscheck

 $ cmake --install /ocean/projects/phy230019p/yzhang28/MFC/build/staging/7d9b728a37

-- Install configuration: "Release"
-- Installing: /jet/home/yzhang28/ocean/MFC/build/install/7d9b728a37/bin/syscheck

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/9a4af0a3bd --target pre_process --parallel 1 --config Release

[100%] Built target pre_process

 $ cmake --install /ocean/projects/phy230019p/yzhang28/MFC/build/staging/9a4af0a3bd

-- Install configuration: "Release"
-- Installing: /jet/home/yzhang28/ocean/MFC/build/install/9a4af0a3bd/bin/pre_process

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /ocean/projects/phy230019p/yzhang28/MFC/build/staging/98998883b5 --target simulation --parallel 1 --config Release

[  1%] Preprocessing (Fypp) m_weno.fpp
Scanning dependencies of target simulation
[  2%] Building Fortran object CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:916:35:

  916 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/jet/home/yzhang28/ocean/MFC/src/simulation/m_weno.fpp:917:35:

  917 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_rs_vf, vR_rs_vf
      |                                   1
...
[same error message]
...
gmake[3]: *** [CMakeFiles/simulation.dir/build.make:749: CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/simulation.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/simulation.dir/rule] Error 2
gmake: *** [Makefile:170: simulation] Error 2


Error: Failed to build the simulation target.

./mfc.sh: line 53: 11771 Terminated              python3 "$(pwd)/toolchain/main.py" "$@"

mfc: ERROR > main.py finished with a 143 exit code.
mfc: (venv) Exiting the Python virtual environment.

ChrisZYJ avatar Oct 01 '24 00:10 ChrisZYJ

I will try it again soon.

sbryngelson avatar Oct 01 '24 01:10 sbryngelson

I will try it again soon.

Thank you!

ChrisZYJ avatar Oct 01 '24 01:10 ChrisZYJ

I will try it again soon.

Thank you!

@henryleberre @ChrisZYJ I found a smaller version of the problem and can reproduce your case:

  • If you build using ./mfc.sh build -j 32 -t simulation, modify src/simulation/m_weno.fpp, then rebuild with the same command, it works
  • If you build using ./mfc.sh build -j 32 -t pre_process simulation, modify m_weno, then rebuild with the same command it works
  • If you build using ./mfc.sh build -j 32 -t simulation post_process, modify m_weno, then rebuild with the same command it does not work

(I removed the build/ directory between each of these bullet points)

So, something about including post_process in all of this is causing the issue, even though the modification is happening in simulation.

I was able to reproduce it on my MacBook.

In the broken case, it seemingly still pre-processes [fypp] m_weno.fpp before failing:

 Build | syscheck, simulation, and post_process | Generic Build

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /Users/spencer/Downloads/MFC/build/staging/7d9b728a37 --target syscheck --parallel 10 --config Release

[100%] Built target syscheck

 $ cmake --install /Users/spencer/Downloads/MFC/build/staging/7d9b728a37

-- Install configuration: "Release"
-- Up-to-date: /Users/spencer/Downloads/MFC/build/install/7d9b728a37/bin/syscheck

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /Users/spencer/Downloads/MFC/build/staging/98998883b5 --target simulation --parallel 10 --config Release

[  1%] Preprocessing (Fypp) m_weno.fpp
[  2%] Building Fortran object CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o
/Users/spencer/Downloads/MFC/src/simulation/m_weno.fpp:926:35:

  926 |         real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(IN) :: v_rs_ws
      |                                   1
Error: Expression at (1) must be of INTEGER type, found REAL
/Users/spencer/Downloads/MFC/src/simulation/m_weno.fpp:927:35:
[......]

in the same way that it does in the working case:

lawn-100-70-35-133: Downloads/MFC $ ./mfc.sh build -j 10 -t pre_process simulation
mfc: OK > (venv) Entered the Python 3.12.6 virtual environment (>= 3.8).

      .=++*:          -+*+=.        | [email protected] [Darwin]
     :+   -*-        ==   =* .      | ---------------------------------------------------
   :*+      ==      ++    .+-       |
  :*##-.....:*+   .#%+++=--+=:::.   | --jobs 10
  -=-++-======#=--**+++==+*++=::-:. | --mpi --no-gpu --no-debug --no-gcov --no-unified
 .:++=----------====+*= ==..:%..... | --targets pre_process and simulation
  .:-=++++===--==+=-+=   +.  :=     |
  +#=::::::::=%=. -+:    =+   *:    | ----------------------------------------------------------
 .*=-=*=..    :=+*+:      -...--    | $ ./mfc.sh (build, run, test, clean, count, packer) --help

 Build | syscheck, pre_process, and simulation | Generic Build

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /Users/spencer/Downloads/MFC/build/staging/7d9b728a37 --target syscheck --parallel 10 --config Release

[100%] Built target syscheck

 $ cmake --install /Users/spencer/Downloads/MFC/build/staging/7d9b728a37

-- Install configuration: "Release"
-- Up-to-date: /Users/spencer/Downloads/MFC/build/install/7d9b728a37/bin/syscheck

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /Users/spencer/Downloads/MFC/build/staging/9a4af0a3bd --target pre_process --parallel 10 --config Release

[100%] Built target pre_process

 $ cmake --install /Users/spencer/Downloads/MFC/build/staging/9a4af0a3bd

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

 Generating case.fpp.
   Writing a (new) custom case.fpp file.
 $ cmake --build /Users/spencer/Downloads/MFC/build/staging/98998883b5 --target simulation --parallel 10 --config Release

[  1%] Preprocessing (Fypp) m_weno.fpp
[  2%] Building Fortran object CMakeFiles/simulation.dir/fypp/simulation/m_weno.fpp.f90.o
[  4%] Linking Fortran executable simulation
ld: warning: -ld_classic is deprecated and will be removed in a future release
ld: warning: -ld_classic is deprecated and will be removed in a future release
[100%] Built target simulation

This does strongly point to some sort of cmake issue introduced in #620 if the issue does not occur for commits before that.

sbryngelson avatar Oct 02 '24 17:10 sbryngelson

@sbryngelson That commit is not part of this PR (it is behind). I would suggest @ChrisZYJ rebase on upstream and then see if the issue persists.

henryleberre avatar Oct 02 '24 19:10 henryleberre

@henryleberre Maybe I should have opened a new issue to make it clearer - the problem is independent of this PR. All my errors are reproduced with fresh clones of MFC, and is consistent over the past few commits, so rebasing this PR probably wouldn't help. I chose to rebase this PR on a commit before #620, so I can continue working on WENO7 without the build issue. Sorry for the confusion.

ChrisZYJ avatar Oct 02 '24 21:10 ChrisZYJ

@henryleberre Maybe I should have opened a new issue to make it clearer - the problem is independent of this PR. All my errors are reproduced with fresh clones of MFC, and is consistent over the past few commits, so rebasing this PR probably wouldn't help. I chose to rebase this PR on a commit before #620, so I can continue working on WENO7 without the build issue. Sorry for the confusion.

@ChrisZYJ Oh I see - now I'm not entirely sure who is confused! (probably me) - so this issue exists before PR 620? or you are not sure when exactly it appears (other than it exists now and for the past few commits)?

sbryngelson avatar Oct 02 '24 22:10 sbryngelson

@sbryngelson @henryleberre

Sorry for my bad explaination! Some of it got lost in the long converstaion too...

Here's a (hopefully) better summary:

  1. The issue is completely independent of this PR (reproduced on a fresh clone)
  2. It isn't present before commit 2d1de77 (#620)
  3. It's been consistently present since commit 2d1de77 (#620)
  4. It was reproduced on Bridges2 & Delta

ChrisZYJ avatar Oct 02 '24 23:10 ChrisZYJ

@sbryngelson @henryleberre

Sorry for my bad explaination! Some of it got lost in the long converstaion too...

Here's a (hopefully) better summary:

  1. The issue is completely independent of this PR (reproduced on a fresh clone)
  2. It isn't present before commit 2d1de77 (Remove deprecated build hacks. Includes move to CCE18 (Frontier) #620)
  3. It's been consistently present since commit 2d1de77 (Remove deprecated build hacks. Includes move to CCE18 (Frontier) #620)
  4. It was reproduced on Bridges2 & Delta

This makes sense and seems to point to #620 @henryleberre?

sbryngelson avatar Oct 02 '24 23:10 sbryngelson

Thanks @ChrisZYJ for the clarification. I should have read the thread more carefully (I only saw it when @sbryngelson tagged me). Also, sorry I missed you tagging me previously. Going through 2d1de77b5cf1e8b0977e4937eb1222803d8286e2 again, I can't think of an obvious reason why this commit would introduce it but maybe one of the toolchain changes subtly allows for it. I can begin an investigation.

henryleberre avatar Oct 02 '24 23:10 henryleberre