Skip to content

Commit

Permalink
Update numerical_checks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
HanneThienpondt committed Sep 20, 2024
1 parent 108ea7d commit 72c8dbd
Showing 1 changed file with 124 additions and 60 deletions.
184 changes: 124 additions & 60 deletions .github/workflows/numerical_checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run these tests automatically on Github
# on every push and pull request.
name: NumericalTestsCookie
name: NumericalTests
on: [push, pull_request]

# We run the in a bash shell
Expand All @@ -14,18 +14,62 @@ defaults:
# initial steps: <Install dependencies>, <System information>
# Next, only the step corresponding to the test will be executed.
jobs:

# Build stella with Make in debug mode, here the python tests do not work!
# Specifically, the flush statement in mini_libstell's
# read_wout_mod.F module in the readw_and_open() routine breaks
# when reading a VMEC equilibirium during the python tests.
test1:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
strategy:
fail-fast: false
matrix:
config:
- name: "Make stella in debug mode"
steps:
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
gfortran
make
libfftw3-dev
libnetcdf-dev
libnetcdff-dev
netcdf-bin
python3
python3-pip
openmpi-bin
libopenmpi-dev

# Build stella with Make
compile-stella:
name: "Run stella and check the outputs numerically"
- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
- uses: actions/checkout@v2

- name: Build stella in debug mode
run: |
set -ex
export STELLA_SYSTEM=gnu_ubuntu_debug
git submodule update --init --recursive
make -I Makefiles -j12
# Build stella with Make and run automatic fortran tests
test2:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np

strategy:
fail-fast: false
matrix:
config:
- name: "Perform fortran tests of the stella code"
steps:

# Install packages needed for stella compilation
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
Expand All @@ -40,54 +84,44 @@ jobs:
openmpi-bin
libopenmpi-dev

# Check the system information
- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
# Check $GITHUB_WORKSPACE
- name: Check GITHUB_WORKSPACE
run: pwd && ls -la

# Check-out repository under $GITHUB_WORKSPACE
- name: Check out repository
uses: actions/checkout@v4

# Check $GITHUB_WORKSPACE
- name: Check GITHUB_WORKSPACE
run: pwd && ls -la
- uses: actions/checkout@v2

# Compile stella
- name: Build stella
- name: Build stella
run: |
set -ex
export STELLA_SYSTEM=gnu_ubuntu
git submodule update --init --recursive
make -I Makefiles -j12
# Upload stella
- name: Upload stella
uses: actions/upload-artifact@v4
with:
event-type: event-compiled-stella
name: stella-executable
path: stella
retention-days: 1
- name: Build pFUnit library
run: |
set -ex
export STELLA_SYSTEM=gnu_ubuntu
make -I Makefiles -j4 build-pfunit-library
# Run automatic python tests, after stella has been compiled
numerical-tests:
name: "Run stella and check the outputs numerically"
needs: compile-stella
- name: Perform automated Fortran tests
run: |
set -ex
export STELLA_SYSTEM=gnu_ubuntu
make -I Makefiles -j4 run-automated-fortran-tests
# Build stella with Make and run automatic python tests
test3:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np

strategy:
fail-fast: false
matrix:
config:
- name: "Run stella and check the outputs numerically"
steps:

# Install packages needed for stella compilation
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
Expand All @@ -101,37 +135,67 @@ jobs:
python3-pip
openmpi-bin
libopenmpi-dev

# Check $GITHUB_WORKSPACE
- name: Check GITHUB_WORKSPACE
run: pwd && ls -la

# Check-out repository under $GITHUB_WORKSPACE
- name: Check out repository
uses: actions/checkout@v2

# Check $GITHUB_WORKSPACE
- name: Check GITHUB_WORKSPACE
run: pwd && ls -la

# Install python environment
- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
- uses: actions/checkout@v2

- name: Install automated stella test dependencies
run: pip3 install --user -r AUTOMATIC_TESTS/requirements.txt

# Download stella
- name: Download stella
uses: actions/download-artifact@v4
with:
name: stella-executable

# Check $GITHUB_WORKSPACE
- name: Check GITHUB_WORKSPACE
run: pwd && ls -la
- name: Build stella
run: |
set -ex
export STELLA_SYSTEM=gnu_ubuntu
git submodule update --init --recursive
make -I Makefiles -j12
# Perform python tests
- name: Perform numerical tests for stella with Python
run: |
set -ex
export STELLA_SYSTEM=gnu_ubuntu
make -I Makefiles numerical-tests
# Build stella with CMake and run automatic Fortran tests
# Cmake has to run on 1 node or it will run into parallelisation errors
test4:
runs-on: ubuntu-latest
env:
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
strategy:
fail-fast: false
matrix:
config:
- name: "CMake stella"
steps:
- name: Install dependencies
run: sudo apt update &&
sudo apt install -y
gfortran
make
libfftw3-dev
libnetcdf-dev
libnetcdff-dev
netcdf-bin
python3
python3-pip
openmpi-bin
libopenmpi-dev

- name: System information
run: |
cat /etc/*release
gfortran --version
nf-config --all
- uses: actions/checkout@v2

- name: Build stella (CMake)
run: |
set -ex
git submodule update --init --recursive
cmake . -B COMPILATION/build_cmake -DSTELLA_ENABLE_TESTS=on
cmake --build COMPILATION/build_cmake -j12 --target check

0 comments on commit 72c8dbd

Please sign in to comment.