Skip to content

Commit 09dc88d

Browse files
authored
Merge branch 'master' into containerization
2 parents 3297583 + 9fbc566 commit 09dc88d

File tree

158 files changed

+9421
-1514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+9421
-1514
lines changed

.github/workflows/bench.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ jobs:
2424

2525
self:
2626
name: "${{ matrix.name }} (${{ matrix.device }})"
27-
if: ${{ github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' && (
28-
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
29-
(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'sbryngelson')
30-
) }}
27+
if: ${{ github.repository=='MFlowCode/MFC' && needs.file-changes.outputs.checkall=='true' && ((github.event_name=='pull_request_review' && github.event.review.state=='approved') || (github.event_name=='pull_request' && (github.event.pull_request.user.login=='sbryngelson' || github.event.pull_request.user.login=='wilfonba'))) }}
3128
needs: file-changes
3229
strategy:
3330
fail-fast: false

.github/workflows/cleanliness.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ jobs:
4141
- name: Setup Ubuntu
4242
run: |
4343
sudo apt update -y
44-
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
45-
44+
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev libblas-dev liblapack-dev
45+
4646
- name: Build
4747
run: |
4848
(cd pr && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../pr.txt)

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Setup Ubuntu
3131
run: |
3232
sudo apt update -y
33-
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
33+
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev libblas-dev liblapack-dev
3434
3535
- name: Build
3636
run: /bin/bash mfc.sh build -j $(nproc) --gcov

.github/workflows/frontier/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ if [ "$2" == "bench" ]; then
1313
./mfc.sh run "$dir/case.py" --case-optimization -j 8 --dry-run $build_opts
1414
done
1515
else
16-
./mfc.sh test --dry-run -j 8 $build_opts
16+
./mfc.sh test -a --dry-run --rdma-mpi --generate -j 8 $build_opts
1717
fi
18+

.github/workflows/frontier/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gpus=`rocm-smi --showid | awk '{print $1}' | grep -Eo '[0-9]+' | uniq | tr '\n'
44
ngpus=`echo "$gpus" | tr -d '[:space:]' | wc -c`
55

66
if [ "$job_device" = "gpu" ]; then
7-
./mfc.sh test --max-attempts 3 -j $ngpus -- -c frontier
7+
./mfc.sh test -a --rdma-mpi --max-attempts 3 -j $ngpus -- -c frontier
88
else
9-
./mfc.sh test --max-attempts 3 -j 32 -- -c frontier
9+
./mfc.sh test -a --rdma-mpi --max-attempts 3 -j 32 -- -c frontier
1010
fi

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: |
5454
brew update
5555
brew upgrade
56-
brew install coreutils python cmake fftw hdf5 gcc@15 boost open-mpi
56+
brew install coreutils python cmake fftw hdf5 gcc@15 boost open-mpi lapack
5757
echo "FC=gfortran-15" >> $GITHUB_ENV
5858
echo "BOOST_INCLUDE=/opt/homebrew/include/" >> $GITHUB_ENV
5959
@@ -62,7 +62,8 @@ jobs:
6262
run: |
6363
sudo apt update -y
6464
sudo apt install -y cmake gcc g++ python3 python3-dev hdf5-tools \
65-
libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev
65+
libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev \
66+
libblas-dev liblapack-dev
6667
6768
- name: Setup Ubuntu (Intel)
6869
if: matrix.os == 'ubuntu' && matrix.intel == true

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Gam = "Gam"
1818
strang = "strang"
1919
Strang = "Strang"
2020
TKE = "TKE"
21+
HSA = "HSA"
2122

2223
[files]
2324
extend-exclude = ["docs/documentation/references*", "tests/", "toolchain/cce_simulation_workgroup_256.sh"]

CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,10 @@ HANDLE_SOURCES(syscheck OFF)
391391
# * FFTW (optional) Should be linked with an FFTW-like library (fftw/cufftw),
392392
# depending on whether OpenACC is enabled and which compiler is
393393
# being used.
394+
# * LAPACK (optional) Should be linked with LAPACK
394395

395396
function(MFC_SETUP_TARGET)
396-
cmake_parse_arguments(ARGS "OpenACC;MPI;SILO;HDF5;FFTW" "TARGET" "SOURCES" ${ARGN})
397+
cmake_parse_arguments(ARGS "OpenACC;MPI;SILO;HDF5;FFTW;LAPACK" "TARGET" "SOURCES" ${ARGN})
397398

398399
add_executable(${ARGS_TARGET} ${ARGS_SOURCES})
399400
set(IPO_TARGETS ${ARGS_TARGET})
@@ -461,6 +462,11 @@ function(MFC_SETUP_TARGET)
461462
endif()
462463
endif()
463464

465+
if (ARGS_LAPACK)
466+
find_package(LAPACK REQUIRED)
467+
target_link_libraries(${a_target} PRIVATE LAPACK::LAPACK)
468+
endif()
469+
464470
if (MFC_OpenACC AND ARGS_OpenACC)
465471
find_package(OpenACC)
466472

@@ -506,6 +512,12 @@ function(MFC_SETUP_TARGET)
506512
)
507513
endif()
508514
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
515+
# Frontier Unified Memory Support
516+
if (MFC_Unified)
517+
target_compile_options(${ARGS_TARGET}
518+
PRIVATE -DFRONTIER_UNIFIED)
519+
endif()
520+
509521
find_package(hipfort COMPONENTS hip CONFIG REQUIRED)
510522
target_link_libraries(${a_target} PRIVATE hipfort::hip hipfort::hipfort-amdgcn)
511523
endif()
@@ -541,7 +553,7 @@ endif()
541553
if (MFC_POST_PROCESS)
542554
MFC_SETUP_TARGET(TARGET post_process
543555
SOURCES "${post_process_SRCs}"
544-
MPI SILO HDF5 FFTW)
556+
MPI SILO HDF5 FFTW LAPACK)
545557

546558
# -O0 is in response to https://github.com/MFlowCode/MFC-develop/issues/95
547559
target_compile_options(post_process PRIVATE -O0)

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ It's rather straightforward.
9090
We'll give a brief intro. here for MacOS.
9191
Using [brew](https://brew.sh), install MFC's dependencies:
9292
```shell
93-
brew install coreutils python cmake fftw hdf5 gcc boost open-mpi
93+
brew install coreutils python cmake fftw hdf5 gcc boost open-mpi lapack
9494
```
9595
You're now ready to build and test MFC!
9696
Put it to a convenient directory via
@@ -165,7 +165,9 @@ They are organized below.
165165

166166
* Shock and interface capturing schemes
167167
* First-order upwinding
168-
* WENO reconstructions of order 3, 5, and 7
168+
* MUSCL (order 2)
169+
* Slope limiters: minmod, monotonized central, Van Albada, Van Leer, superbee
170+
* WENO reconstructions (orders 3, 5, and 7)
169171
* WENO variants: WENO-JS, WENO-M, WENO-Z, TENO
170172
* Monotonicity-preserving reconstructions
171173
* Reliable handling of large density ratios
@@ -187,7 +189,7 @@ They are organized below.
187189
* Ideal weak scaling to 100% of the largest GPU and superchip supercomputers
188190
* \>36K AMD APUs (MI300A) on [LLNL El Capitan](https://hpc.llnl.gov/hardware/compute-platforms/el-capitan)
189191
* \>3K AMD APUs (MI300A) on [LLNL Tuolumne](https://hpc.llnl.gov/hardware/compute-platforms/tuolumne)
190-
* \>33K AMD GPUs (MI250X) on the first exascale computer, [OLCF Frontier](https://www.olcf.ornl.gov/frontier/)
192+
* \>33K AMD GPUs (MI250X) on [OLCF Frontier](https://www.olcf.ornl.gov/frontier/)
191193
* \>10K NVIDIA GPUs (V100) on [OLCF Summit](https://www.olcf.ornl.gov/summit/)
192194
* Near compute roofline behavior
193195
* RDMA (remote data memory access; GPU-GPU direct communication) via GPU-aware MPI on NVIDIA (CUDA-aware MPI) and AMD GPU systems
@@ -197,7 +199,7 @@ They are organized below.
197199

198200
* [Fypp](https://fypp.readthedocs.io/en/stable/fypp.html) metaprogramming for code readability, performance, and portability
199201
* Continuous Integration (CI)
200-
* \>300 Regression tests with each PR.
202+
* > 500 Regression tests with each PR.
201203
* Performed with GNU (GCC), Intel (oneAPI), Cray (CCE), and NVIDIA (NVHPC) compilers on NVIDIA and AMD GPUs.
202204
* Line-level test coverage reports via [Codecov](https://app.codecov.io/gh/MFlowCode/MFC) and `gcov`
203205
* Benchmarking to avoid performance regressions and identify speed-ups

docs/documentation/case.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
379379
| `mixture_err` | Logical | Mixture properties correction |
380380
| `time_stepper` | Integer | Runge--Kutta order [1-3] |
381381
| `adap_dt` | Logical | Strang splitting scheme with adaptive time stepping |
382+
| `recon_type` | Integer | Reconstruction Type: [1] WENO; [2] MUSCL |
382383
| `adap_dt_tol` | Real | Tolerance for adaptive time stepping in Strang splitting scheme|
383384
| `adap_dt_max_iters` | Integer | Max iteration for adaptive time stepping in Strang splitting scheme |
384385
| `weno_order` | Integer | WENO order [1,3,5] |
@@ -390,6 +391,11 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
390391
| `teno_CT` | Real | TENO threshold for smoothness detection |
391392
| `null_weights` | Logical | Null WENO weights at boundaries |
392393
| `mp_weno` | Logical | Monotonicity preserving WENO |
394+
| `muscl_order` | Integer | MUSCL order [1,2] |
395+
| `muscl_lim` | Integer | MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE |
396+
| `int_comp` | Logical | THINC Interface Compression |
397+
| `ic_eps` | Real | Interface compression threshold (default: 1e-4) |
398+
| `ic_beta` | Real | Interface compression sharpness parameter (default: 1.6) |
393399
| `riemann_solver` | Integer | Riemann solver algorithm: [1] HLL*; [2] HLLC; [3] Exact*; [4] HLLD (only for MHD) |
394400
| `low_Mach` | Integer | Low Mach number correction for HLLC Riemann solver: [0] None; [1] Pressure (Chen et al. 2022); [2] Velocity (Thornber et al. 2008) |
395401
| `avg_state` | Integer | Averaged state evaluation method: [1] Roe average*; [2] Arithmetic mean |
@@ -476,7 +482,14 @@ It is recommended to set `weno_eps` to $10^{-6}$ for WENO-JS, and to $10^{-40}$
476482

477483
- `mp_weno` activates monotonicity preservation in the WENO reconstruction (MPWENO) such that the values of reconstructed variables do not reside outside the range spanned by WENO stencil ([Balsara and Shu, 2000](references.md); [Suresh and Huynh, 1997](references.md)).
478484

479-
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 3.
485+
- `muscl_order` specifies the order of the MUSCL scheme that is used for spatial reconstruction of variables by an integer of 1, or 2, that corresponds to the 1st, and 2nd order respectively. When using `muscl_order = 2`, `muscl_lim` must be defined.
486+
487+
- `muscl_lim` specifies the slope limiter that is used in 2nd order MUSCL Reconstruction by an integer from 1 through 5.
488+
`muscl_lim = 1`, `2`, `3`, `4`, and `5` correspond to minmod, monotonized central, Van Albada, Van Leer, and SUPERBEE, respectively.
489+
490+
- `int_comp` activates interface compression using THINC used in MUSCL Reconstruction, with control parameters (`ic_eps`, and `ic_beta`).
491+
492+
- `riemann_solver` specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 4.
480493
`riemann_solver = 1`, `2`, and `3` correspond to HLL, HLLC, and Exact Riemann solver, respectively ([Toro, 2013](references.md)).
481494
`riemann_solver = 4` is only for MHD simulations. It resolves 5 of the full seven-wave structure of the MHD equations ([Miyoshi and Kusano, 2005](references.md)).
482495

@@ -576,6 +589,7 @@ To restart the simulation from $k$-th time step, see [Restarting Cases](running.
576589
| `omega_wrt(i)` | Logical | Add the $i$-direction vorticity to the database |
577590
| `schlieren_wrt` | Logical | Add the numerical schlieren to the database|
578591
| `qm_wrt` | Logical | Add the Q-criterion to the database|
592+
| `liutex_wrt` | Logical | Add the Liutex to the database|
579593
| `tau_wrt` | Logical | Add the elastic stress components to the database|
580594
| `fd_order` | Integer | Order of finite differences for computing the vorticity and the numerical Schlieren function [1,2,4] |
581595
| `schlieren_alpha(i)` | Real | Intensity of the numerical Schlieren computed via `alpha(i)` |
@@ -615,7 +629,7 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu
615629
- `output_partial_domain` activates the output of part of the domain specified by `[x,y,z]_output%beg` and `[x,y,z]_output%end`.
616630
This is useful for large domains where only a portion of the domain is of interest.
617631
It is not supported when `precision = 1` and `format = 1`.
618-
It also cannot be enabled with `flux_wrt`, `heat_ratio_wrt`, `pres_inf_wrt`, `c_wrt`, `omega_wrt`, `ib`, `schlieren_wrt`, or `qm_wrt`.
632+
It also cannot be enabled with `flux_wrt`, `heat_ratio_wrt`, `pres_inf_wrt`, `c_wrt`, `omega_wrt`, `ib`, `schlieren_wrt`, `qm_wrt`, or 'liutex_wrt'.
619633

620634
### 8. Acoustic Source {#acoustic-source}
621635

0 commit comments

Comments
 (0)