Skip to content

Commit 8fc61d9

Browse files
Merge branch 'master' into local-aware-ibm
2 parents 9879df3 + 5227abf commit 8fc61d9

204 files changed

Lines changed: 10508 additions & 6069 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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ 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 && \
1215
apt-get install -y software-properties-common ca-certificates gnupg && \
1316
add-apt-repository ppa:deadsnakes/ppa && \
@@ -50,14 +53,14 @@ RUN python3.12 -m venv /opt/MFC/build/venv && \
5053
RUN echo "TARGET=$TARGET CC=$CC_COMPILER FC=$FC_COMPILER" && \
5154
cd /opt/MFC && \
5255
if [ "$TARGET" = "gpu" ]; then \
53-
./mfc.sh build --gpu -j $(nproc); \
56+
./mfc.sh build --gpu acc -j $(nproc); \
5457
else \
5558
./mfc.sh build -j $(nproc); \
5659
fi
5760

5861
RUN cd /opt/MFC && \
5962
if [ "$TARGET" = "gpu" ]; then \
60-
./mfc.sh test -a --dry-run --gpu -j $(nproc); \
63+
./mfc.sh test -a --dry-run --gpu acc -j $(nproc); \
6164
else \
6265
./mfc.sh test -a --dry-run -j $(nproc); \
6366
fi

.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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Convergence
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
env:
10+
OMPI_MCA_rmaps_base_oversubscribe: 1
11+
12+
jobs:
13+
convergence:
14+
name: "Convergence"
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 240
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup Ubuntu
22+
run: |
23+
sudo apt update -y
24+
sudo apt install -y cmake gcc g++ python3 python3-dev \
25+
openmpi-bin libopenmpi-dev
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.12"
31+
32+
- name: Build MFC
33+
run: ./mfc.sh build -j 4
34+
35+
- name: Run convergence tests
36+
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

.github/workflows/docker.yml

Lines changed: 78 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ name: Containerization
33
on:
44
release:
55
types: [published]
6+
schedule:
7+
- cron: '0 0 * * 0'
68
workflow_dispatch:
79
inputs:
810
tag:
911
description: 'tag to containerize'
10-
required: true
12+
required: false
13+
14+
permissions:
15+
contents: read
16+
packages: write
1117

1218
concurrency:
1319
group: Containerization
@@ -18,9 +24,10 @@ jobs:
1824
strategy:
1925
matrix:
2026
config:
21-
- { name: 'cpu', runner: 'ubuntu-22.04', base_image: 'ubuntu:22.04' }
22-
- { name: 'gpu', runner: 'ubuntu-22.04', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' }
23-
- { name: 'gpu', runner: 'ubuntu-22.04-arm', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' }
27+
- { name: 'cpu', runner: 'ubuntu-22.04', base_image: 'ubuntu:22.04' }
28+
- { name: 'cpu', runner: 'ubuntu-22.04-arm', base_image: 'ubuntu:22.04' }
29+
- { name: 'gpu', runner: 'ubuntu-22.04', base_image: 'nvcr.io/nvidia/nvhpc:24.5-devel-cuda_multi-ubuntu22.04', compiler_arch: 'Linux_x86_64' }
30+
- { name: 'gpu', runner: 'ubuntu-22.04-arm', base_image: 'nvcr.io/nvidia/nvhpc:24.5-devel-cuda_multi-ubuntu22.04', compiler_arch: 'Linux_aarch64' }
2431
runs-on: ${{ matrix.config.runner }}
2532
outputs:
2633
tag: ${{ steps.clone.outputs.tag }}
@@ -36,25 +43,37 @@ jobs:
3643
docker-images: true
3744
swap-storage: true
3845

39-
- name: Login
46+
- name: Login to Docker Hub
4047
uses: docker/login-action@v3
4148
with:
4249
username: ${{ secrets.DOCKERHUB_USERNAME }}
4350
password: ${{ secrets.DOCKERHUB_PASSWORD }}
4451

52+
- name: Login to GHCR
53+
uses: docker/login-action@v3
54+
with:
55+
registry: ghcr.io
56+
username: ${{ github.actor }}
57+
password: ${{ secrets.GITHUB_TOKEN }}
58+
4559
- name: Setup Buildx
4660
uses: docker/setup-buildx-action@v3
4761

48-
- name: Setup QEMU
49-
uses: docker/setup-qemu-action@v3
50-
5162
- name: Clone
5263
id: clone
5364
run: |
54-
TAG="${{ github.event.inputs.tag || github.ref_name }}"
65+
if [ "${{ github.event_name }}" = "schedule" ]; then
66+
BRANCH="master"
67+
TAG="nightly"
68+
else
69+
BRANCH="${{ github.event.inputs.tag || github.ref_name }}"
70+
TAG=$(echo "$BRANCH" | tr '/' '-')
71+
fi
5572
echo "tag=$TAG" >> $GITHUB_OUTPUT
5673
echo "TAG=$TAG" >> $GITHUB_ENV
57-
git clone --branch "$TAG" --depth 1 ${{ github.server_url }}/${{ github.repository }}.git mfc
74+
OWNER="${{ github.repository_owner }}"
75+
echo "GH_REGISTRY=ghcr.io/${OWNER,,}/mfc" >> $GITHUB_ENV
76+
git clone --branch "$BRANCH" --depth 1 ${{ github.server_url }}/${{ github.repository }}.git mfc
5877
5978
- name: Stage
6079
run: |
@@ -71,16 +90,13 @@ jobs:
7190
cp -r mfc/.git /mnt/share/.git
7291
cp mfc/.github/Dockerfile /mnt/share/
7392
cp mfc/.github/.dockerignore /mnt/share/
74-
docker buildx create --name mfcbuilder --driver docker-container --use
7593
7694
- name: Build and push image (cpu)
7795
if: ${{ matrix.config.name == 'cpu' }}
7896
uses: docker/build-push-action@v6
7997
with:
80-
builder: mfcbuilder
8198
context: /mnt/share
8299
file: /mnt/share/Dockerfile
83-
platforms: linux/amd64,linux/arm64
84100
build-args: |
85101
BASE_IMAGE=${{ matrix.config.base_image }}
86102
TARGET=${{ matrix.config.name }}
@@ -89,7 +105,11 @@ jobs:
89105
FC_COMPILER=${{ 'gfortran' }}
90106
COMPILER_PATH=${{ '/usr/bin' }}
91107
COMPILER_LD_LIBRARY_PATH=${{ '/usr/lib' }}
92-
tags: ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}
108+
labels: |
109+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
110+
tags: |
111+
${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
112+
${{ env.GH_REGISTRY }}:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
93113
push: true
94114

95115
- name: Build and push image (gpu)
@@ -105,28 +125,62 @@ jobs:
105125
CC_COMPILER=${{ 'nvc' }}
106126
CXX_COMPILER=${{ 'nvc++' }}
107127
FC_COMPILER=${{ 'nvfortran' }}
108-
COMPILER_PATH=${{ '/opt/nvidia/hpc_sdk/Linux_x86_64/compilers/bin' }}
109-
COMPILER_LD_LIBRARY_PATH=${{ '/opt/nvidia/hpc_sdk/Linux_x86_64/compilers/lib' }}
110-
tags: ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner}}
128+
COMPILER_PATH=/opt/nvidia/hpc_sdk/${{ matrix.config.compiler_arch }}/compilers/bin
129+
COMPILER_LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/${{ matrix.config.compiler_arch }}/compilers/lib
130+
labels: |
131+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
132+
tags: |
133+
${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
134+
${{ env.GH_REGISTRY }}:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
111135
push: true
112136

113137
manifests:
114138
runs-on: ubuntu-latest
115139
needs: Container
140+
environment:
141+
name: containers
142+
url: https://hub.docker.com/r/${{ secrets.DOCKERHUB_USERNAME }}/mfc
116143
steps:
117-
- name: Login
144+
- name: Login to Docker Hub
118145
uses: docker/login-action@v3
119146
with:
120147
username: ${{ secrets.DOCKERHUB_USERNAME }}
121148
password: ${{ secrets.DOCKERHUB_PASSWORD }}
122149

150+
- name: Login to GHCR
151+
uses: docker/login-action@v3
152+
with:
153+
registry: ghcr.io
154+
username: ${{ github.actor }}
155+
password: ${{ secrets.GITHUB_TOKEN }}
156+
157+
- name: Setup Buildx
158+
uses: docker/setup-buildx-action@v3
159+
160+
- name: Set GHCR registry (lowercase)
161+
run: |
162+
OWNER="${{ github.repository_owner }}"
163+
echo "GH_REGISTRY=ghcr.io/${OWNER,,}/mfc" >> $GITHUB_ENV
164+
123165
- name: Create and Push Manifest Lists
124166
env:
125167
TAG: ${{ needs.Container.outputs.tag }}
126-
REGISTRY: ${{ secrets.DOCKERHUB_USERNAME }}/mfc
168+
DH: ${{ secrets.DOCKERHUB_USERNAME }}/mfc
169+
run: |
170+
GH="${{ env.GH_REGISTRY }}"
171+
for R in "$DH" "$GH"; do
172+
docker buildx imagetools create -t $R:$TAG-cpu $R:$TAG-cpu-ubuntu-22.04 $R:$TAG-cpu-ubuntu-22.04-arm
173+
docker buildx imagetools create -t $R:$TAG-gpu $R:$TAG-gpu-ubuntu-22.04 $R:$TAG-gpu-ubuntu-22.04-arm
174+
done
175+
176+
- name: Update latest tags
177+
if: github.event_name == 'release'
178+
env:
179+
TAG: ${{ needs.Container.outputs.tag }}
180+
DH: ${{ secrets.DOCKERHUB_USERNAME }}/mfc
127181
run: |
128-
docker buildx imagetools create -t $REGISTRY:latest-cpu $REGISTRY:$TAG-cpu
129-
docker manifest create $REGISTRY:$TAG-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm
130-
docker manifest create $REGISTRY:latest-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm
131-
docker manifest push $REGISTRY:$TAG-gpu
132-
docker manifest push $REGISTRY:latest-gpu
182+
GH="${{ env.GH_REGISTRY }}"
183+
for R in "$DH" "$GH"; do
184+
docker buildx imagetools create -t $R:latest-cpu $R:$TAG-cpu-ubuntu-22.04 $R:$TAG-cpu-ubuntu-22.04-arm
185+
docker buildx imagetools create -t $R:latest-gpu $R:$TAG-gpu-ubuntu-22.04 $R:$TAG-gpu-ubuntu-22.04-arm
186+
done

.github/workflows/docs.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
pull_request:
1010

1111
jobs:
12-
docs:
13-
name: Build & Publish
12+
build:
13+
name: Build & Verify
1414
runs-on: ubuntu-latest
1515

1616
steps:
@@ -73,8 +73,25 @@ jobs:
7373
args: -c .lychee.toml build/install/docs/mfc/
7474
fail: true
7575

76+
publish:
77+
name: Publish
78+
runs-on: ubuntu-latest
79+
needs: build
80+
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
81+
environment:
82+
name: docs
83+
url: https://mflowcode.github.io/
84+
85+
steps:
86+
- uses: actions/checkout@v4
87+
88+
- name: Download Built Documentation Artifact
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: mfc-docs
92+
path: build/install/docs/mfc
93+
7694
- name: Publish Documentation
77-
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' )
7895
run: |
7996
set +e
8097
git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q

0 commit comments

Comments
 (0)