Skip to content

Commit 7a7f4cb

Browse files
authored
Merge branch 'master' into HDF5-build
2 parents 11dabb1 + ba8a820 commit 7a7f4cb

File tree

135 files changed

+17415
-11797
lines changed

Some content is hidden

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

135 files changed

+17415
-11797
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: 0 additions & 5 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'

.github/workflows/lint-toolchain.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
- uses: actions/checkout@v4
1212

1313
- name: MFC Python setup
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.14'
17+
18+
- name: Initialize MFC
1419
run: ./mfc.sh init
1520

1621
- name: Lint the toolchain

.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 }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ __pycache__
1919

2020
*.egg-info
2121

22+
# Auto-generated version file
23+
toolchain/mfc/_version.py
24+
2225
.DS_Store
2326

2427
/tests/*/**

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

@@ -192,7 +197,7 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
192197
add_compile_options(
193198
$<$<COMPILE_LANGUAGE:Fortran>:-Mfreeform>
194199
$<$<COMPILE_LANGUAGE:Fortran>:-cpp>
195-
$<$<COMPILE_LANGUAGE:Fortran>:-Minfo=inline>
200+
$<$<COMPILE_LANGUAGE:Fortran>:-Minfo=inline>
196201
$<$<COMPILE_LANGUAGE:Fortran>:-Minfo=accel>
197202
)
198203

@@ -470,10 +475,10 @@ function(MFC_SETUP_TARGET)
470475
endif()
471476
endif()
472477

473-
if (ARGS_LAPACK)
474-
find_package(LAPACK REQUIRED)
475-
target_link_libraries(${a_target} PRIVATE LAPACK::LAPACK)
476-
endif()
478+
if (ARGS_LAPACK)
479+
find_package(LAPACK REQUIRED)
480+
target_link_libraries(${a_target} PRIVATE LAPACK::LAPACK)
481+
endif()
477482

478483
if ((MFC_OpenACC AND ARGS_OpenACC) OR (MFC_OpenMP AND ARGS_OpenMP))
479484
if ((MFC_OpenACC AND ARGS_OpenACC))
@@ -569,7 +574,13 @@ function(MFC_SETUP_TARGET)
569574
find_package(hipfort COMPONENTS hip CONFIG REQUIRED)
570575
target_link_libraries(${a_target} PRIVATE hipfort::hip hipfort::hipfort-amdgcn)
571576
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
572-
find_package(hipfort COMPONENTS hip CONFIG REQUIRED)
577+
578+
if (MFC_Unified)
579+
target_compile_options(${ARGS_TARGET}
580+
PRIVATE -DFRONTIER_UNIFIED)
581+
endif()
582+
583+
find_package(hipfort COMPONENTS hip CONFIG REQUIRED)
573584
target_link_libraries(${a_target} PRIVATE hipfort::hip hipfort::hipfort-amdgcn flang_rt.hostdevice)
574585
endif()
575586
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@
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" />
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+
4142
<a href="https://github.com/MFlowCode/homebrew-mfc">
4243
<img src="https://img.shields.io/badge/homebrew-mflowcode%2Fmfc%2Fmfc-brown?logo=homebrew&style=flat" />
4344
</a>
@@ -63,6 +64,7 @@ MFC runs at exascale on the world's fastest supercomputers:
6364
| Path | Command |
6465
| --- | --- |
6566
| **Codespaces** (fastest) 💨 | Click the "Codespaces" badge above to launch in 1 click |
67+
| **Docker** 🐳 | `docker run -it --rm --entrypoint bash sbryngelson/mfc:latest-cpu` |
6668
| **Homebrew** (macOS) 🍺 | `brew install mflowcode/mfc/mfc && mfc $(brew --prefix mfc)/examples/1D_sodshocktube/case.py -n 2` |
6769
| **Local build** 💻 | `./mfc.sh build -j $(nproc) && ./mfc.sh test -j $(nproc)` |
6870

@@ -143,6 +145,12 @@ Some examples are below.
143145
For a _very_ quick start, open a GitHub Codespace to load a pre-configured Docker container and familiarize yourself with MFC commands.
144146
Click <kbd> <> Code</kbd> (green button at top right) → <kbd>Codespaces</kbd> (right tab) → <kbd>+</kbd> (create a codespace).
145147

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+
146154
> ****Note:**** Codespaces is a free service with a monthly quota of compute time and storage usage.
147155
> It is recommended for testing commands, troubleshooting, and running simple case files without installing dependencies or building MFC on your device.
148156
> Don't conduct any critical work here!

0 commit comments

Comments
 (0)