Skip to content
Open

spack #1025

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cd08efe
feat: Add Homebrew and Spack package definitions
sbryngelson Nov 4, 2025
4a823f9
chore: Remove Homebrew files (Spack-only branch)
sbryngelson Nov 4, 2025
ce041fd
docs: Consolidate Spack documentation into single file
sbryngelson Nov 4, 2025
26e8faf
chore: Remove README/CITATION changes and issue templates
sbryngelson Nov 4, 2025
190fa24
refactor: Move Spack files to packaging/spack/ directory
sbryngelson Nov 4, 2025
d7ba036
docs: Update README to match latest upstream version
sbryngelson Nov 4, 2025
ce081e3
Merge branch 'MFlowCode:master' into spack-package
sbryngelson Nov 4, 2025
5052bc6
clean
sbryngelson Nov 4, 2025
ed508dc
Create bug_report.md
sbryngelson Nov 4, 2025
aeaf2c3
fix
sbryngelson Nov 4, 2025
fb7a473
fix
sbryngelson Nov 4, 2025
eed3c12
add ci
sbryngelson Nov 4, 2025
e944b35
Add CI workflow for Spack package testing
sbryngelson Nov 4, 2025
05c6c4a
Fix Spack repo paths in CI workflow
sbryngelson Nov 4, 2025
c3864d3
Add explicit CMakePackage import to Spack package
sbryngelson Nov 4, 2025
63f2f7d
Use standard Spack import pattern
sbryngelson Nov 4, 2025
0ca22e5
Fix Spack CI by installing into builtin repo
sbryngelson Nov 4, 2025
db177a9
Fix Spack style issues - line length formatting
sbryngelson Nov 4, 2025
be6f625
commit
sbryngelson Nov 4, 2025
fb6f3f4
Fix Spack CI to use dynamic builtin repo location
sbryngelson Nov 4, 2025
3b9ac3c
Fix CMakePackage import for builtin repo
sbryngelson Nov 4, 2025
5859905
Skip flake8 F405 warnings in Spack style check
sbryngelson Nov 4, 2025
e6a2af1
fix
sbryngelson Nov 4, 2025
74ac7e8
fix
sbryngelson Nov 4, 2025
c7394e8
Remove style check from Spack CI
sbryngelson Nov 4, 2025
14491cd
Add style check back with -s flake8 flag
sbryngelson Nov 4, 2025
a2cfdb3
Add functional test for Spack package installation
sbryngelson Nov 4, 2025
c93d78f
Optimize Spack CI with binary cache and system packages
sbryngelson Nov 4, 2025
cc5e285
Fix Spack binary cache to allow source fallback
sbryngelson Nov 4, 2025
72790d4
Add caching and fix build issues in Spack CI
sbryngelson Nov 5, 2025
d35285e
Fix: Test v5.1.0 release instead of master branch
sbryngelson Nov 5, 2025
c91fa8c
Remove timeouts from Spack CI build steps
sbryngelson Nov 5, 2025
3167753
Add cache status indicator to Spack CI
sbryngelson Nov 5, 2025
c1742a2
Fix parallel build race condition in Spack package
sbryngelson Nov 5, 2025
3d95fed
Use MFC master branch for Spack CI testing
sbryngelson Nov 5, 2025
e0c9358
Add patch to fix chemistry-disabled build
sbryngelson Nov 5, 2025
e55c0ec
Remove parallel=False workaround
sbryngelson Nov 5, 2025
12b7aad
Copy patch files to Spack builtin repo
sbryngelson Nov 5, 2025
2b19c4a
Copy patch files in ALL workflow jobs
sbryngelson Nov 5, 2025
d00c3d5
Fix malformed patch file
sbryngelson Nov 5, 2025
e46659b
Remove problematic patch and add Cantera dependency to Spack package
sbryngelson Nov 5, 2025
c341252
Remove py-cantera dependency - not available in Spack builtin repo
sbryngelson Nov 6, 2025
a18b712
Add chemistry support to MFC with Spack compatibility
sbryngelson Nov 6, 2025
44fd439
Fix linting issues in gen_thermochem.py
sbryngelson Nov 6, 2025
959fc79
format
sbryngelson Nov 6, 2025
6d85023
Fix Fypp chemistry boolean interpretation
sbryngelson Nov 6, 2025
63c37e7
Use os.path.join instead of join_path in Spack package
sbryngelson Nov 6, 2025
5296325
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
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
119 changes: 0 additions & 119 deletions .github/workflows/bench.yml

This file was deleted.

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"
Loading
Loading