Skip to content

Merge pull request #445 from mabarnes/correct_heat_flux_bc_coll_krook #347

Merge pull request #445 from mabarnes/correct_heat_flux_bc_coll_krook

Merge pull request #445 from mabarnes/correct_heat_flux_bc_coll_krook #347

Workflow file for this run

# Run all tests, which can take a long time
name: Long tests
# Only run when commits are added to master branch
on:
push:
branches:
- master
workflow_dispatch:
permissions:
actions: write
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
fail-fast: false
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1.11'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
with:
project: 'moment_kinetics/'
# The following is copied and simplified from
# https://github.com/julia-actions/julia-runtest/blob/master/action.yml
# in order to pass customised arguments to `Pkg.test()`
- run: |
# Currently (17/11/2025) having issues with using 'too many communicators' in longtest.yml when using the default MPICH_jll. To avoid this, use OpenMPI_jll instead.
julia --project=moment_kinetics/ -e 'import Pkg; Pkg.add("MPIPreferences"); using MPIPreferences; MPIPreferences.use_jll_binary("OpenMPI_jll")'
julia --color=yes --depwarn=yes --project=moment_kinetics/ -e 'import Pkg; Pkg.test(; test_args=["--ci", "--long", "--force-optional-dependencies"], julia_args=["--check-bounds=auto"])'
shell: bash
parallel-test:
runs-on: ubuntu-latest
timeout-minutes: 270
strategy:
matrix:
numprocs: [3, 4]
include:
- numprocs: 3
soimage: ""
- numprocs: 4
soimage: "-J moment_kinetics.so"
fail-fast: false
# Only run 3 and 4 proc tests when merging to master.
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1.11'
arch: x64
- uses: julia-actions/cache@v2
- run: |
touch Project.toml
julia --project -O3 -e 'import Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_jll_binary("OpenMPI_jll")'
julia --project -O3 -e 'using MPI; MPI.install_mpiexecjl(; destdir=".")'
julia --project -O3 -e 'import Pkg; Pkg.add(["NCDatasets", "Random", "SpecialFunctions", "StatsBase", "Test"]); Pkg.develop(path="moment_kinetics/")'
julia --project -O3 -e 'import Pkg; Pkg.precompile()'
- if: ${{ matrix.numprocs == 4 }}
run: |
julia --project -O3 -e 'import Pkg; Pkg.add(["PackageCompiler"])'
julia --project -O3 precompile.jl
- run: |
# Need to use openmpi so that we can use `--oversubscribe` to allow using more MPI ranks than physical cores
./mpiexecjl -np ${{ matrix.numprocs }} --oversubscribe julia --project ${{ matrix.soimage }} -O3 moment_kinetics/test/runtests.jl --ci --debug 1 --long
# Note: MPI.jl's default implementation is mpich, which has a similar option
# `--with-device=ch3:sock`, but that needs to be set when compiling mpich.
shell: bash