Skip to content

Commit 418efe8

Browse files
Merge branch 'master' into debug-airfoil-sign-error
2 parents 6838efd + 7081882 commit 418efe8

200 files changed

Lines changed: 9557 additions & 7846 deletions

File tree

Some content is hidden

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

.github/Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@ ARG FC_COMPILER
88
ARG COMPILER_PATH
99
ARG COMPILER_LD_LIBRARY_PATH
1010

11+
ENV DEBIAN_FRONTEND=noninteractive
12+
ENV TZ=UTC
13+
1114
RUN apt-get update -y && \
12-
apt-get install -y software-properties-common ca-certificates gnupg && \
15+
apt-get install -y software-properties-common ca-certificates gnupg wget && \
1316
add-apt-repository ppa:deadsnakes/ppa && \
1417
apt-get update -y && \
15-
if [ "$TARGET" != "gpu" ]; then \
18+
if [ "$TARGET" = "cpu" ]; then \
1619
apt-get install -y \
1720
build-essential git make cmake gcc g++ gfortran bc \
1821
python3.12 python3.12-venv python3-pip \
1922
openmpi-bin libopenmpi-dev libfftw3-dev \
2023
mpich libmpich-dev; \
21-
else \
24+
elif [ "$TARGET" = "gpu" ]; then \
2225
apt-get install -y \
2326
build-essential git make cmake bc \
2427
python3.12 python3.12-venv python3-pip \
@@ -30,15 +33,16 @@ RUN apt-get update -y && \
3033

3134
ENV OMPI_ALLOW_RUN_AS_ROOT=1
3235
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
36+
ENV HYDRA_LAUNCHER=fork
3337
ENV PATH="/opt/MFC:$PATH"
3438

3539
COPY ../ /opt/MFC
3640

3741
ENV CC=${CC_COMPILER}
3842
ENV CXX=${CXX_COMPILER}
3943
ENV FC=${FC_COMPILER}
40-
ENV PATH="${COMPILER_PATH}:$PATH"
41-
ENV LD_LIBRARY_PATH="${COMPILER_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH:-}"
44+
ENV PATH="${COMPILER_PATH}:/opt/mpich/bin:$PATH"
45+
ENV LD_LIBRARY_PATH="${COMPILER_LD_LIBRARY_PATH}:/opt/mpich/lib:${LD_LIBRARY_PATH:-}"
4246

4347
# Pre-install numpy into the venv before mfc.sh runs, as it's required at
4448
# build time by several dependencies (pandas, cantera, matplotlib, etc.) that
@@ -50,14 +54,14 @@ RUN python3.12 -m venv /opt/MFC/build/venv && \
5054
RUN echo "TARGET=$TARGET CC=$CC_COMPILER FC=$FC_COMPILER" && \
5155
cd /opt/MFC && \
5256
if [ "$TARGET" = "gpu" ]; then \
53-
./mfc.sh build --gpu -j $(nproc); \
57+
./mfc.sh build --gpu acc -j $(nproc); \
5458
else \
5559
./mfc.sh build -j $(nproc); \
5660
fi
5761

5862
RUN cd /opt/MFC && \
5963
if [ "$TARGET" = "gpu" ]; then \
60-
./mfc.sh test -a --dry-run --gpu -j $(nproc); \
64+
./mfc.sh test -a --dry-run --gpu acc -j $(nproc); \
6165
else \
6266
./mfc.sh test -a --dry-run -j $(nproc); \
6367
fi

.github/file-filter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ yml: &yml
3030
- '.github/workflows/bench.yml'
3131
- '.github/workflows/test.yml'
3232
- '.github/workflows/formatting.yml'
33+
- '.github/workflows/fp-stability.yml'
34+
- '.github/workflows/convergence.yml'
3335

3436
checkall: &checkall
3537
- *fortran_src

.github/scripts/prebuild-case-optimization.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
# Pre-builds all benchmark cases with --case-optimization.
4-
# No GPU hardware needed — compilation only.
3+
# Pre-builds all benchmark cases with --case-optimization using --dry-run so
4+
# binaries are cached before the GPU run job. No simulation is executed.
55
# Can run in two modes:
66
# 1. Direct (Frontier login nodes): pass cluster/device/interface as args
7-
# 2. Inside SLURM (Phoenix): uses $job_device/$job_interface from submit-slurm-job.sh
7+
# 2. Inside SLURM (Phoenix/frontier_amd): uses $job_device/$job_interface
88
# Usage: bash prebuild-case-optimization.sh [<cluster> <device> <interface>]
99

1010
set -e
@@ -22,14 +22,18 @@ case "$cluster" in
2222
*) echo "ERROR: Unknown cluster '$cluster'"; exit 1 ;;
2323
esac
2424

25-
source .github/scripts/clean-build.sh
26-
clean_build
25+
# Phoenix starts fresh (no prior dep build); other clusters pre-build deps via
26+
# build.sh first, so we must preserve them and only clean MFC target staging.
27+
if [ "$cluster" = "phoenix" ]; then
28+
source .github/scripts/clean-build.sh
29+
clean_build
30+
else
31+
find build/staging -maxdepth 1 -regex '.*/[0-9a-f]+' -type d -exec rm -rf {} + 2>/dev/null || true
32+
find build/install -maxdepth 1 -regex '.*/[0-9a-f]+' -type d -exec rm -rf {} + 2>/dev/null || true
33+
fi
2734

2835
. ./mfc.sh load -c "$flag" -m g
2936

30-
# Set GPU build flags from interface — this is always a GPU build.
31-
# Don't use gpu-opts.sh since $job_device may be "cpu" when submitted
32-
# to a CPU SLURM partition (no GPU hardware needed for compilation).
3337
case "$job_interface" in
3438
acc) gpu_opts="--gpu acc" ;;
3539
omp) gpu_opts="--gpu mp" ;;
@@ -38,5 +42,5 @@ esac
3842

3943
for case in benchmarks/*/case.py; do
4044
echo "=== Pre-building: $case ==="
41-
./mfc.sh build -i "$case" --case-optimization $gpu_opts -j 8
45+
./mfc.sh run "$case" --case-optimization $gpu_opts -j 8 --dry-run
4246
done

.github/scripts/run_case_optimization.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ benchmarks=(
2323

2424
# For Frontier/Frontier AMD: deps were fetched on the login node via --deps-only;
2525
# build case-optimized binaries here on the compute node before running.
26-
# For Phoenix: prebuild-case-optimization.sh already built everything in a prior SLURM job.
26+
# For Phoenix and frontier_amd: prebuild-case-optimization.sh already built
27+
# everything in a prior SLURM job (via --dry-run), so skip the build here.
2728
#
2829
# Clean stale MFC target staging before building. On self-hosted CI runners,
2930
# corrupted intermediate files from a prior failed build (e.g. CCE optcg crash)
3031
# can persist and poison subsequent builds. Each case-opt config gets its own
3132
# hash-named staging dir, but install dirs and other artifacts may be stale.
32-
if [ "$job_cluster" != "phoenix" ]; then
33+
if [ "$job_cluster" != "phoenix" ] && [ "$job_cluster" != "frontier_amd" ]; then
3334
# Clean stale MFC target dirs (hash-named) from prior builds, but
3435
# preserve dependency dirs (hipfort, fftw, etc.) since the compute
3536
# node has no internet to re-fetch them.

.github/scripts/submit-slurm-job.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ case "$cluster" in
5151
compiler_flag="f"
5252
account="CFD154"
5353
job_prefix="MFC"
54-
qos="develop"
54+
qos="hackathon"
5555
extra_sbatch=""
5656
test_time="01:59:00"
5757
bench_time="01:59:00"
@@ -61,7 +61,7 @@ case "$cluster" in
6161
compiler_flag="famd"
6262
account="CFD154"
6363
job_prefix="MFC"
64-
qos="develop"
64+
qos="hackathon"
6565
extra_sbatch=""
6666
test_time="01:59:00"
6767
bench_time="01:59:00"
@@ -92,7 +92,7 @@ if [ "$device" = "cpu" ]; then
9292
frontier|frontier_amd)
9393
sbatch_device_opts="\
9494
#SBATCH -n 32
95-
#SBATCH -p service"
95+
#SBATCH -p batch"
9696
;;
9797
esac
9898
elif [ "$device" = "gpu" ]; then
@@ -120,7 +120,7 @@ elif [ "$device" = "gpu" ]; then
120120
frontier|frontier_amd)
121121
sbatch_device_opts="\
122122
#SBATCH -n 8
123-
#SBATCH -p service"
123+
#SBATCH -p batch"
124124
;;
125125
esac
126126
else

.github/workflows/convergence.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Convergence
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
workflow_dispatch:
9+
10+
env:
11+
OMPI_MCA_rmaps_base_oversubscribe: 1
12+
13+
jobs:
14+
file-changes:
15+
name: Detect File Changes
16+
runs-on: ubuntu-latest
17+
outputs:
18+
checkall: ${{ steps.changes.outputs.checkall }}
19+
steps:
20+
- name: Clone
21+
uses: actions/checkout@v4
22+
23+
- name: Detect Changes
24+
uses: dorny/paths-filter@v3
25+
id: changes
26+
with:
27+
filters: ".github/file-filter.yml"
28+
29+
convergence:
30+
name: "Convergence"
31+
runs-on: ubuntu-latest
32+
needs: [file-changes]
33+
if: >-
34+
!cancelled() &&
35+
needs.file-changes.result == 'success' &&
36+
(needs.file-changes.outputs.checkall == 'true' || github.event_name == 'workflow_dispatch')
37+
timeout-minutes: 240
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Setup Ubuntu
43+
run: |
44+
sudo apt update -y
45+
sudo apt install -y cmake gcc g++ python3 python3-dev \
46+
openmpi-bin libopenmpi-dev
47+
48+
- name: Setup Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.12"
52+
53+
- name: Build MFC
54+
run: ./mfc.sh build -j 4
55+
56+
- name: Run convergence tests
57+
run: ./mfc.sh test --only Convergence --no-build -j 1

.github/workflows/deploy-tap.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
permissions:
2929
contents: write
3030
pull-requests: write
31+
environment:
32+
name: homebrew
33+
url: https://github.com/MFlowCode/homebrew-mfc
3134
steps:
3235
- name: Checkout MFC repository
3336
uses: actions/checkout@v4

0 commit comments

Comments
 (0)