Skip to content

Add Composition.set_random() #1369

Add Composition.set_random()

Add Composition.set_random() #1369

Workflow file for this run

name: C++ network
on: [pull_request, workflow_dispatch]
jobs:
compilation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install pynucastro
run: pip install .
- name: Get AMReX
run: |
mkdir external
cd external
git clone https://github.com/AMReX-Codes/amrex.git
cd amrex
git checkout development
echo 'AMREX_HOME=$(GITHUB_WORKSPACE)/external/amrex' >> $GITHUB_ENV
echo $AMREX_HOME
if [[ -n "${AMREX_HOME}" ]]; then exit 1; fi
cd ../..
- name: Get Microphysics
run: |
cd external
git clone https://github.com/AMReX-Astro/Microphysics.git
cd Microphysics
git checkout development
cd ../..
- name: Install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get -qq -y install curl cmake jq clang g++>=9.3.0
- name: Regenerate subch_approx network
run: |
cd external/Microphysics/networks/subch_approx
python subch_approx.py
- name: Compile burn_cell (subch_approx)
run: |
cd external/Microphysics/unit_test/burn_cell
make realclean
make NETWORK_DIR=subch_approx -j 4
- name: Run burn_cell (subch_approx)
run: |
cd external/Microphysics/unit_test/burn_cell
./main3d.gnu.ex inputs_subch_approx > test.out
- name: Compare to stored output (subch_approx)
run: |
cd external/Microphysics/unit_test/burn_cell
diff -I "^Initializing AMReX" -I "^AMReX" -I "^reading in reaclib rates" test.out ${GITHUB_WORKSPACE}/.github/workflows/microphysics-benchmarks/subch_approx_unit_test.out
- name: Regenerate ECSN network
run: |
cd external/Microphysics/networks/ECSN
python ecsn_network_generation.py
- name: Compile burn_cell (ECSN)
run: |
cd external/Microphysics/unit_test/burn_cell
make realclean
make NETWORK_DIR=ECSN -j 4
- name: Run burn_cell (ECSN)
run: |
cd external/Microphysics/unit_test/burn_cell
./main3d.gnu.ex inputs_ecsn > test.out
- name: Compare to stored output (ECSN)
run: |
cd external/Microphysics/unit_test/burn_cell
diff -I "^Initializing AMReX" -I "^AMReX" -I "^reading in reaclib rates" test.out ${GITHUB_WORKSPACE}/.github/workflows/microphysics-benchmarks/ecsn_unit_test.out
- name: Regenerate ase network
run: |
cd external/Microphysics/networks/ase
python ase.py
- name: Compile test_ase (NSE_NET, ase)
run: |
cd external/Microphysics/unit_test/test_ase
make realclean
make -j 4
- name: Run test_ase (NSE_NET, ase)
run: |
cd external/Microphysics/unit_test/test_ase
./main3d.gnu.ex inputs_ase > test.out
- name: Compare to stored output (NSE_NET, ase)
run: |
cd external/Microphysics/unit_test/test_ase
diff -I "^Initializing AMReX" -I "^AMReX" -I "^reading in reaclib rates" test.out ${GITHUB_WORKSPACE}/.github/workflows/microphysics-benchmarks/ase_nse_net_unit_test.out