Skip to content

Commit bb4d52c

Browse files
authored
Merge branch 'master' into convergenceExample
2 parents 103ef16 + e25dbc4 commit bb4d52c

File tree

125 files changed

+15426
-10754
lines changed

Some content is hidden

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

125 files changed

+15426
-10754
lines changed

.github/workflows/bench.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ jobs:
6262
device: gpu
6363
interface: acc
6464
build_script: "bash .github/workflows/frontier/build.sh gpu acc bench"
65+
- cluster: frontier
66+
name: Oak Ridge | Frontier (CCE)
67+
group: phoenix
68+
labels: frontier
69+
flag: f
70+
device: gpu
71+
interface: omp
72+
build_script: "bash .github/workflows/frontier/build.sh gpu omp bench"
6573
runs-on:
6674
group: ${{ matrix.group }}
6775
labels: ${{ matrix.labels }}

.github/workflows/deploy-tap.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
name: Deploy Homebrew Tap
22

33
on:
4+
# Test formula on PRs (audit only, don't deploy)
5+
pull_request:
6+
branches: [ master ]
7+
paths:
8+
- 'packaging/homebrew/mfc.rb'
9+
- 'packaging/homebrew/README.md'
10+
# Deploy to tap on push to master
411
push:
5-
branches: [ main, master, homebrew-formula ]
12+
branches: [ master, homebrew-new ]
613
paths:
714
- 'packaging/homebrew/mfc.rb'
815
- 'packaging/homebrew/README.md'
916
tags:
1017
- 'v*.*.*'
18+
# Allow manual trigger for testing
1119
workflow_dispatch:
1220

1321
permissions:
1422
contents: read
1523

1624
jobs:
1725
deploy-tap:
18-
name: Sync/bump formula in tap
26+
name: Audit and deploy formula
1927
runs-on: macos-14
2028
permissions:
2129
contents: write
@@ -41,6 +49,13 @@ jobs:
4149
echo "version=${VERSION}" >> $GITHUB_OUTPUT
4250
echo "url=${URL}" >> $GITHUB_OUTPUT
4351
echo "sha256=${SHASUM}" >> $GITHUB_OUTPUT
52+
echo "Event: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
53+
echo "Version: ${VERSION}" >> $GITHUB_STEP_SUMMARY
54+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
55+
echo "Mode: Audit only (PR)" >> $GITHUB_STEP_SUMMARY
56+
else
57+
echo "Mode: Audit and deploy" >> $GITHUB_STEP_SUMMARY
58+
fi
4459
4560
- name: Update formula (for tag events)
4661
if: github.ref_type == 'tag'
@@ -61,6 +76,7 @@ jobs:
6176
brew untap mfc/local
6277
6378
- name: Clone or bootstrap tap repository
79+
if: github.event_name != 'pull_request'
6480
env:
6581
TAP_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
6682
run: |
@@ -81,12 +97,14 @@ jobs:
8197
fi
8298
8399
- name: Copy formula and README into tap
100+
if: github.event_name != 'pull_request'
84101
run: |
85102
mkdir -p tap-repo/Formula
86103
cp packaging/homebrew/mfc.rb tap-repo/Formula/mfc.rb
87104
cp packaging/homebrew/README.md tap-repo/README.md
88105
89106
- name: Commit & push if changed
107+
if: github.event_name != 'pull_request'
90108
env:
91109
TAP_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
92110
run: |

.github/workflows/homebrew.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@ name: Homebrew Formula Test
22

33
on:
44
push:
5-
branches:
6-
- master
7-
- homebrew-formula
85
paths:
96
- 'packaging/homebrew/**'
107
- '.github/workflows/homebrew.yml'
118
pull_request:
12-
branches:
13-
- master
149
paths:
1510
- 'packaging/homebrew/**'
1611
- '.github/workflows/homebrew.yml'
@@ -251,8 +246,8 @@ jobs:
251246
cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py "$TESTDIR/"
252247
253248
echo "Running with $(sysctl -n hw.ncpu) processors..."
254-
# Use absolute path since mfc wrapper creates its own tmpdir
255-
mfc run "$TESTDIR/case.py" -j $(sysctl -n hw.ncpu)
249+
# Use absolute path and shorthand syntax (mfc auto-detects and prepends 'run')
250+
mfc "$TESTDIR/case.py" -j $(sysctl -n hw.ncpu)
256251
257252
echo "Test case completed successfully!"
258253

.github/workflows/phoenix/submit-bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sbatch <<EOT
4242
#SBATCH --account=gts-sbryngelson3 # charge account
4343
#SBATCH -N1 # Number of nodes required
4444
$sbatch_device_opts
45-
#SBATCH -t 02:00:00 # Duration of the job (Ex: 15 mins)
45+
#SBATCH -t 03:00:00 # Duration of the job (Ex: 15 mins)
4646
#SBATCH -q embers # QOS Name
4747
#SBATCH -o$job_slug.out # Combined output and error messages file
4848
#SBATCH -W # Do not exit until the submitted job terminates.

.github/workflows/test.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ jobs:
4848
- name: Clone
4949
uses: actions/checkout@v4
5050

51-
- name: Set up Python 3.13
52-
uses: actions/setup-python@v5
53-
with:
54-
python-version: '3.13'
55-
5651
- name: Setup MacOS
5752
if: matrix.os == 'macos'
5853
run: |
@@ -81,6 +76,10 @@ jobs:
8176
source /opt/intel/oneapi/setvars.sh
8277
printenv >> $GITHUB_ENV
8378
79+
- name: Set up Python 3.14
80+
uses: actions/setup-python@v5
81+
with:
82+
python-version: '3.14'
8483

8584
- name: Build
8685
run: |
@@ -111,10 +110,6 @@ jobs:
111110
- device: 'cpu'
112111
interface: 'none'
113112
lbl: 'frontier'
114-
exclude:
115-
- device: 'gpu'
116-
interface: 'omp'
117-
lbl: 'frontier'
118113
runs-on:
119114
group: phoenix
120115
labels: ${{ matrix.lbl }}

CITATION.cff

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ url: "https://github.com/MFlowCode/MFC"
99
preferred-citation:
1010
type: article
1111
title: "MFC 5.0: An exascale many-physics flow solver"
12+
journal: "arXiv preprint arXiv.2503.07953"
1213
doi: "10.48550/arXiv.2503.07953"
1314
year: 2025
1415
authors:

CMakeLists.txt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ option(MFC_SYSCHECK "Build syscheck" OFF
2929
option(MFC_DOCUMENTATION "Build documentation" OFF)
3030
option(MFC_ALL "Build everything" OFF)
3131
option(MFC_SINGLE_PRECISION "Build single precision" OFF)
32+
option(MFC_MIXED_PRECISION "Build mixed precision" OFF)
3233

3334
if (MFC_ALL)
3435
set(MFC_PRE_PROCESS ON FORCE)
@@ -43,6 +44,10 @@ else()
4344
add_compile_definitions(MFC_DOUBLE_PRECISION)
4445
endif()
4546

47+
if (MFC_MIXED_PRECISION)
48+
add_compile_definitions(MFC_MIXED_PRECISION)
49+
endif()
50+
4651

4752
# CMake Library Imports
4853

@@ -196,7 +201,7 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
196201
add_compile_options(
197202
$<$<COMPILE_LANGUAGE:Fortran>:-Mfreeform>
198203
$<$<COMPILE_LANGUAGE:Fortran>:-cpp>
199-
$<$<COMPILE_LANGUAGE:Fortran>:-Minfo=inline>
204+
$<$<COMPILE_LANGUAGE:Fortran>:-Minfo=inline>
200205
$<$<COMPILE_LANGUAGE:Fortran>:-Minfo=accel>
201206
)
202207

@@ -474,10 +479,10 @@ function(MFC_SETUP_TARGET)
474479
endif()
475480
endif()
476481

477-
if (ARGS_LAPACK)
478-
find_package(LAPACK REQUIRED)
479-
target_link_libraries(${a_target} PRIVATE LAPACK::LAPACK)
480-
endif()
482+
if (ARGS_LAPACK)
483+
find_package(LAPACK REQUIRED)
484+
target_link_libraries(${a_target} PRIVATE LAPACK::LAPACK)
485+
endif()
481486

482487
if ((MFC_OpenACC AND ARGS_OpenACC) OR (MFC_OpenMP AND ARGS_OpenMP))
483488
if ((MFC_OpenACC AND ARGS_OpenACC))
@@ -573,7 +578,13 @@ function(MFC_SETUP_TARGET)
573578
find_package(hipfort COMPONENTS hip CONFIG REQUIRED)
574579
target_link_libraries(${a_target} PRIVATE hipfort::hip hipfort::hipfort-amdgcn)
575580
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
576-
find_package(hipfort COMPONENTS hip CONFIG REQUIRED)
581+
582+
if (MFC_Unified)
583+
target_compile_options(${ARGS_TARGET}
584+
PRIVATE -DFRONTIER_UNIFIED)
585+
endif()
586+
587+
find_package(hipfort COMPONENTS hip CONFIG REQUIRED)
577588
target_link_libraries(${a_target} PRIVATE hipfort::hip hipfort::hipfort-amdgcn flang_rt.hostdevice)
578589
endif()
579590
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")

README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@
3333
<img src="https://img.shields.io/badge/discussions-join-brightgreen" />
3434
</a>
3535
<a href="https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=MFlowCode%2FMFC">
36-
<img src="https://img.shields.io/badge/Codespaces-Open%20in%201%20click-2ea44f?logo=github" />
37-
</a>
38-
<a href="https://github.com/MFlowCode/MFC/releases">
39-
<img src="https://img.shields.io/github/v/release/MFlowCode/MFC?display_name=release&sort=semver" />
36+
<img src="https://img.shields.io/badge/Codespaces-Open-2ea44f?logo=github" />
4037
</a>
38+
<a href="https://hub.docker.com/r/sbryngelson/mfc">
39+
<img src="https://img.shields.io/badge/dockerhub-images-important.svg?logo=Docker&style=flat" />
40+
</a>
41+
42+
<a href="https://github.com/MFlowCode/homebrew-mfc">
43+
<img src="https://img.shields.io/badge/homebrew-mflowcode%2Fmfc%2Fmfc-brown?logo=homebrew&style=flat" />
44+
</a>
4145
</p>
4246

4347
<p align="center">
4448
<a href="https://star-history.com/#MFlowCode/MFC&Date">
45-
<img src="https://api.star-history.com/svg?repos=MFlowCode/MFC&type=Date" alt="Star History Chart" width="600"/>
49+
<img src="https://api.star-history.com/svg?repos=MFlowCode/MFC&type=Date&theme=dark" alt="Star History Chart" width="600"/>
4650
</a>
4751
</p>
4852

@@ -59,9 +63,10 @@ MFC runs at exascale on the world's fastest supercomputers:
5963

6064
| Path | Command |
6165
| --- | --- |
62-
| **Codespaces** (fastest) | Click the "Codespaces" badge above to launch in 1 click |
63-
| **Homebrew (macOS)** | `brew install mflowcode/mfc/mfc && mfc run $(brew --prefix mfc)/examples/1D_sodshocktube/case.py -n 2` |
64-
| **Local build** | `./mfc.sh build -j $(nproc) && ./mfc.sh test -j $(nproc)` |
66+
| **Codespaces** (fastest) 💨 | Click the "Codespaces" badge above to launch in 1 click |
67+
| **Docker** 🐳 | `docker run -it --rm --entrypoint bash sbryngelson/mfc:latest-cpu` |
68+
| **Homebrew** (macOS) 🍺 | `brew install mflowcode/mfc/mfc && mfc $(brew --prefix mfc)/examples/1D_sodshocktube/case.py -n 2` |
69+
| **Local build** 💻 | `./mfc.sh build -j $(nproc) && ./mfc.sh test -j $(nproc)` |
6570

6671
**Welcome!**
6772
MFC simulates compressible multi-phase flows, [among other things](#what-else-can-this-thing-do).
@@ -127,26 +132,43 @@ And here is a high-amplitude acoustic wave reflecting and emerging through a cir
127132

128133
## Getting started
129134

135+
You can navigate [to this webpage](https://mflowcode.github.io/documentation/md_getting-started.html) to get you get started using MFC on your local machine, cluster, or supercomputer!
136+
It's rather straightforward.
137+
Some examples are below.
138+
139+
### Codespaces and Containers
140+
141+
<a href="https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=MFlowCode%2FMFC">
142+
<img src="https://img.shields.io/badge/Codespaces-Open%20in%201%20click-2ea44f?logo=github" />
143+
</a>
144+
130145
For a _very_ quick start, open a GitHub Codespace to load a pre-configured Docker container and familiarize yourself with MFC commands.
131146
Click <kbd> <> Code</kbd> (green button at top right) → <kbd>Codespaces</kbd> (right tab) → <kbd>+</kbd> (create a codespace).
132147

148+
Alternatively, run MFC directly with Docker on your local machine:
149+
```bash
150+
docker run -it --rm --entrypoint bash sbryngelson/mfc:latest-cpu
151+
```
152+
Once inside the container, navigate to `/opt/MFC` to access MFC and run examples.
153+
133154
> ****Note:**** Codespaces is a free service with a monthly quota of compute time and storage usage.
134155
> It is recommended for testing commands, troubleshooting, and running simple case files without installing dependencies or building MFC on your device.
135156
> Don't conduct any critical work here!
136157
> To learn more, please see [how Docker & Containers work](https://mflowcode.github.io/documentation/md_docker.html).
137158
138-
You can navigate [to this webpage](https://mflowcode.github.io/documentation/md_getting-started.html) to get you get started using MFC on your local machine, cluster, or supercomputer!
139-
It's rather straightforward.
140-
141159
### macOS quick start (Homebrew)
142160

161+
<a href="https://github.com/MFlowCode/homebrew-mfc">
162+
<img src="https://img.shields.io/badge/homebrew-mflowcode%2Fmfc%2Fmfc-brown?logo=homebrew&style=flat" />
163+
</a>
164+
143165
Install the prebuilt package and run an example:
144166

145167
```bash
146168
brew install mflowcode/mfc/mfc
147169
mkdir -p ~/mfc_quickstart && cd ~/mfc_quickstart
148170
cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py .
149-
mfc run case.py -n 2
171+
mfc case.py -n 2
150172
```
151173

152174
Use `-n X` to select the number of MPI processes. For developer commands (`build`, `test`, etc.), clone the repo and use `./mfc.sh`.

docs/documentation/case.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon
745745
| `mu_v`| Real | Viscosity |
746746
| `k_v`| Real | Thermal conductivity |
747747
| `cp_v`| Real | Specific heat capacity |
748+
| `D_v`| Real | Vapor diffusivity in the gas |
748749

749750
These options work only for gas-liquid two-component flows.
750751
Component indexes are required to be 1 for liquid and 2 for gas.
@@ -836,7 +837,6 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
836837
| `T0` | Real | Reference temperature |
837838
| `x0` | Real | Reference length |
838839
| `Thost` | Real | Temperature of the surrounding liquid (host) |
839-
| `diffcoefvap` | Real | Vapor diffusivity in the gas |
840840

841841
- `nBubs_glb` Total number of bubbles. Their initial conditions need to be specified in the ./input/lag_bubbles.dat file. See the example cases for additional information.
842842

docs/documentation/getting-started.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ Run a quick example:
2323
mkdir -p ~/mfc_quickstart && cd ~/mfc_quickstart
2424
cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py .
2525
# Use -n X to choose the number of MPI processes
26-
mfc run case.py -n 2
26+
mfc case.py -n 2
2727
```
2828

2929
Notes:
30-
- The Homebrew wrapper supports only `mfc run ...`. Developer commands like `build`, `test`, `clean` are available when you clone the repo and use `./mfc.sh`.
30+
- The Homebrew package uses a simplified syntax: just `mfc <case.py>` to run cases.
31+
- Developer commands like `build`, `test`, `clean` are available when you clone the repo and use `./mfc.sh`.
3132
- The package bundles a Python venv and prebuilt binaries; no additional setup is required.
3233
- Examples are installed at `$(brew --prefix mfc)/examples/`.
3334

0 commit comments

Comments
 (0)