Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Example CI + Fixes to some broken example! #525

Closed
wants to merge 72 commits into from
Closed
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
22abc46
#474: Kickstart
henryleberre Jul 4, 2024
f1bd842
Merge branch 'henry/474' of https://github.com/henryleberre/ChemMFC i…
okBrian Jul 14, 2024
6c0af87
test example workflow
okBrian Jul 14, 2024
5bd78e9
fix example
okBrian Jul 14, 2024
e0e3cdc
test
okBrian Jul 15, 2024
264fede
test 2
okBrian Jul 16, 2024
7298bf8
yay
okBrian Jul 17, 2024
c3af570
Merge branch 'MFlowCode:master' into exampleCI2
okBrian Jul 17, 2024
ff4290d
final changes
okBrian Jul 17, 2024
fd7f68e
Merge branch 'exampleCI2' of https://github.com/okBrian/MFC into exam…
okBrian Jul 17, 2024
3e85cf2
final v2
okBrian Jul 17, 2024
8e302e9
fianl v3
okBrian Jul 17, 2024
01c069c
final v4
okBrian Jul 17, 2024
9bb0796
final v5
okBrian Jul 17, 2024
9fb6279
added a comment
okBrian Jul 17, 2024
112bb89
Switch to fastjsonschema
henryleberre Jul 17, 2024
86d5db2
fixed tol, reduced TestSize, fixed parralel_io w/o mpi, fixed format …
okBrian Jul 24, 2024
2936a95
fixed remaining 4 broken example, todo fix no-mpi possibly
okBrian Jul 27, 2024
b940337
merge w/ master
okBrian Jul 27, 2024
8ee7ca2
fixed new broken examples & temp fix D error
okBrian Jul 28, 2024
5fda4cb
Merge remote-tracking branch 'origin' into exampleCI2
okBrian Jul 31, 2024
e83c13f
fixed no mpi and mpi ?
okBrian Jul 31, 2024
3829807
fix case bug hopefully
okBrian Jul 31, 2024
e071a9c
fix gpu?? and fix no-mpi final
okBrian Aug 1, 2024
af2f7d1
Merge remote-tracking branch 'origin' into exampleCI2
okBrian Aug 1, 2024
bf821bf
add generate on workflow to fix no-mpi'
okBrian Aug 1, 2024
a9361a0
Merge remote-tracking branch 'origin' into exampleCI2
okBrian Aug 2, 2024
1bdb66f
fix lfs issue and revert some changes + merge w/ master
okBrian Aug 10, 2024
7446ce4
temp fix merge conflict
okBrian Aug 10, 2024
e46fe3f
remove 0dqbmm and fix lint
okBrian Aug 10, 2024
722f772
revert changes and some formatting
okBrian Aug 13, 2024
2b25651
Merge remote-tracking branch 'origin' into exampleCI2
okBrian Aug 13, 2024
9ca124f
fix 2d artifical MA bug
okBrian Aug 13, 2024
0c99ff5
fix all broken case files
okBrian Aug 13, 2024
6296758
rerevert the D directory temp
okBrian Aug 13, 2024
b14ba57
Merge remote-tracking branch 'upstream/master' into exampleCI2
okBrian Aug 19, 2024
d3b2db3
test compiled w/ gcc 12
okBrian Aug 19, 2024
f351c7c
decreased tolerence
okBrian Aug 20, 2024
5b8fcea
increase tol & fix lint?
okBrian Aug 20, 2024
0252536
Merge remote-tracking branch 'upstream/master' into exampleCI2
okBrian Aug 21, 2024
f23c748
test fix for gt phoneix?
okBrian Aug 21, 2024
06fca35
Merge remote-tracking branch 'upstream/master' into exampleCI2
okBrian Aug 22, 2024
92415b9
Merge remote-tracking branch 'origin/master' into exampleCI2
okBrian Aug 23, 2024
4635550
fix docker
okBrian Aug 26, 2024
3b40332
Merge remote-tracking branch 'origin' into exampleCI2
okBrian Aug 26, 2024
61baf3d
Merge remote-tracking branch 'origin/master' into exampleCI2
okBrian Sep 12, 2024
9adac3c
regenerate examples
okBrian Sep 12, 2024
f2d33e0
add support ibm_cfl_dt
okBrian Sep 13, 2024
fcd4454
try 13.3 gcc
okBrian Sep 13, 2024
b2de66e
merge origin master
okBrian Sep 13, 2024
03b5f72
added strict floating point and regnerated examples w/ it
okBrian Sep 20, 2024
acc8228
merge w/ master
okBrian Sep 20, 2024
ddabee4
fix req.txt
okBrian Sep 20, 2024
e0c1dd3
fix frontier cas
okBrian Sep 20, 2024
98f9b3d
regenerate all files and fix frontier
okBrian Sep 25, 2024
99465ee
Merge remote-tracking branch 'origin' into exampleCI2
okBrian Sep 30, 2024
b4e958f
fixed time_step_save issue
okBrian Sep 30, 2024
fdd5162
mimi pr for exampleCI
okBrian Oct 7, 2024
e1ac8f4
test lower tol + regenerating with debug
okBrian Oct 18, 2024
f34a911
regenerate hypo_2materials?
okBrian Oct 18, 2024
7d90327
--regenerate with strict flag
okBrian Oct 18, 2024
aad1300
add strict back to workflow
okBrian Oct 18, 2024
480c76d
Merge branch 'MFlowCode:master' into exampleCI2
okBrian Oct 21, 2024
f27d0ce
inital viscous edit
okBrian Oct 21, 2024
1d47274
regen viscous
okBrian Oct 21, 2024
4c9636d
test 2525 on exampleCI2
okBrian Oct 21, 2024
04a901a
remove cases for merge
okBrian Oct 25, 2024
c4db9d6
remove strict flag & retest with default flags
okBrian Oct 28, 2024
527a859
w/ correct weno_eps for testing
okBrian Oct 28, 2024
0e4fe57
fix removal of strict in workflow
okBrian Oct 28, 2024
33ab525
close to done?
okBrian Oct 28, 2024
1c99f12
remove strict on frontier
okBrian Oct 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/frontier/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

. ./mfc.sh load -c f -m g
./mfc.sh build -j 8 --gpu
./mfc.sh build --strict -j 8 --gpu
2 changes: 1 addition & 1 deletion .github/workflows/phoenix/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "$job_device" == "gpu" ]; then
build_opts="--gpu"
fi

./mfc.sh build -j 8 $build_opts
./mfc.sh build --strict -j 8 $build_opts

n_test_threads=8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Build
run: |
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
/bin/bash mfc.sh build --strict -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}

- name: Test
run: |
Expand Down
36 changes: 32 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ option(MFC_MPI "Build with MPI" ON
option(MFC_OpenACC "Build with OpenACC" OFF)
option(MFC_GCov "Build with GCov" OFF)
option(MFC_Unified "Build with unified CPU & GPU memory (GH-200 only)" OFF)
option(MFC_Strict "Build with strict floating point operations" OFF)
option(MFC_PRE_PROCESS "Build pre_process" OFF)
option(MFC_SIMULATION "Build simulation" OFF)
option(MFC_POST_PROCESS "Build post_process" OFF)
Expand Down Expand Up @@ -136,6 +137,14 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
)
endif()

if (MFC_Strict)
add_compile_options(
-ffloat-store
-frounding-math
-fsignaling-nans
)
endif()

if (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER 10)
add_compile_options(
$<$<COMPILE_LANGUAGE:Fortran>:-fallow-invalid-boz>
Expand Down Expand Up @@ -163,6 +172,14 @@ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
)
add_link_options("SHELL: -K trap=fp" "SHELL: -G2")
endif()

if (MFC_Strict)
add_compile_options(
"SHELL:-hfp0"
"SHELL:-h vector0"
)
endif()

elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Flang")
add_compile_options(
$<$<COMPILE_LANGUAGE:Fortran>:-Mfreeform>
Expand All @@ -175,6 +192,10 @@ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-g -Og -traceback -debug)
endif()

if (MFC_Strict)
add_compile_options(-fp-model strict)
endif()
elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI"))
add_compile_options(
$<$<COMPILE_LANGUAGE:Fortran>:-Mfreeform>
Expand All @@ -186,13 +207,15 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(
$<$<COMPILE_LANGUAGE:Fortran>:-O0>
-C
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure this syntax works. you could double check by looking at the cmake output of a specific run. i think you need to add
$<$<COMPILE_LANGUAGE:Fortran>:-<flag>> on separate lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix this in my next commit. Thanks

-g
-O0
-traceback
-Minform=inform
-Mbounds
)
endif()

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-C -g -O0 -traceback -Minform=inform -Mbounds)
endif()

if (DEFINED ENV{MFC_CUDA_CC})
string(REGEX MATCHALL "[0-9]+" MFC_CUDA_CC $ENV{MFC_CUDA_CC})
message(STATUS "Found $MFC_CUDA_CC specified. GPU code will be generated for ${MFC_CUDA_CC}.")
Expand All @@ -219,6 +242,11 @@ if (CMAKE_BUILD_TYPE STREQUAL "Release")
message(STATUS "Performing IPO using -Mextract followed by -Minline")
set(NVHPC_USE_TWO_PASS_IPO TRUE)
endif()

if (MFC_Strict)
add_compile_options(-Kieee)
endif()

else()
CHECK_IPO_SUPPORTED(RESULT SUPPORTS_IPO OUTPUT IPO_ERROR)
if (SUPPORTS_IPO)
Expand Down
1 change: 1 addition & 0 deletions docs/documentation/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ MFC can be built with support for various (compile-time) features:
| **Debug** | `--debug` | `--no-debug` | Off | Requests the compiler build MFC in debug mode. |
| **GCov** | `--gcov` | `--no-gcov` | Off | Builds MFC with coverage flags on. |
| **Unified Memory** | `--unified` | `--no-unified` | Off | Builds MFC with unified CPU/GPU memory (GH-200 superchip only) |
| **Strict** | `--strict` | `--no-strict` | off | Builds MFC with strict floating point operations |

_⚠️ The `--gpu` option requires that your compiler supports OpenACC for Fortran for your target GPU architecture._

Expand Down
153 changes: 0 additions & 153 deletions examples/0D_qbmm/case.py

This file was deleted.

2 changes: 1 addition & 1 deletion examples/1D_acoustic_dipole/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 2,
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_acoustic_gauss_sigmadist/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 2,
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_acoustic_gauss_sigmatime/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 2,
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_acoustic_sine_frequency/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 2,
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_acoustic_sine_wavelength/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 2,
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
Expand Down
3 changes: 2 additions & 1 deletion examples/1D_bubblescreen/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,13 @@
# Acoustic source ==========================================
'acoustic_source' : 'T',
'num_source' : 1,
'acoustic(1)%support' : 1,
'acoustic(1)%loc(1)' : -5.E-03/x0,
'acoustic(1)%npulse' : 1,
'acoustic(1)%dir' : 1.,
'acoustic(1)%pulse' : 1,
'acoustic(1)%mag' : pa,
'acoustic(1)%length' : (1./(300000.))*cact/x0,
'acoustic(1)%wavelength' : (1./(300000.))*cact/x0
# ==========================================================
}))

Expand Down
3 changes: 2 additions & 1 deletion examples/1D_exp_bubscreen/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,13 @@
# Acoustic source ==========================================
'acoustic_source' : 'T',
'num_source' : 1,
'acoustic(1)%support' : 1,
'acoustic(1)%loc(1)' : -0.05/x0,
'acoustic(1)%npulse' : 1,
'acoustic(1)%dir' : 1.,
'acoustic(1)%pulse' : 1,
'acoustic(1)%mag' : 0.001,
'acoustic(1)%length' : (1./(30000.))*cphysical/x0,
'acoustic(1)%wavelength' : (1./(30000.))*cphysical/x0
# ==========================================================
}))

Expand Down
14 changes: 7 additions & 7 deletions examples/1D_impact/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
'model_eqns' : 2,
'alt_soundspeed' : 'F',
'num_fluids' : 1,
'mpp_lim' : 'F',
'mixture_err' : 'F',
'time_stepper' : 3,
'mpp_lim' : 'F',
'mixture_err' : 'F',
'time_stepper' : 3,
'weno_order' : 3,
'weno_eps' : 1.E-16,
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'weno_Re_flux' : 'F',
'weno_avg' : 'F',
'mapped_weno' : 'F',
'null_weights' : 'F',
'mp_weno' : 'F',
'riemann_solver' : 1,
'riemann_solver' : 1,
'wave_speeds' : 1,
'avg_state' : 2,
'bc_x%beg' : -3,
Expand All @@ -58,7 +58,7 @@
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'parallel_io' :'F',
'parallel_io' :'F',
# ==========================================================

# Patch 1 L ================================================
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_qbmm/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'parallel_io' :'F',
'parallel_io' :'T',
'fd_order' : 1,
#'schlieren_wrt' :'T',
'probe_wrt' :'T',
Expand Down
2 changes: 1 addition & 1 deletion examples/1D_shuosher_teno/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# ==========================================================================

# Formatted Database Files Structure Parameters ============================
'format' : 2,
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'rho_wrt' :'T',
Expand Down
Loading
Loading