From 2a7df551bfb70dc3a1c2c2feed16901eb58c24ec Mon Sep 17 00:00:00 2001 From: Malmahrouqi3 Date: Mon, 15 Dec 2025 12:39:24 -0500 Subject: [PATCH 01/17] recycled my old code to benchmark any frontier release on the CI --- .github/workflows/bench.yml | 158 +++++++------ .github/workflows/cleanliness.yml | 127 ----------- .github/workflows/coverage.yml | 50 ----- .github/workflows/deploy-tap.yml | 120 ---------- .github/workflows/docker.yml | 132 ----------- .github/workflows/docs.yml | 84 ------- .github/workflows/formatting.yml | 19 -- .github/workflows/homebrew.yml | 259 ---------------------- .github/workflows/line-count.yml | 54 ----- .github/workflows/lint-source.yml | 53 ----- .github/workflows/lint-toolchain.yml | 22 -- .github/workflows/phoenix/bench.sh | 35 --- .github/workflows/phoenix/submit-bench.sh | 64 ------ .github/workflows/phoenix/submit.sh | 64 ------ .github/workflows/phoenix/test.sh | 25 --- .github/workflows/pmd.yml | 131 ----------- .github/workflows/release.yml | 91 ++++++++ .github/workflows/spelling.yml | 17 -- .github/workflows/test.yml | 162 -------------- 19 files changed, 177 insertions(+), 1490 deletions(-) delete mode 100644 .github/workflows/cleanliness.yml delete mode 100644 .github/workflows/coverage.yml delete mode 100644 .github/workflows/deploy-tap.yml delete mode 100644 .github/workflows/docker.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/formatting.yml delete mode 100644 .github/workflows/homebrew.yml delete mode 100644 .github/workflows/line-count.yml delete mode 100644 .github/workflows/lint-source.yml delete mode 100644 .github/workflows/lint-toolchain.yml delete mode 100644 .github/workflows/phoenix/bench.sh delete mode 100644 .github/workflows/phoenix/submit-bench.sh delete mode 100755 .github/workflows/phoenix/submit.sh delete mode 100644 .github/workflows/phoenix/test.sh delete mode 100644 .github/workflows/pmd.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/spelling.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 2ccdfca87a..eea33db4ba 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -1,59 +1,19 @@ -name: 'Benchmark' +name: 'Benchmark Frontier Releases' on: - pull_request: - pull_request_review: - types: [submitted] workflow_dispatch: + inputs: + tag: + description: 'tag to Benchmark' + required: true jobs: - file-changes: - name: Detect File Changes - runs-on: 'ubuntu-latest' - outputs: - checkall: ${{ steps.changes.outputs.checkall }} - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Detect Changes - uses: dorny/paths-filter@v3 - id: changes - with: - filters: ".github/file-filter.yml" - self: name: "${{ matrix.name }} (${{ matrix.device }}${{ matrix.interface != 'none' && format('-{0}', matrix.interface) || '' }})" - 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'))) }} - needs: file-changes strategy: fail-fast: false matrix: include: - - cluster: phoenix - name: Georgia Tech | Phoenix (NVHPC) - group: phoenix - labels: gt - flag: p - device: cpu - interface: none - build_script: "" - - cluster: phoenix - name: Georgia Tech | Phoenix (NVHPC) - group: phoenix - labels: gt - flag: p - device: gpu - interface: acc - build_script: "" - - cluster: phoenix - name: Georgia Tech | Phoenix (NVHPC) - group: phoenix - labels: gt - flag: p - device: gpu - interface: omp - build_script: "" - cluster: frontier name: Oak Ridge | Frontier (CCE) group: phoenix @@ -62,14 +22,14 @@ jobs: device: gpu interface: acc build_script: "bash .github/workflows/frontier/build.sh gpu acc bench" - - cluster: frontier - name: Oak Ridge | Frontier (CCE) - group: phoenix - labels: frontier - flag: f - device: gpu - interface: omp - build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" + # - cluster: frontier + # name: Oak Ridge | Frontier (CCE) + # group: phoenix + # labels: frontier + # flag: f + # device: gpu + # interface: omp + # build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" runs-on: group: ${{ matrix.group }} labels: ${{ matrix.labels }} @@ -81,44 +41,98 @@ jobs: - name: Clone - PR uses: actions/checkout@v4 with: - path: pr + path: pr - name: Clone - Master uses: actions/checkout@v4 with: repository: MFlowCode/MFC - ref: master + ref: ${{ github.event.inputs.tag }} path: master + - name: Checkout PR repo + uses: actions/checkout@v3 + with: + path: pr + + - name: Prepare Docker context + run: | + sudo fallocate -l 8G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + sudo mkdir -p /home/runner/tmp + export TMPDIR=/home/runner/tmp + free -h + + sudo mkdir -p master + sudo chmod 777 master + rm -rf master/* + cp -r mfc/* master/ + cp -r mfc/.git master/.git + cp pr/.github/Dockerfile master/ + cp pr/.github/.dockerignore master/ + cp pr/toolchain/dependencies/Silo.patch master/toolchain/dependencies/Silo.patch + cp pr/.github/scripts/run_parallel_benchmarks.sh master/.github/scripts/run_parallel_benchmarks.sh + + - name: Replace old SILO block in CMakeLists.txt + run: | + if [ -f master/toolchain/pyproject.toml ]; then + sed -i 's/"cantera",/"cantera==3.0.1",/g' master/toolchain/pyproject.toml + fi + + sed -i '/# SILO/,/^endif()/{ + r /dev/stdin + d + }' master/toolchain/dependencies/CMakeLists.txt <<'EOF' + # SILO + if (MFC_SILO) + find_package(SILO) + if (SILO_FOUND) + message(STATUS "SILO found.") + add_custom_target(silo) + else() + find_package(Git REQUIRED) + + ExternalProject_Add(silo + GIT_REPOSITORY "https://github.com/LLNL/Silo" + GIT_TAG 9af504ef4fb79153e1fbf3bdb75421b6b65f6dc4 + GIT_PROGRESS ON + PATCH_COMMAND "${GIT_EXECUTABLE}" stash + && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch" + CMAKE_ARGS -DSILO_ENABLE_SHARED=OFF + -DSILO_ENABLE_SILOCK=OFF + -DSILO_ENABLE_BROWSER=OFF + -DFIND_LIBRARY_USE_LIB64_PATHS=ON + "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" + "-DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}" + "-DCMAKE_FIND_PACKAGE_REDIRECTS_DIR=${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}" + "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" + "$<$:-DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/../cmake/cce>" + ) + endif() + endif() + EOF + docker buildx create --name mfcbuilder --driver docker-container --use + - name: Setup & Build if: matrix.build_script != '' run: | - (cd pr && ${{ matrix.build_script }}) & - (cd master && ${{ matrix.build_script }}) & - wait %1 && wait %2 + (cd master && ${{ matrix.build_script }}) & + wait %1 - name: Bench (Master v. PR) - run: bash pr/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.cluster }} - - - name: Generate & Post Comment - run: | - (cd pr && . ./mfc.sh load -c ${{ matrix.flag }} -m g) - (cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}-${{ matrix.interface }}.yaml ../pr/bench-${{ matrix.device }}-${{ matrix.interface }}.yaml) + run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }} - name: Print Logs if: always() run: | - cat pr/bench-${{ matrix.device }}-${{ matrix.interface }}.* 2>/dev/null || true - cat master/bench-${{ matrix.device }}-${{ matrix.interface }}.* 2>/dev/null || true + cat master/bench-${{ matrix.device }}.* 2>/dev/null || true - # All other runners (non-Phoenix) just run without special env - name: Archive Logs (Frontier) - if: always() && matrix.cluster != 'phoenix' uses: actions/upload-artifact@v4 with: - name: ${{ matrix.cluster }}-${{ matrix.device }}-${{ matrix.interface }} + name: ${{ matrix.cluster }}-${{ matrix.device }} path: | - pr/bench-${{ matrix.device }}-${{ matrix.interface }}.* - pr/build/benchmarks/* - master/bench-${{ matrix.device }}-${{ matrix.interface }}.* + master/bench-${{ matrix.device }}.* master/build/benchmarks/* diff --git a/.github/workflows/cleanliness.yml b/.github/workflows/cleanliness.yml deleted file mode 100644 index b02df12898..0000000000 --- a/.github/workflows/cleanliness.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: Cleanliness - -on: [push, pull_request, workflow_dispatch] - -jobs: - file-changes: - name: Detect File Changes - runs-on: 'ubuntu-latest' - outputs: - checkall: ${{ steps.changes.outputs.checkall }} - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Detect Changes - uses: dorny/paths-filter@v3 - id: changes - with: - filters: ".github/file-filter.yml" - - cleanliness: - name: Code Cleanliness Check - if: needs.file-changes.outputs.checkall == 'true' - needs: file-changes - runs-on: "ubuntu-latest" - env: - pr_everything: 0 - master_everything: 0 - steps: - - name: Clone - PR - uses: actions/checkout@v4 - with: - path: pr - - name: Clone - Master - uses: actions/checkout@v4 - with: - repository: MFlowCode/MFC - ref: master - path: master - - - name: Setup Ubuntu - run: | - sudo apt update -y - sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev libblas-dev liblapack-dev - - - name: Build - run: | - (cd pr && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../pr.txt) - (cd master && /bin/bash mfc.sh build -j $(nproc) --debug 2> ../master.txt) - sed -i '/\/pr\//d' pr.txt - sed -i '/\/master\//d' master.txt - - - name: Unused Variables Diff - continue-on-error: true - run: | - grep -F 'Wunused-variable' master.txt > mUnused.txt - grep -F 'Wunused-variable' pr.txt > prUnused.txt - diff prUnused.txt mUnused.txt - - - name: Unused Dummy Arguments Diff - continue-on-error: true - run: | - grep -F 'Wunused-dummy-argument' pr.txt > prDummy.txt - grep -F 'Wunused-dummy-argument' master.txt > mDummy.txt - diff prDummy.txt mDummy.txt - - - name: Unused Value Diff - continue-on-error: true - run: | - grep -F 'Wunused-value' pr.txt > prUnused_val.txt - grep -F 'Wunused-value' master.txt > mUnused_val.txt - diff prUnused_val.txt mUnused_val.txt - - - name: Maybe Uninitialized Variables Diff - continue-on-error: true - run: | - grep -F 'Wmaybe-uninitialized' pr.txt > prMaybe.txt - grep -F 'Wmaybe-uninitialized' master.txt > mMaybe.txt - diff prMaybe.txt mMaybe.txt - - - - name: Everything Diff - continue-on-error: true - run: | - grep '\-W' pr.txt > pr_every.txt - grep '\-W' master.txt > m_every.txt - diff pr_every.txt m_every.txt - - - name: List of Warnings - run: | - cat pr_every.txt - - - - name: Summary - continue-on-error: true - run: | - pr_variable=$(grep -c -F 'Wunused-variable' pr.txt) - pr_argument=$(grep -c -F 'Wunused-dummy-argument' pr.txt) - pr_value=$(grep -c -F 'Wunused-value' pr.txt) - pr_uninit=$(grep -c -F 'Wmaybe-uninitialized' pr.txt) - pr_everything=$(grep -c '\-W' pr.txt) - - master_variable=$(grep -c -F 'Wunused-variable' master.txt) - master_argument=$(grep -c -F 'Wunused-dummy-argument' master.txt) - master_value=$(grep -c -F 'Wunused-value' master.txt) - master_uninit=$(grep -c -F 'Wmaybe-uninitialized' master.txt) - master_everything=$(grep -c '\-W' master.txt ) - - echo "pr_everything=$pr_everything" >> $GITHUB_ENV - echo "master_everything=$master_everything" >> $GITHUB_ENV - - echo "Difference is how many warnings were added or removed from master to PR." - echo "Negative numbers are better since you are removing warnings." - echo " " - echo "Unused Variable Count: $pr_variable, Difference: $((pr_variable - master_variable))" - echo "Unused Dummy Argument: $pr_argument, Difference: $((pr_argument - master_argument))" - echo "Unused Value: $pr_value, Difference: $((pr_value - master_value))" - echo "Maybe Uninitialized: $pr_uninit, Difference: $((pr_uninit - master_uninit))" - echo "Everything: $pr_everything, Difference: $((pr_everything - master_everything))" - - - - name: Check Differences - if: env.pr_everything > env.master_everything - run: | - echo "Difference between warning count in PR is greater than in master." - - diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index ad0ea7a220..0000000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Coverage Check - -on: [push, pull_request, workflow_dispatch] - -jobs: - file-changes: - name: Detect File Changes - runs-on: 'ubuntu-latest' - outputs: - checkall: ${{ steps.changes.outputs.checkall }} - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Detect Changes - uses: dorny/paths-filter@v3 - id: changes - with: - filters: ".github/file-filter.yml" - - run: - name: Coverage Test on CodeCov - if: needs.file-changes.outputs.checkall == 'true' - needs: file-changes - runs-on: "ubuntu-latest" - steps: - - name: Checkouts - uses: actions/checkout@v4 - - - name: Setup Ubuntu - run: | - sudo apt update -y - sudo apt install -y tar wget make cmake gcc g++ python3 \ - python3-dev "openmpi-*" libopenmpi-dev hdf5-tools \ - libfftw3-dev libhdf5-dev libblas-dev liblapack-dev - - - name: Build - run: /bin/bash mfc.sh build -j $(nproc) --gcov - - - name: Test - run: /bin/bash mfc.sh test -a -j $(nproc) - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 - with: - fail_ci_if_error: false - verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - diff --git a/.github/workflows/deploy-tap.yml b/.github/workflows/deploy-tap.yml deleted file mode 100644 index 769cce98aa..0000000000 --- a/.github/workflows/deploy-tap.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Deploy Homebrew Tap - -on: - # Test formula on PRs (audit only, don't deploy) - pull_request: - branches: [ master ] - paths: - - 'packaging/homebrew/mfc.rb' - - 'packaging/homebrew/README.md' - # Deploy to tap on push to master - push: - branches: [ master, homebrew-new ] - paths: - - 'packaging/homebrew/mfc.rb' - - 'packaging/homebrew/README.md' - tags: - - 'v*.*.*' - # Allow manual trigger for testing - workflow_dispatch: - -permissions: - contents: read - -jobs: - deploy-tap: - name: Audit and deploy formula - runs-on: macos-14 - permissions: - contents: write - pull-requests: write - steps: - - name: Checkout MFC repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Determine event metadata - id: meta - run: | - if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then - VERSION="${GITHUB_REF_NAME#v}" - URL="https://github.com/${{ github.repository }}/archive/refs/tags/v${VERSION}.tar.gz" - else - # Extract URL from current formula to re-audit and sync - URL="$(grep -Eo 'https://github.com/.*/archive/refs/tags/v[0-9]+\.[0-9]+\.[0-9]+\.tar\.gz' packaging/homebrew/mfc.rb | head -n1)" - VERSION="$(echo "${URL}" | sed -E 's/.*v([0-9]+\.[0-9]+\.[0-9]+)\.tar\.gz/\1/')" - fi - SHASUM="$(curl -sL "${URL}" | shasum -a 256 | awk '{print $1}')" - echo "version=${VERSION}" >> $GITHUB_OUTPUT - echo "url=${URL}" >> $GITHUB_OUTPUT - echo "sha256=${SHASUM}" >> $GITHUB_OUTPUT - echo "Event: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY - echo "Version: ${VERSION}" >> $GITHUB_STEP_SUMMARY - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - echo "Mode: Audit only (PR)" >> $GITHUB_STEP_SUMMARY - else - echo "Mode: Audit and deploy" >> $GITHUB_STEP_SUMMARY - fi - - - name: Update formula (for tag events) - if: github.ref_type == 'tag' - run: | - /usr/bin/sed -i '' "s@^ url \".*\"@ url \"${{ steps.meta.outputs.url }}\"@" packaging/homebrew/mfc.rb - /usr/bin/sed -i '' "s@^ sha256 \".*\"@ sha256 \"${{ steps.meta.outputs.sha256 }}\"@" packaging/homebrew/mfc.rb - - - name: Setup Homebrew - uses: Homebrew/actions/setup-homebrew@master - - - name: Audit/style formula before pushing - run: | - brew style packaging/homebrew/mfc.rb - # Create temporary tap to audit the formula - brew tap-new mfc/local - cp packaging/homebrew/mfc.rb "$(brew --repository)/Library/Taps/mfc/homebrew-local/Formula/mfc.rb" - brew audit --online --strict --new --except=homepage mfc/local/mfc || brew audit --online mfc/local/mfc - brew untap mfc/local - - - name: Clone or bootstrap tap repository - if: github.event_name != 'pull_request' - env: - TAP_TOKEN: ${{ secrets.TAP_REPO_TOKEN }} - run: | - set -euo pipefail - REPO="https://x-access-token:${TAP_TOKEN}@github.com/MFlowCode/homebrew-mfc.git" - if git ls-remote "${REPO}" HEAD >/dev/null 2>&1; then - git clone "${REPO}" tap-repo - else - # Repo exists but might be empty; fall back to bootstrap - mkdir -p tap-repo - cd tap-repo - git init -b main - git remote add origin "${REPO}" - touch .keep - git add .keep - git -c user.name="github-actions[bot]" -c user.email="github-actions[bot]@users.noreply.github.com" commit -m "Initialize tap" - git push -u origin main - fi - - - name: Copy formula and README into tap - if: github.event_name != 'pull_request' - run: | - mkdir -p tap-repo/Formula - cp packaging/homebrew/mfc.rb tap-repo/Formula/mfc.rb - cp packaging/homebrew/README.md tap-repo/README.md - - - name: Commit & push if changed - if: github.event_name != 'pull_request' - env: - TAP_TOKEN: ${{ secrets.TAP_REPO_TOKEN }} - run: | - cd tap-repo - git add Formula/mfc.rb README.md - if git diff --cached --quiet; then - echo "No changes in Formula/mfc.rb or README.md; skipping push." - exit 0 - fi - git -c user.name="github-actions[bot]" -c user.email="github-actions[bot]@users.noreply.github.com" \ - commit -m "mfc: v${{ steps.meta.outputs.version }}" - git push origin HEAD:main - diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index b12c6cdc5f..0000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: Containerization - -on: - release: - types: [published] - workflow_dispatch: - inputs: - tag: - description: 'tag to containerize' - required: true - -concurrency: - group: Containerization - cancel-in-progress: false - -jobs: - Container: - strategy: - matrix: - config: - - { name: 'cpu', runner: 'ubuntu-22.04', base_image: 'ubuntu:22.04' } - - { name: 'gpu', runner: 'ubuntu-22.04', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } - - { name: 'gpu', runner: 'ubuntu-22.04-arm', base_image: 'nvcr.io/nvidia/nvhpc:23.11-devel-cuda_multi-ubuntu22.04' } - runs-on: ${{ matrix.config.runner }} - outputs: - tag: ${{ steps.clone.outputs.tag }} - steps: - - name: Free Disk Space - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - - name: Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Setup Buildx - uses: docker/setup-buildx-action@v3 - - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - - - name: Clone - id: clone - run: | - TAG="${{ github.event.inputs.tag || github.ref_name }}" - echo "tag=$TAG" >> $GITHUB_OUTPUT - echo "TAG=$TAG" >> $GITHUB_ENV - git clone --branch "$TAG" --depth 1 https://github.com/MFlowCode/MFC.git mfc - - - name: Stage - run: | - sudo fallocate -l 8G /swapfile - sudo chmod 600 /swapfile - sudo mkswap /swapfile - sudo swapon /swapfile - sudo mkdir -p /home/runner/tmp - export TMPDIR=/home/runner/tmp - free -h - sudo mkdir -p /mnt/share - sudo chmod 777 /mnt/share - cp -r mfc/* /mnt/share/ - cp -r mfc/.git /mnt/share/.git - cp mfc/.github/Dockerfile /mnt/share/ - cp mfc/.github/.dockerignore /mnt/share/ - docker buildx create --name mfcbuilder --driver docker-container --use - - - name: Build and push image (cpu) - if: ${{ matrix.config.name == 'cpu' }} - uses: docker/build-push-action@v6 - with: - builder: mfcbuilder - context: /mnt/share - file: /mnt/share/Dockerfile - platforms: linux/amd64,linux/arm64 - build-args: | - BASE_IMAGE=${{ matrix.config.base_image }} - TARGET=${{ matrix.config.name }} - CC_COMPILER=${{ 'gcc' }} - CXX_COMPILER=${{ 'g++' }} - FC_COMPILER=${{ 'gfortran' }} - COMPILER_PATH=${{ '/usr/bin' }} - COMPILER_LD_LIBRARY_PATH=${{ '/usr/lib' }} - tags: ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }} - push: true - - - name: Build and push image (gpu) - if: ${{ matrix.config.name == 'gpu' }} - uses: docker/build-push-action@v5 - with: - builder: default - context: /mnt/share - file: /mnt/share/Dockerfile - build-args: | - BASE_IMAGE=${{ matrix.config.base_image }} - TARGET=${{ matrix.config.name }} - CC_COMPILER=${{ 'nvc' }} - CXX_COMPILER=${{ 'nvc++' }} - FC_COMPILER=${{ 'nvfortran' }} - COMPILER_PATH=${{ '/opt/nvidia/hpc_sdk/Linux_x86_64/compilers/bin' }} - COMPILER_LD_LIBRARY_PATH=${{ '/opt/nvidia/hpc_sdk/Linux_x86_64/compilers/lib' }} - tags: ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner}} - push: true - - manifests: - runs-on: ubuntu-latest - needs: Container - steps: - - name: Login - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Create and Push Manifest Lists - env: - TAG: ${{ needs.Container.outputs.tag }} - REGISTRY: ${{ secrets.DOCKERHUB_USERNAME }}/mfc - run: | - docker buildx imagetools create -t $REGISTRY:latest-cpu $REGISTRY:$TAG-cpu - docker manifest create $REGISTRY:$TAG-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm - docker manifest create $REGISTRY:latest-gpu $REGISTRY:$TAG-gpu-ubuntu-22.04 $REGISTRY:$TAG-gpu-ubuntu-22.04-arm - docker manifest push $REGISTRY:$TAG-gpu - docker manifest push $REGISTRY:latest-gpu \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 3613c38b10..0000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Documentation - -on: - schedule: - - cron: '0 0 * * *' # This runs every day at midnight UTC - workflow_dispatch: - push: - pull_request: - -jobs: - docs: - name: Build & Publish - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - # We build doxygen from source because of - # https://github.com/doxygen/doxygen/issues/9016 - - name: Build Doxygen - run: | - sudo apt update -y - sudo apt install -y cmake ninja-build graphviz graphviz - git clone https://github.com/doxygen/doxygen.git ../doxygen - cd ../doxygen - git checkout 26b5403 - cd - - cmake -S ../doxygen -B ../doxygen/build -G Ninja - sudo ninja -C ../doxygen/build install - - - name: Build Documentation - run: | - pip3 install fypp - cmake -S . -B build -G Ninja --install-prefix=$(pwd)/build/install -D MFC_DOCUMENTATION=ON - ninja -C build install - - - name: Upload Built Documentation Artifact - uses: actions/upload-artifact@v4 - with: - name: mfc-docs - path: build/install/docs/mfc - if-no-files-found: error - retention-days: 7 - - # From here https://github.com/cicirello/generate-sitemap - - name: Generate the sitemap - id: sitemap - uses: cicirello/generate-sitemap@v1 - with: - base-url-path: https://mflowcode.github.io/ - path-to-root: build/install/docs/mfc - include-pdf: false - sitemap-format: txt - - - name: Output stats - run: | - echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}" - echo "url-count = ${{ steps.sitemap.outputs.url-count }}" - echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}" - - - name: Linkcheck - Lychee - uses: lycheeverse/lychee-action@v2 - with: - args: -c .lychee.toml build/install/docs/mfc/ - fail: false - - - name: Publish Documentation - if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' ) - run: | - set +e - git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q - if [ "$?" -ne "0" ]; then exit 0; fi - set -e - git config --global user.name 'MFC Action' - git config --global user.email '<>' - git clone "${{ secrets.DOC_PUSH_URL }}" ../www - rm -rf ../www/* - mv build/install/docs/mfc/* ../www/ - git -C ../www add -A - git -C ../www commit -m "Docs @ ${GITHUB_SHA::7}" || true - git -C ../www push - -# DOC_PUSH_URL should be of the format: -# --> https://:@github.com// diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml deleted file mode 100644 index 16043daa95..0000000000 --- a/.github/workflows/formatting.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Pretty - -on: [push, pull_request, workflow_dispatch] - -jobs: - docs: - name: Formatting - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: MFC Python setup - run: ./mfc.sh init - - - name: Check formatting - run: | - ./mfc.sh format -j $(nproc) - git diff --exit-code diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml deleted file mode 100644 index d7eced2952..0000000000 --- a/.github/workflows/homebrew.yml +++ /dev/null @@ -1,259 +0,0 @@ -name: Homebrew Formula Test - -on: - push: - paths: - - 'packaging/homebrew/**' - - '.github/workflows/homebrew.yml' - pull_request: - paths: - - 'packaging/homebrew/**' - - '.github/workflows/homebrew.yml' - workflow_dispatch: - -jobs: - # Fast smoke tests that run before expensive operations - smoke-test: - name: Quick Formula Validation - runs-on: ubuntu-latest # Use Linux for speed (Homebrew works on Linux too) - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Homebrew - uses: Homebrew/actions/setup-homebrew@master - - - name: Validate formula syntax with brew style - run: | - echo "Checking formula syntax..." - brew style packaging/homebrew/mfc.rb - - - name: Run brew audit (without installation) - run: | - echo "Configuring git for brew tap-new..." - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - - echo "Creating temporary local tap..." - brew tap-new mflowcode/test - cp packaging/homebrew/mfc.rb $(brew --repository)/Library/Taps/mflowcode/homebrew-test/Formula/mfc.rb - - echo "Running brew audit (online checks)..." - brew audit --online --skip-style mflowcode/test/mfc || true - - echo "Cleaning up tap..." - brew untap mflowcode/test - - - name: Validate Ruby syntax - run: | - echo "Checking Ruby syntax..." - ruby -c packaging/homebrew/mfc.rb - - - name: Check for common formula issues - run: | - echo "Checking for common issues..." - - # Check that required fields are present - grep -q 'desc "' packaging/homebrew/mfc.rb || (echo "❌ Missing desc"; exit 1) - grep -q 'homepage "' packaging/homebrew/mfc.rb || (echo "❌ Missing homepage"; exit 1) - grep -q 'url "' packaging/homebrew/mfc.rb || (echo "❌ Missing url"; exit 1) - grep -q 'sha256 "' packaging/homebrew/mfc.rb || (echo "❌ Missing sha256"; exit 1) - grep -q 'license "' packaging/homebrew/mfc.rb || (echo "❌ Missing license"; exit 1) - - # Check that install method exists - grep -q 'def install' packaging/homebrew/mfc.rb || (echo "❌ Missing install method"; exit 1) - - # Check that test block exists - grep -q 'test do' packaging/homebrew/mfc.rb || (echo "❌ Missing test block"; exit 1) - - echo "✅ All required formula components present" - - - name: Verify URL is reachable - run: | - echo "Checking that source URL is reachable..." - URL=$(grep -E 'url "https://[^"]+' packaging/homebrew/mfc.rb | head -1 | sed 's/.*url "\([^"]*\)".*/\1/') - - if [ -z "$URL" ]; then - echo "❌ Could not extract URL from formula" - exit 1 - fi - - echo "URL: $URL" - HTTP_CODE=$(curl -sI -w "%{http_code}" -o /dev/null "$URL") - - if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "302" ]; then - echo "✅ URL is reachable (HTTP $HTTP_CODE)" - else - echo "⚠️ URL returned HTTP $HTTP_CODE (may indicate an issue)" - # Don't fail here - could be a temporary issue - fi - - - name: Verify SHA256 checksum - run: | - echo "Verifying SHA256 checksum matches URL..." - URL=$(grep -E 'url "https://[^"]+' packaging/homebrew/mfc.rb | head -1 | sed 's/.*url "\([^"]*\)".*/\1/') - EXPECTED_SHA=$(grep 'sha256 "' packaging/homebrew/mfc.rb | head -1 | sed 's/.*sha256 "\([^"]*\)".*/\1/') - - if [ -z "$URL" ] || [ -z "$EXPECTED_SHA" ]; then - echo "❌ Could not extract URL or SHA256 from formula" - exit 1 - fi - - echo "Downloading tarball to compute checksum..." - ACTUAL_SHA=$(curl -sL "$URL" | shasum -a 256 | awk '{print $1}') - - echo "Expected SHA256: $EXPECTED_SHA" - echo "Actual SHA256: $ACTUAL_SHA" - - if [ "$EXPECTED_SHA" = "$ACTUAL_SHA" ]; then - echo "✅ SHA256 checksum matches!" - else - echo "❌ SHA256 mismatch!" - exit 1 - fi - - # Full installation test (only runs if smoke tests pass) - test-formula: - name: Full Installation Test - needs: smoke-test # Only run after smoke tests pass - runs-on: macos-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Homebrew - run: | - echo "Homebrew version:" - brew --version - echo "Updating Homebrew..." - brew update - - - name: Install formula dependencies - run: | - echo "Installing MFC dependencies..." - brew install cmake gcc python@3.12 boost fftw hdf5 open-mpi openblas - - - name: Install MFC from formula - run: | - echo "Creating temporary local tap..." - brew tap-new mflowcode/test - - echo "Copying formula to tap..." - cp packaging/homebrew/mfc.rb $(brew --repository)/Library/Taps/mflowcode/homebrew-test/Formula/mfc.rb - - echo "Installing MFC from local tap..." - # Note: brew may exit with code 1 due to dylib fixup warnings on some Python packages (non-fatal) - # We verify installation using brew commands rather than parsing log output - set +e # Don't fail immediately on error - brew install --build-from-source --verbose mflowcode/test/mfc 2>&1 | tee /tmp/brew-install.log - brew_exit_code=$? - set -e - - # Verify installation using brew list (more robust than log parsing) - if brew list mflowcode/test/mfc &>/dev/null; then - echo "✅ MFC installed successfully (ignoring dylib relocation warnings)" - # Optionally verify with brew info - brew info mflowcode/test/mfc - exit 0 - else - echo "❌ MFC installation failed" - exit $brew_exit_code - fi - - - name: Display error logs on failure - if: failure() - run: | - echo "=== Displaying last 200 lines of brew install log ===" - if [ -f /tmp/brew-install.log ]; then - tail -200 /tmp/brew-install.log - fi - - echo -e "\n=== Displaying Homebrew log files ===" - if [ -d ~/Library/Logs/Homebrew/mfc/ ]; then - for logfile in ~/Library/Logs/Homebrew/mfc/*; do - if [ -f "$logfile" ]; then - echo -e "\n\n====== $logfile ======" - cat "$logfile" - fi - done - fi - - echo -e "\n=== Searching for Cantera config.log ===" - cantera_config_log=$(find /private/tmp -name "config.log" -path "*/mfc--cantera*" 2>/dev/null | head -1) - if [ -n "$cantera_config_log" ] && [ -f "$cantera_config_log" ]; then - echo -e "\n\n====== Cantera config.log ======" - echo "Found at: $cantera_config_log" - cat "$cantera_config_log" - # Copy to a known location for artifact upload - mkdir -p /tmp/cantera-logs - cp "$cantera_config_log" /tmp/cantera-logs/config.log - else - echo "Cantera config.log not found" - echo "Searching in all /private/tmp directories:" - find /private/tmp -name "config.log" 2>/dev/null || echo "No config.log files found" - fi - - - name: Upload Homebrew logs on failure - if: failure() - uses: actions/upload-artifact@v4 - with: - name: homebrew-logs - path: | - /tmp/brew-install.log - /tmp/cantera-logs/ - ~/Library/Logs/Homebrew/mfc/ - if-no-files-found: ignore - - - name: Test MFC installation - run: | - echo "=== Testing MFC Installation ===" - - echo "1. Checking binaries exist and are executable..." - test -f $(brew --prefix)/bin/mfc && test -x $(brew --prefix)/bin/mfc - test -f $(brew --prefix)/bin/pre_process && test -x $(brew --prefix)/bin/pre_process - test -f $(brew --prefix)/bin/simulation && test -x $(brew --prefix)/bin/simulation - test -f $(brew --prefix)/bin/post_process && test -x $(brew --prefix)/bin/post_process - echo " ✓ All binaries exist and are executable" - - echo "2. Verifying installation structure..." - test -f $(brew --prefix mfc)/libexec/mfc.sh - test -d $(brew --prefix mfc)/toolchain - echo " ✓ Installation structure verified" - - echo "3. Checking Python venv..." - test -d $(brew --prefix mfc)/libexec/venv - test -f $(brew --prefix mfc)/libexec/venv/bin/python - test -f $(brew --prefix mfc)/libexec/venv/bin/pip - echo " ✓ Python venv exists" - - echo "4. Checking examples..." - test -d $(brew --prefix mfc)/examples - test -f $(brew --prefix mfc)/examples/1D_sodshocktube/case.py - echo " ✓ Examples installed" - - echo "5. Testing mfc wrapper..." - mfc --help - echo " ✓ mfc --help succeeded" - - echo "=== All tests passed! ===" - - - name: Run MFC test case - run: | - echo "Running a simple test case (1D Sod shock tube)..." - TESTDIR=$(mktemp -d) - cp $(brew --prefix mfc)/examples/1D_sodshocktube/case.py "$TESTDIR/" - - echo "Running with $(sysctl -n hw.ncpu) processors..." - # Use absolute path and shorthand syntax (mfc auto-detects and prepends 'run') - mfc "$TESTDIR/case.py" -j $(sysctl -n hw.ncpu) - - echo "Test case completed successfully!" - - - name: Uninstall and cleanup - if: always() - run: | - echo "Cleaning up..." - brew uninstall mfc || true - brew cleanup diff --git a/.github/workflows/line-count.yml b/.github/workflows/line-count.yml deleted file mode 100644 index 4cc6014e08..0000000000 --- a/.github/workflows/line-count.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Lines of Code - -on: [push, pull_request, workflow_dispatch] - -jobs: - file-changes: - name: Detect File Changes - runs-on: 'ubuntu-latest' - outputs: - checkall: ${{ steps.changes.outputs.checkall }} - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Detect Changes - uses: dorny/paths-filter@v3 - id: changes - with: - filters: ".github/file-filter.yml" - - sz: - name: Core MFC Line Difference - if: needs.file-changes.outputs.checkall == 'true' - needs: file-changes - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - name: Checkout code from PR branch - uses: actions/checkout@v4 - with: - path: pr - - - name: Checkout code from MFC master - uses: actions/checkout@v4 - with: - repository: ${{ github.event.pull_request.repository }} - ref: ${{ github.event.pull_request.base.ref }} - path: base - # repository: MFlowCode/MFC - # ref: master - # path: base - - - name: Get Line Diff - run: | - BASE="$GITHUB_WORKSPACE/base" - PR="$GITHUB_WORKSPACE/pr" - cd $BASE - export MFC_PR=$PR - pwd - ./mfc.sh init &> tmp.txt - ./mfc.sh count_diff - diff --git a/.github/workflows/lint-source.yml b/.github/workflows/lint-source.yml deleted file mode 100644 index bc35b887ea..0000000000 --- a/.github/workflows/lint-source.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Lint Source - -on: [push, pull_request, workflow_dispatch] - -jobs: - file-changes: - name: Detect File Changes - runs-on: 'ubuntu-latest' - outputs: - checkall: ${{ steps.changes.outputs.checkall }} - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Detect Changes - uses: dorny/paths-filter@v3 - id: changes - with: - filters: ".github/file-filter.yml" - - lint-source: - name: Lint Source - runs-on: 'ubuntu-latest' - - steps: - - uses: actions/checkout@v4 - - - name: Initialize MFC - run: ./mfc.sh init - - - name: Looking for raw directives - run: | - ! grep -iR '!\$acc\|!\$omp' --exclude="parallel_macros.fpp" --exclude="acc_macros.fpp" --exclude="omp_macros.fpp" --exclude="shared_parallel_macros.fpp" --exclude="syscheck.fpp" ./src/* - - - name: No double precision intrinsics - run: | - ! grep -iR 'double_precision\|dsqrt\|dexp\|dlog\|dble\|dabs\|double\ precision\|real(8)\|real(4)\|dprod\|dmin\|dmax\|dfloat\|dreal\|dcos\|dsin\|dtan\|dsign\|dtanh\|dsinh\|dcosh\|d0' --exclude-dir=syscheck --exclude="*nvtx*" --exclude="*precision_select*" ./src/* - - - name: Looking for junk code - run: | - ! grep -iR -e '\.\.\.' -e '\-\-\-' -e '===' ./src/* - - - name: Looking for false integers - run: | - ! grep -onRP '(?/g - s/\[[[:space:]]*/=[[:space:]]*/>/g - s/[[:space:]]*<[[:space:]]*/[[:space:]]*/>/g - s/[[:space:]]*==[[:space:]]*/==/g - - # Remove full-line comments - /^\s*!/d - /^[cC*dD]/d - /^[ \t]*[cC*dD]/d - /^[[:space:]]*$/d - - # Remove end-of-line comments, preserving quoted strings - s/([^"'\''\\]*("[^"]*")?('\''[^'\'']*'\''?)?[^"'\''\\]*)[!].*$/\1/ - ' "$file" > "$TMP_FILE" - - if cmp -s "$file" "$TMP_FILE"; then - rm "$TMP_FILE" - else - # Overwrite the original file with the processed content - mv "$TMP_FILE" "$file" - fi - done - - "${PMD_HOME}/bin/pmd" cpd \ - --dir src \ - --language fortran \ - --minimum-tokens=20 \ - --no-fail-on-violation \ - --no-fail-on-error diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..73f8def331 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,91 @@ +name: Release Dispatcher + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + inputs: + from_tag: + description: 'Start tag (e.g. v4.3.0)' + required: false + default: 'v5.1.3' + to_tag: + description: 'End tag (e.g. v5.1.3)' + required: false + default: 'v5.1.3' +env: + FROM_TAG: ${{ github.event.inputs.from_tag || 'v5.1.3' }} + TO_TAG: ${{ github.event.inputs.to_tag || 'v5.1.3' }} + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Get tags in range + id: tags + run: | + git clone --quiet https://github.com/MFlowCode/MFC.git mfc + cd mfc + git fetch --tags + TAGS=$(git tag --sort=creatordate) + TAGS_IN_RANGE=$(awk "/^${{ env.FROM_TAG }}$/,/^${{ env.TO_TAG }}$/" <<< "$TAGS" | grep -v '^$') + echo "tags=$(echo $TAGS_IN_RANGE | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Dispatch bench.yml for each tag + uses: actions/github-script@v7 + with: + script: | + const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean); + for (const tag of tags) { + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'bench.yml', + ref: context.ref.replace('refs/heads/', ''), + inputs: { tag } + }); + + let runId = null; + for (let i = 0; i < 60; i++) { // Try for up to 300 seconds + const runs = await github.rest.actions.listWorkflowRuns({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'bench.yml', + event: 'workflow_dispatch', + per_page: 5 + }); + // Find the most recent queued or in_progress run + const found = runs.data.workflow_runs.find(run => + ['queued', 'in_progress'].includes(run.status) + ); + if (found) { + runId = found.id; + break; + } + await new Promise(resolve => setTimeout(resolve, 5000)); + } + if (!runId) { + core.setFailed(`Could not find workflow run for tag ${tag}`); + return; + } + + let completed = false; + while (!completed) { + const run = await github.rest.actions.getWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: runId + }); + if (run.data.status === 'completed') { + if (run.data.conclusion !== 'success') { + core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`); + return; + } + completed = true; + } else { + await new Promise(resolve => setTimeout(resolve, 15000)); + } + } + } diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml deleted file mode 100644 index accdc96288..0000000000 --- a/.github/workflows/spelling.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Spell Check - -on: [push, pull_request, workflow_dispatch] - -jobs: - run: - name: Spell Check - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: MFC Python Setup - run: ./mfc.sh init - - - name: Spell Check - run: ./mfc.sh spelling diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 251b276ace..0000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,162 +0,0 @@ -name: 'Test Suite' - -on: [push, pull_request, workflow_dispatch] - -jobs: - file-changes: - name: Detect File Changes - runs-on: 'ubuntu-latest' - outputs: - checkall: ${{ steps.changes.outputs.checkall }} - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Detect Changes - uses: dorny/paths-filter@v3 - id: changes - with: - filters: ".github/file-filter.yml" - - github: - name: Github - if: needs.file-changes.outputs.checkall == 'true' - needs: file-changes - strategy: - matrix: - os: ['ubuntu', 'macos'] - mpi: ['mpi'] - precision: [''] - debug: ['debug', 'no-debug'] - intel: [true, false] - exclude: - - os: macos - intel: true - - include: - - os: ubuntu - mpi: no-mpi - precision: single - debug: no-debug - intel: false - - fail-fast: false - continue-on-error: true - runs-on: ${{ matrix.os }}-latest - - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Setup MacOS - if: matrix.os == 'macos' - run: | - brew update - brew upgrade - brew install coreutils python fftw hdf5 gcc@15 boost open-mpi lapack - echo "FC=gfortran-15" >> $GITHUB_ENV - echo "BOOST_INCLUDE=/opt/homebrew/include/" >> $GITHUB_ENV - - - name: Setup Ubuntu - if: matrix.os == 'ubuntu' && matrix.intel == false - run: | - sudo apt update -y - sudo apt install -y cmake gcc g++ python3 python3-dev hdf5-tools \ - libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev \ - libblas-dev liblapack-dev - - - name: Setup Ubuntu (Intel) - if: matrix.os == 'ubuntu' && matrix.intel == true - run: | - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" - sudo apt-get update - sudo apt-get install -y intel-oneapi-compiler-fortran intel-oneapi-mpi intel-oneapi-mpi-devel - source /opt/intel/oneapi/setvars.sh - printenv >> $GITHUB_ENV - - - name: Set up Python 3.14 - uses: actions/setup-python@v5 - with: - python-version: '3.14' - - - name: Build - run: | - /bin/bash mfc.sh test --dry-run -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }} --${{ matrix.precision }} - - - name: Test - run: | - /bin/bash mfc.sh test --max-attempts 3 -j $(nproc) $OPT1 $OPT2 - env: - OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }} - OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }} - - self: - name: "${{ matrix.cluster_name }} (${{ matrix.device }}${{ matrix.interface != 'none' && format('-{0}', matrix.interface) || '' }})" - if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true' - needs: file-changes - continue-on-error: false - timeout-minutes: 480 - strategy: - matrix: - include: - # Phoenix (GT) - - lbl: 'gt' - cluster_name: 'Georgia Tech | Phoenix' - device: 'gpu' - interface: 'acc' - - lbl: 'gt' - cluster_name: 'Georgia Tech | Phoenix' - device: 'gpu' - interface: 'omp' - - lbl: 'gt' - cluster_name: 'Georgia Tech | Phoenix' - device: 'cpu' - interface: 'none' - # Frontier (ORNL) - - lbl: 'frontier' - cluster_name: 'Oak Ridge | Frontier' - device: 'gpu' - interface: 'acc' - - lbl: 'frontier' - cluster_name: 'Oak Ridge | Frontier' - device: 'gpu' - interface: 'omp' - - lbl: 'frontier' - cluster_name: 'Oak Ridge | Frontier' - device: 'cpu' - interface: 'none' - runs-on: - group: phoenix - labels: ${{ matrix.lbl }} - env: - NODE_OPTIONS: ${{ matrix.lbl == 'gt' && '--max-old-space-size=2048' || '' }} - ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - steps: - - name: Clone - uses: actions/checkout@v4 - - - name: Build & Test - if: matrix.lbl == 'gt' - run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }} ${{ matrix.interface }} - - - name: Build - if: matrix.lbl == 'frontier' - run: bash .github/workflows/frontier/build.sh ${{ matrix.device }} ${{ matrix.interface }} - - - name: Test - if: matrix.lbl == 'frontier' - run: bash .github/workflows/frontier/submit.sh .github/workflows/frontier/test.sh ${{matrix.device}} ${{ matrix.interface }} - - - name: Print Logs - if: always() - run: cat test-${{ matrix.device }}-${{ matrix.interface }}.out - - - name: Archive Logs - uses: actions/upload-artifact@v4 - if: matrix.lbl == 'frontier' - with: - name: logs-${{ strategy.job-index }}-${{ matrix.device }}-${{ matrix.interface }} - path: test-${{ matrix.device }}-${{ matrix.interface }}.out From 896ae5a7a11b92f4585616cace5cbe238c0484ba Mon Sep 17 00:00:00 2001 From: Malmahrouqi3 Date: Mon, 15 Dec 2025 12:57:24 -0500 Subject: [PATCH 02/17] new changes --- .github/workflows/{bench.yml => bench-frontier.yml} | 0 .github/workflows/release.yml | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{bench.yml => bench-frontier.yml} (100%) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench-frontier.yml similarity index 100% rename from .github/workflows/bench.yml rename to .github/workflows/bench-frontier.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 73f8def331..9db84f2166 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: TAGS_IN_RANGE=$(awk "/^${{ env.FROM_TAG }}$/,/^${{ env.TO_TAG }}$/" <<< "$TAGS" | grep -v '^$') echo "tags=$(echo $TAGS_IN_RANGE | tr '\n' ' ')" >> $GITHUB_OUTPUT - - name: Dispatch bench.yml for each tag + - name: Dispatch bench-frontier.yml for each tag uses: actions/github-script@v7 with: script: | @@ -42,7 +42,7 @@ jobs: await github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, repo: context.repo.repo, - workflow_id: 'bench.yml', + workflow_id: 'bench-frontier.yml', ref: context.ref.replace('refs/heads/', ''), inputs: { tag } }); @@ -52,7 +52,7 @@ jobs: const runs = await github.rest.actions.listWorkflowRuns({ owner: context.repo.owner, repo: context.repo.repo, - workflow_id: 'bench.yml', + workflow_id: 'bench-frontier.yml', event: 'workflow_dispatch', per_page: 5 }); From 8ecb5c81cc297be1fcfc5e52f3de07c8ea97796e Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:04:34 -0500 Subject: [PATCH 03/17] Update workflow reference for benchmark dispatch --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9db84f2166..64ed1aa894 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, workflow_id: 'bench-frontier.yml', - ref: context.ref.replace('refs/heads/', ''), + ref: 'benchmark-all-releases-on-frontier-runner', inputs: { tag } }); From 66c348b3c226ad4d74981039cf34870e8061b43e Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:09:29 -0500 Subject: [PATCH 04/17] Update owner and repo in release workflow --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64ed1aa894..37d300e82d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,8 @@ jobs: const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean); for (const tag of tags) { await github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, + owner: Malmahrouqi3, + repo: MFC-mo2, workflow_id: 'bench-frontier.yml', ref: 'benchmark-all-releases-on-frontier-runner', inputs: { tag } @@ -50,8 +50,8 @@ jobs: let runId = null; for (let i = 0; i < 60; i++) { // Try for up to 300 seconds const runs = await github.rest.actions.listWorkflowRuns({ - owner: context.repo.owner, - repo: context.repo.repo, + owner: Malmahrouqi3, + repo: MFC-mo2, workflow_id: 'bench-frontier.yml', event: 'workflow_dispatch', per_page: 5 @@ -74,8 +74,8 @@ jobs: let completed = false; while (!completed) { const run = await github.rest.actions.getWorkflowRun({ - owner: context.repo.owner, - repo: context.repo.repo, + owner: Malmahrouqi3, + repo: MFC-mo2, run_id: runId }); if (run.data.status === 'completed') { From 549e4de543e5cd43c6cac31c5ac6aa5bd52479f5 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:11:47 -0500 Subject: [PATCH 05/17] Fix owner and repo strings in release workflow --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37d300e82d..4bf5345f47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,8 @@ jobs: const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean); for (const tag of tags) { await github.rest.actions.createWorkflowDispatch({ - owner: Malmahrouqi3, - repo: MFC-mo2, + owner: 'Malmahrouqi3', + repo: 'MFC-mo2', workflow_id: 'bench-frontier.yml', ref: 'benchmark-all-releases-on-frontier-runner', inputs: { tag } @@ -50,8 +50,8 @@ jobs: let runId = null; for (let i = 0; i < 60; i++) { // Try for up to 300 seconds const runs = await github.rest.actions.listWorkflowRuns({ - owner: Malmahrouqi3, - repo: MFC-mo2, + owner: 'Malmahrouqi3', + repo: 'MFC-mo2', workflow_id: 'bench-frontier.yml', event: 'workflow_dispatch', per_page: 5 @@ -74,8 +74,8 @@ jobs: let completed = false; while (!completed) { const run = await github.rest.actions.getWorkflowRun({ - owner: Malmahrouqi3, - repo: MFC-mo2, + owner: 'Malmahrouqi3', + repo: 'MFC-mo2', run_id: runId }); if (run.data.status === 'completed') { From 437451d145624e8502ef24cde42a476de9ac0645 Mon Sep 17 00:00:00 2001 From: Malmahrouqi3 Date: Mon, 15 Dec 2025 13:25:27 -0500 Subject: [PATCH 06/17] default value for bench-frontier --- .github/workflows/bench-frontier.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index eea33db4ba..90206954c9 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -6,6 +6,7 @@ on: tag: description: 'tag to Benchmark' required: true + default: 'v5.1.3' jobs: self: From c4c4793bdb5d024ad7bb59082979987957e317f3 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:18:08 -0500 Subject: [PATCH 07/17] Delete .github/workflows/release.yml --- .github/workflows/release.yml | 91 ----------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 4bf5345f47..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Release Dispatcher - -on: - push: - branches: [main] - pull_request: - branches: [main] - workflow_dispatch: - inputs: - from_tag: - description: 'Start tag (e.g. v4.3.0)' - required: false - default: 'v5.1.3' - to_tag: - description: 'End tag (e.g. v5.1.3)' - required: false - default: 'v5.1.3' -env: - FROM_TAG: ${{ github.event.inputs.from_tag || 'v5.1.3' }} - TO_TAG: ${{ github.event.inputs.to_tag || 'v5.1.3' }} - -jobs: - dispatch: - runs-on: ubuntu-latest - steps: - - name: Get tags in range - id: tags - run: | - git clone --quiet https://github.com/MFlowCode/MFC.git mfc - cd mfc - git fetch --tags - TAGS=$(git tag --sort=creatordate) - TAGS_IN_RANGE=$(awk "/^${{ env.FROM_TAG }}$/,/^${{ env.TO_TAG }}$/" <<< "$TAGS" | grep -v '^$') - echo "tags=$(echo $TAGS_IN_RANGE | tr '\n' ' ')" >> $GITHUB_OUTPUT - - - name: Dispatch bench-frontier.yml for each tag - uses: actions/github-script@v7 - with: - script: | - const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean); - for (const tag of tags) { - await github.rest.actions.createWorkflowDispatch({ - owner: 'Malmahrouqi3', - repo: 'MFC-mo2', - workflow_id: 'bench-frontier.yml', - ref: 'benchmark-all-releases-on-frontier-runner', - inputs: { tag } - }); - - let runId = null; - for (let i = 0; i < 60; i++) { // Try for up to 300 seconds - const runs = await github.rest.actions.listWorkflowRuns({ - owner: 'Malmahrouqi3', - repo: 'MFC-mo2', - workflow_id: 'bench-frontier.yml', - event: 'workflow_dispatch', - per_page: 5 - }); - // Find the most recent queued or in_progress run - const found = runs.data.workflow_runs.find(run => - ['queued', 'in_progress'].includes(run.status) - ); - if (found) { - runId = found.id; - break; - } - await new Promise(resolve => setTimeout(resolve, 5000)); - } - if (!runId) { - core.setFailed(`Could not find workflow run for tag ${tag}`); - return; - } - - let completed = false; - while (!completed) { - const run = await github.rest.actions.getWorkflowRun({ - owner: 'Malmahrouqi3', - repo: 'MFC-mo2', - run_id: runId - }); - if (run.data.status === 'completed') { - if (run.data.conclusion !== 'success') { - core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`); - return; - } - completed = true; - } else { - await new Promise(resolve => setTimeout(resolve, 15000)); - } - } - } From e8ea2badfeb310c049d271838c4817624e72714b Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:29:11 -0500 Subject: [PATCH 08/17] Add concurrency support to benchmark workflow --- .github/workflows/bench-frontier.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 90206954c9..5e95ce92be 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -1,13 +1,19 @@ name: 'Benchmark Frontier Releases' +concurrency: + group: bench-frontier + cancel-in-progress: false + on: + push: + pull_request: workflow_dispatch: inputs: tag: description: 'tag to Benchmark' required: true default: 'v5.1.3' - + jobs: self: name: "${{ matrix.name }} (${{ matrix.device }}${{ matrix.interface != 'none' && format('-{0}', matrix.interface) || '' }})" @@ -38,6 +44,7 @@ jobs: env: ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + BENCH_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' ? github.event.inputs.tag: 'v5.1.3' }} steps: - name: Clone - PR uses: actions/checkout@v4 @@ -48,7 +55,7 @@ jobs: uses: actions/checkout@v4 with: repository: MFlowCode/MFC - ref: ${{ github.event.inputs.tag }} + ref: ${{ env.BENCH_TAG }} path: master - name: Checkout PR repo @@ -114,15 +121,13 @@ jobs: endif() endif() EOF - docker buildx create --name mfcbuilder --driver docker-container --use - name: Setup & Build - if: matrix.build_script != '' - run: | + run: | (cd master && ${{ matrix.build_script }}) & wait %1 - - name: Bench (Master v. PR) + - name: Bench (Master) run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }} - name: Print Logs From fe9261017b306ca471eedcfe3b72831d91c84bc4 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:40:02 -0500 Subject: [PATCH 09/17] Fix syntax for BENCH_TAG in workflow file --- .github/workflows/bench-frontier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 5e95ce92be..d41cabc5da 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -44,7 +44,7 @@ jobs: env: ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - BENCH_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' ? github.event.inputs.tag: 'v5.1.3' }} + BENCH_TAG: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' ? github.event.inputs.tag : 'v5.1.3' }}" steps: - name: Clone - PR uses: actions/checkout@v4 From e63b78854a3d7df9563bfdeaedd15d266c3881e4 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:42:08 -0500 Subject: [PATCH 10/17] Refactor BENCH_TAG assignment in workflow --- .github/workflows/bench-frontier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index d41cabc5da..7d2bf846a9 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -44,7 +44,7 @@ jobs: env: ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - BENCH_TAG: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' ? github.event.inputs.tag : 'v5.1.3' }}" + BENCH_TAG: ${{ if(github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '', github.event.inputs.tag, 'v5.1.3') }} steps: - name: Clone - PR uses: actions/checkout@v4 From 1726cdf66e0d5aad577ef9307306edb87b3f8609 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:42:46 -0500 Subject: [PATCH 11/17] Fix BENCH_TAG assignment in workflow file --- .github/workflows/bench-frontier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 7d2bf846a9..8c1c2bef29 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -44,7 +44,7 @@ jobs: env: ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - BENCH_TAG: ${{ if(github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '', github.event.inputs.tag, 'v5.1.3') }} + BENCH_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' && github.event.inputs.tag || 'v5.1.3' }} steps: - name: Clone - PR uses: actions/checkout@v4 From f29513f15fc48328eaa8a1b525aa615968189882 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 21:21:12 -0500 Subject: [PATCH 12/17] Removed Junk for Prepare context step (forgotten sudo commands) Removed unnecessary Docker context preparation steps and simplified the workflow. --- .github/workflows/bench-frontier.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 8c1c2bef29..b201f5f5d3 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -63,23 +63,8 @@ jobs: with: path: pr - - name: Prepare Docker context + - name: Prepare context run: | - sudo fallocate -l 8G /swapfile - sudo chmod 600 /swapfile - sudo mkswap /swapfile - sudo swapon /swapfile - sudo mkdir -p /home/runner/tmp - export TMPDIR=/home/runner/tmp - free -h - - sudo mkdir -p master - sudo chmod 777 master - rm -rf master/* - cp -r mfc/* master/ - cp -r mfc/.git master/.git - cp pr/.github/Dockerfile master/ - cp pr/.github/.dockerignore master/ cp pr/toolchain/dependencies/Silo.patch master/toolchain/dependencies/Silo.patch cp pr/.github/scripts/run_parallel_benchmarks.sh master/.github/scripts/run_parallel_benchmarks.sh From 2f89aa73205eadba069e6bf197ebc7a0097d7587 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 21:27:12 -0500 Subject: [PATCH 13/17] Remove context preparation steps from workflow --- .github/workflows/bench-frontier.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index b201f5f5d3..8eb04d20d4 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -62,12 +62,7 @@ jobs: uses: actions/checkout@v3 with: path: pr - - - name: Prepare context - run: | - cp pr/toolchain/dependencies/Silo.patch master/toolchain/dependencies/Silo.patch - cp pr/.github/scripts/run_parallel_benchmarks.sh master/.github/scripts/run_parallel_benchmarks.sh - + - name: Replace old SILO block in CMakeLists.txt run: | if [ -f master/toolchain/pyproject.toml ]; then From eebe25071fcf49afdec5e0cd18d4aa61233c394f Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Mon, 15 Dec 2025 22:30:22 -0500 Subject: [PATCH 14/17] clean up workflow --- .github/workflows/bench-frontier.yml | 55 ++++------------------------ 1 file changed, 8 insertions(+), 47 deletions(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 8eb04d20d4..8655e79c41 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -29,14 +29,14 @@ jobs: device: gpu interface: acc build_script: "bash .github/workflows/frontier/build.sh gpu acc bench" - # - cluster: frontier - # name: Oak Ridge | Frontier (CCE) - # group: phoenix - # labels: frontier - # flag: f - # device: gpu - # interface: omp - # build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" + - cluster: frontier + name: Oak Ridge | Frontier (CCE) + group: phoenix + labels: frontier + flag: f + device: gpu + interface: omp + build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" runs-on: group: ${{ matrix.group }} labels: ${{ matrix.labels }} @@ -62,45 +62,6 @@ jobs: uses: actions/checkout@v3 with: path: pr - - - name: Replace old SILO block in CMakeLists.txt - run: | - if [ -f master/toolchain/pyproject.toml ]; then - sed -i 's/"cantera",/"cantera==3.0.1",/g' master/toolchain/pyproject.toml - fi - - sed -i '/# SILO/,/^endif()/{ - r /dev/stdin - d - }' master/toolchain/dependencies/CMakeLists.txt <<'EOF' - # SILO - if (MFC_SILO) - find_package(SILO) - if (SILO_FOUND) - message(STATUS "SILO found.") - add_custom_target(silo) - else() - find_package(Git REQUIRED) - - ExternalProject_Add(silo - GIT_REPOSITORY "https://github.com/LLNL/Silo" - GIT_TAG 9af504ef4fb79153e1fbf3bdb75421b6b65f6dc4 - GIT_PROGRESS ON - PATCH_COMMAND "${GIT_EXECUTABLE}" stash - && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch" - CMAKE_ARGS -DSILO_ENABLE_SHARED=OFF - -DSILO_ENABLE_SILOCK=OFF - -DSILO_ENABLE_BROWSER=OFF - -DFIND_LIBRARY_USE_LIB64_PATHS=ON - "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" - "-DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}" - "-DCMAKE_FIND_PACKAGE_REDIRECTS_DIR=${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}" - "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" - "$<$:-DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/../cmake/cce>" - ) - endif() - endif() - EOF - name: Setup & Build run: | From d15c914519a0fd5da499a3051788579f16fbc78a Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:08:30 -0500 Subject: [PATCH 15/17] Update bench-frontier.yml for cluster and checkout Comment out the Frontier cluster configuration and change checkout reference to master. --- .github/workflows/bench-frontier.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 8655e79c41..4f2b950bb1 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -29,14 +29,14 @@ jobs: device: gpu interface: acc build_script: "bash .github/workflows/frontier/build.sh gpu acc bench" - - cluster: frontier - name: Oak Ridge | Frontier (CCE) - group: phoenix - labels: frontier - flag: f - device: gpu - interface: omp - build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" + # - cluster: frontier + # name: Oak Ridge | Frontier (CCE) + # group: phoenix + # labels: frontier + # flag: f + # device: gpu + # interface: omp + # build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" runs-on: group: ${{ matrix.group }} labels: ${{ matrix.labels }} @@ -55,7 +55,7 @@ jobs: uses: actions/checkout@v4 with: repository: MFlowCode/MFC - ref: ${{ env.BENCH_TAG }} + ref: master path: master - name: Checkout PR repo From 9626e6c6f1e09d6362e4a46a009e46e01ddbd520 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Tue, 16 Dec 2025 14:26:44 -0500 Subject: [PATCH 16/17] Configure Frontier cluster with OpenMP interface Added a new configuration for the Frontier cluster with OpenMP interface and updated the benchmark script call to include the interface parameter. --- .github/workflows/bench-frontier.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 4f2b950bb1..014463ef88 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -29,14 +29,14 @@ jobs: device: gpu interface: acc build_script: "bash .github/workflows/frontier/build.sh gpu acc bench" - # - cluster: frontier - # name: Oak Ridge | Frontier (CCE) - # group: phoenix - # labels: frontier - # flag: f - # device: gpu - # interface: omp - # build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" + - cluster: frontier + name: Oak Ridge | Frontier (CCE) + group: phoenix + labels: frontier + flag: f + device: gpu + interface: omp + build_script: "bash .github/workflows/frontier/build.sh gpu omp bench" runs-on: group: ${{ matrix.group }} labels: ${{ matrix.labels }} @@ -69,7 +69,7 @@ jobs: wait %1 - name: Bench (Master) - run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }} + run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.cluster }} - name: Print Logs if: always() From fa29525e9bcb5ca32c771e5ac45247fdf4f70a78 Mon Sep 17 00:00:00 2001 From: "Mohammed S. Al-Mahrouqi" <145478595+Malmahrouqi3@users.noreply.github.com> Date: Tue, 16 Dec 2025 18:33:32 -0500 Subject: [PATCH 17/17] Update bench-frontier.yml --- .github/workflows/bench-frontier.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bench-frontier.yml b/.github/workflows/bench-frontier.yml index 014463ef88..2a37e75e3d 100644 --- a/.github/workflows/bench-frontier.yml +++ b/.github/workflows/bench-frontier.yml @@ -4,6 +4,7 @@ concurrency: group: bench-frontier cancel-in-progress: false + on: push: pull_request: