Skip to content
Closed

spack #1025

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3b05373
feat: Add Homebrew and Spack package definitions
sbryngelson Nov 4, 2025
2e0ca74
chore: Remove Homebrew files (Spack-only branch)
sbryngelson Nov 4, 2025
b60cb1b
docs: Consolidate Spack documentation into single file
sbryngelson Nov 4, 2025
af8d80f
chore: Remove README/CITATION changes and issue templates
sbryngelson Nov 4, 2025
8e041d3
refactor: Move Spack files to packaging/spack/ directory
sbryngelson Nov 4, 2025
b25c661
docs: Update README to match latest upstream version
sbryngelson Nov 4, 2025
e3bdd58
clean
sbryngelson Nov 4, 2025
0b73f9f
Create bug_report.md
sbryngelson Nov 4, 2025
3db35a1
fix
sbryngelson Nov 4, 2025
b28e354
fix
sbryngelson Nov 4, 2025
230f6db
add ci
sbryngelson Nov 4, 2025
95b6015
Add CI workflow for Spack package testing
sbryngelson Nov 4, 2025
137fc33
Fix Spack repo paths in CI workflow
sbryngelson Nov 4, 2025
ba537dc
Add explicit CMakePackage import to Spack package
sbryngelson Nov 4, 2025
1a9115b
Use standard Spack import pattern
sbryngelson Nov 4, 2025
8fe4a23
Fix Spack CI by installing into builtin repo
sbryngelson Nov 4, 2025
b5e2ce2
Fix Spack style issues - line length formatting
sbryngelson Nov 4, 2025
a8b69d7
commit
sbryngelson Nov 4, 2025
595c1fd
Fix Spack CI to use dynamic builtin repo location
sbryngelson Nov 4, 2025
c500826
Fix CMakePackage import for builtin repo
sbryngelson Nov 4, 2025
a259fe7
Skip flake8 F405 warnings in Spack style check
sbryngelson Nov 4, 2025
1ca57f4
Remove style check from Spack CI
sbryngelson Nov 4, 2025
7118761
Add style check back with -s flake8 flag
sbryngelson Nov 4, 2025
1b86324
Add functional test for Spack package installation
sbryngelson Nov 4, 2025
a7fa260
Optimize Spack CI with binary cache and system packages
sbryngelson Nov 4, 2025
709a2e3
Fix Spack binary cache to allow source fallback
sbryngelson Nov 4, 2025
2ad416b
Add caching and fix build issues in Spack CI
sbryngelson Nov 5, 2025
1c32a35
Fix: Test v5.1.0 release instead of master branch
sbryngelson Nov 5, 2025
2a264a9
Remove timeouts from Spack CI build steps
sbryngelson Nov 5, 2025
1b8a1c4
Add cache status indicator to Spack CI
sbryngelson Nov 5, 2025
388a6d4
Fix parallel build race condition in Spack package
sbryngelson Nov 5, 2025
3980eb4
Use MFC master branch for Spack CI testing
sbryngelson Nov 5, 2025
5e1dcb7
Add patch to fix chemistry-disabled build
sbryngelson Nov 5, 2025
8fed1a2
Remove parallel=False workaround
sbryngelson Nov 5, 2025
1487687
Copy patch files to Spack builtin repo
sbryngelson Nov 5, 2025
0549933
Copy patch files in ALL workflow jobs
sbryngelson Nov 5, 2025
8c1857e
Fix malformed patch file
sbryngelson Nov 5, 2025
dca375a
Remove problematic patch and add Cantera dependency to Spack package
sbryngelson Nov 5, 2025
0846330
Remove py-cantera dependency - not available in Spack builtin repo
sbryngelson Nov 6, 2025
edff810
Add chemistry support to MFC with Spack compatibility
sbryngelson Nov 6, 2025
ebede1d
Fix linting issues in gen_thermochem.py
sbryngelson Nov 6, 2025
4363722
format
sbryngelson Nov 6, 2025
89bf301
Fix Fypp chemistry boolean interpretation
sbryngelson Nov 6, 2025
b017821
Use os.path.join instead of join_path in Spack package
sbryngelson Nov 6, 2025
abc3508
Fix Fypp chemistry flag evaluation by setting it locally
sbryngelson Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/file-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fortran_src: &fortran_src
python_src: &python_src
- '**/*.py'
- 'toolchain/pyproject.toml'
- '!packaging/**'

cmakelist: &cmakelist
- 'CMakeLists.txt'
Expand Down
214 changes: 214 additions & 0 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
name: 'Spack Package'

on:
push:
paths:
- 'packaging/spack/**'
- '.github/workflows/spack.yml'
pull_request:
paths:
- 'packaging/spack/**'
- '.github/workflows/spack.yml'
workflow_dispatch:

jobs:
lint:
name: Spack Lint & Style Check
runs-on: ubuntu-latest
steps:
- name: Checkout MFC
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install Spack
run: |
git clone --depth=1 https://github.com/spack/spack.git
echo "${GITHUB_WORKSPACE}/spack/bin" >> $GITHUB_PATH

- name: Setup Spack
run: |
. spack/share/spack/setup-env.sh
spack compiler find

- name: Install Package into Spack
run: |
. spack/share/spack/setup-env.sh
# Find the actual builtin repo location
BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}')
echo "Builtin repo location: $BUILTIN_REPO"
# Copy package file to the builtin repo
mkdir -p "$BUILTIN_REPO/packages/mfc"
cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/"
# Verify package is visible
spack list mfc
# Show package info to confirm it loads
spack info mfc

- name: Run Spack Style Check
run: |
. spack/share/spack/setup-env.sh
# Skip flake8 F405 warnings which are expected for star imports in Spack packages
spack style -s flake8 packaging/spack/package.py

- name: Run Spack Audit
run: |
. spack/share/spack/setup-env.sh
spack audit packages mfc

- name: Verify Package Info
run: |
. spack/share/spack/setup-env.sh
spack info mfc

test-spec:
name: Test Package Spec
runs-on: ubuntu-latest
steps:
- name: Checkout MFC
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install Spack
run: |
git clone --depth=1 https://github.com/spack/spack.git
echo "${GITHUB_WORKSPACE}/spack/bin" >> $GITHUB_PATH

- name: Setup Spack
run: |
. spack/share/spack/setup-env.sh
spack compiler find

- name: Install Package into Spack
run: |
. spack/share/spack/setup-env.sh
# Find the actual builtin repo location
BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}')
echo "Builtin repo location: $BUILTIN_REPO"
# Copy package file to the builtin repo
mkdir -p "$BUILTIN_REPO/packages/mfc"
cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/"
# Verify package is visible
spack list mfc
# Show package info to confirm it loads
spack info mfc

- name: Test Default Spec
run: |
. spack/share/spack/setup-env.sh
spack spec mfc

- name: Test Minimal Spec
run: |
. spack/share/spack/setup-env.sh
spack spec mfc~mpi~post_process

test-install:
name: Test Installation & Execution
# Only run on pull requests or manual workflow dispatch to save CI time
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout MFC
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gfortran cmake libopenblas-dev libfftw3-dev libhdf5-dev

- name: Install Spack
run: |
git clone --depth=1 https://github.com/spack/spack.git
echo "${GITHUB_WORKSPACE}/spack/bin" >> $GITHUB_PATH

- name: Setup Spack with Binary Cache
run: |
. spack/share/spack/setup-env.sh
spack compiler find
# Add binary cache mirror for pre-built packages
spack mirror add binary_mirror https://binaries.spack.io/v0.23.1
spack buildcache keys --install --trust
# Mark system packages as external to avoid building
spack external find --not-buildable cmake python perl gfortran gcc
spack config add "packages:all:target:[x86_64]"

- name: Cache Spack Dependencies
id: spack-cache
uses: actions/cache@v4
with:
path: |
spack/opt/spack
spack/var/spack/cache
key: spack-deps-${{ runner.os }}-${{ hashFiles('packaging/spack/package.py') }}
restore-keys: |
spack-deps-${{ runner.os }}-

- name: Check Cache Status
run: |
if [ "${{ steps.spack-cache.outputs.cache-hit }}" == "true" ]; then
echo "✓ Cache hit! Dependencies already built."
. spack/share/spack/setup-env.sh
spack find
else
echo "⚠ Cache miss. Will build dependencies from source (~30-40 min)."
fi

- name: Install Package into Spack
run: |
. spack/share/spack/setup-env.sh
# Find the actual builtin repo location
BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}')
echo "Builtin repo location: $BUILTIN_REPO"
# Copy package file to the builtin repo
mkdir -p "$BUILTIN_REPO/packages/mfc"
cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/"
# Verify package is visible
spack list mfc

- name: Install MFC Dependencies
run: |
. spack/share/spack/setup-env.sh
# Install just the dependencies first (these are cached)
spack install --show-log-on-error --only dependencies mfc@master~mpi~post_process

- name: Install MFC via Spack
run: |
. spack/share/spack/setup-env.sh
# Install MFC itself (dependencies are already installed/cached)
spack install --show-log-on-error mfc@master~mpi~post_process

- name: Test MFC Execution
run: |
. spack/share/spack/setup-env.sh
spack load mfc
# Verify binaries are available
which pre_process
which simulation
echo "✓ Binaries found"
# Create test directory
mkdir -p test_run
cd test_run
# Copy example case
cp ../examples/1D_sodshocktube/case.py .
# Generate case configuration
python3 case.py > case.json
echo "✓ Generated case configuration"
# Run pre_process
pre_process < case.json
echo "✓ Pre-processing completed"
# Run simulation (just 1 step to verify it works)
simulation
echo "✓ Simulation completed"
94 changes: 13 additions & 81 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "Multicomponent Flow Code (MFC)"
title: "Multicomponent Flow Code"
url: "https://github.com/MFlowCode/MFC"
preferred-citation:
type: article
Expand All @@ -13,83 +13,15 @@ preferred-citation:
doi: "10.48550/arXiv.2503.07953"
year: 2025
authors:
- given-names: Benjamin
family-names: Wilfong
- given-names: Henry
family-names: Le Berre
- given-names: Anand
family-names: Radhakrishnan
- given-names: Ansh
family-names: Gupta
- given-names: Diego
family-names: Vaca-Revelo
- given-names: Dimitrios
family-names: Adam
- given-names: Haocheng
family-names: Yu
- given-names: Hyeoksu
family-names: Lee
- given-names: Jose Rodolfo
family-names: Chreim
- given-names: Mirelys
family-names: Carcana Barbosa
- given-names: Yanjun
family-names: Zhang
- given-names: Esteban
family-names: Cisneros-Garibay
- given-names: Aswin
family-names: Gnanaskandan
- given-names: Mauro
family-names: Rodriguez Jr.
- given-names: Reuben D.
family-names: Budiardja
- given-names: Stephen
family-names: Abbott
- given-names: Tim
family-names: Colonius
- given-names: Spencer H.
family-names: Bryngelson
references:
- type: article
title: "Method for portable, scalable, and performant GPU-accelerated simulation of multiphase compressible flow"
doi: "10.1016/j.cpc.2024.109238"
journal: "Computer Physics Communications"
volume: 302
start: 109238
year: 2024
authors:
- given-names: A.
family-names: Radhakrishnan
- given-names: H.
family-names: Le Berre
- given-names: B.
family-names: Wilfong
- given-names: J.-S.
family-names: Spratt
- given-names: M.
family-names: Rodriguez Jr.
- given-names: T.
family-names: Colonius
- given-names: S. H.
family-names: Bryngelson
- type: article
title: "MFC: An open-source high-order multi-component, multi-phase, and multi-scale compressible flow solver"
doi: "10.1016/j.cpc.2020.107396"
journal: "Computer Physics Communications"
volume: 266
start: 107396
month: 5
year: 2021
authors:
- given-names: Spencer H.
family-names: Bryngelson
- given-names: Kevin
family-names: Schmidmayer
- given-names: Vedran
family-names: Coralic
- given-names: Jomela C.
family-names: Meng
- given-names: Kazuki
family-names: Maeda
- given-names: Tim
family-names: Colonius
- given-names: Spencer H.
family-names: Bryngelson
- given-names: Kevin
family-names: Schmidmayer
- given-names: Vedran
family-names: Coralic
- given-names: Jomela C.
family-names: Meng
- given-names: Kazuki
family-names: Maeda
- given-names: Tim
family-names: Colonius
Loading
Loading