Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into fci-auto-with-debug-h…
Browse files Browse the repository at this point in the history
…igher-order
  • Loading branch information
dschwoerer committed Jan 31, 2025
2 parents b3841fb + 1a002d2 commit e052c26
Show file tree
Hide file tree
Showing 179 changed files with 1,588 additions and 1,300 deletions.
43 changes: 8 additions & 35 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ jobs:
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_HYPRE=OFF
-DBOUT_USE_ADIOS2=ON
-DBOUT_ENABLE_PYTHON=ON
-DADIOS2_ROOT=/home/runner/local/adios2
-DADIOS2_ROOT=/home/runner/local
-DSUNDIALS_ROOT=/home/runner/local
-DPETSC_DIR=/home/runner/local/petsc
-DSLEPC_DIR=/home/runner/local/slepc"
Expand All @@ -74,6 +75,7 @@ jobs:
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_HYPRE=ON
-DSUNDIALS_ROOT=/home/runner/local"
on_cron: false

Expand All @@ -86,6 +88,7 @@ jobs:
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_HYPRE=ON
-DSUNDIALS_ROOT=/home/runner/local"
on_cron: false

Expand All @@ -97,6 +100,7 @@ jobs:
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_HYPRE=ON
-DBOUT_BUILD_DOCS=OFF
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2
Expand All @@ -110,6 +114,7 @@ jobs:
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_HYPRE=OFF
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local"
omp_num_threads: 2
Expand All @@ -123,32 +128,15 @@ jobs:
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_HYPRE=OFF
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local
-DPETSC_DIR=/home/runner/local/petsc
-DSLEPC_DIR=/home/runner/local/slepc"
build_petsc: -petsc
on_cron: false

- name: "Coverage"
os: ubuntu-latest
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Debug
-DCHECK=3
-DENABLE_COVERAGE=ON
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_HDF5=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_ENABLE_PYTHON=ON
-DSUNDIALS_ROOT=/home/runner/local"
unit_only: YES
on_cron: false
exclude:
# Don't run the coverage tests if the branch isn't master or next
- is_master_or_next: false
config:
name: "Coverage"
- is_cron: true
config:
on_cron: false
Expand Down Expand Up @@ -178,6 +166,7 @@ jobs:
slepc-dev
liblapack-dev
libparpack2-dev
libhypre-dev

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -210,22 +199,6 @@ jobs:
- name: Build BOUT++
run: UNIT_ONLY=${{ matrix.config.unit_only }} ./.ci_with_cmake.sh ${{ matrix.config.cmake_options }}

- name: Capture coverage
if: ${{ matrix.config.name == 'Coverage' }}
# Explicitly run the coverage capture target, because
# ci_script.sh also does the upload, and we're going to do
# that ourselves in the next step
run: |
# Ensure that there is a corresponding .gcda file for every .gcno file
# This is to try and make the coverage report slightly more accurate
# It still won't include, e.g. any solvers we don't build with though
find . -name "*.gcno" -exec sh -c 'touch -a "${1%.gcno}.gcda"' _ {} \;
make -C build code-coverage-capture
- name: Upload coverage
if: ${{ matrix.config.name == 'Coverage' }}
uses: codecov/codecov-action@v4

Fedora:
# This is its own job as it doesn't use most of the steps of the
# standard_tests
Expand Down
16 changes: 15 additions & 1 deletion bout++Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ elseif(EXISTS "@NCXX4_CONFIG@")
set(NCXX4_CONFIG "@NCXX4_CONFIG@")
elseif(EXISTS "@NCXX_BINARY_DIR@")
# If we downloaded netCDF-cxx4, then we need to add its build directory to our search paths
list(APPEND CMAKE_PREFIX_PATH "@NCXX_BINARY_DIR@")
list(APPEND CMAKE_PREFIX_PATH "@NCXX_BINARY_DIR@")
endif()
if(EXISTS "@PVODE_ROOT@")
set(PVODE_ROOT "@PVODE_ROOT@")
Expand All @@ -103,6 +103,12 @@ endif()
if(EXISTS "@Libuuid_ROOT@")
set(Libuuid_ROOT "@Libuuid_ROOT@")
endif()
if(EXISTS "@ADIOS2_ROOT@")
set(ADIOS2_ROOT "@ADIOS2_ROOT@")
elseif(EXISTS "@ADIOS2_BINARY_DIR@")
# If we downloaded ADIOS2, then we need to add its build directory to our search paths
list(APPEND CMAKE_PREFIX_PATH "@ADIOS2_BINARY_DIR@")
endif()

if(@BOUT_USE_SYSTEM_MPARK_VARIANT@)
set(mpark_variant_ROOT "@mpark_variant_ROOT@")
Expand All @@ -117,6 +123,11 @@ endif()

set(MPIEXEC_EXECUTABLE @MPIEXEC_EXECUTABLE@)
find_dependency(MPI @MPI_CXX_VERSION@ EXACT)
if (BOUT_HAS_ADIOS2 OR BOUT_HAS_HYPRE OR BOUT_HAS_SUNDIALS)
# These libraries may also require MPI_C
enable_language(C)
find_dependency(MPI COMPONENTS C)
endif()

if (BOUT_USE_OPENMP)
find_dependency(OpenMP)
Expand Down Expand Up @@ -158,5 +169,8 @@ endif()
if (BOUT_USE_UUID_SYSTEM_GENERATOR)
find_dependency(Libuuid)
endif()
if (BOUT_HAS_ADIOS2)
find_dependency(ADIOS2 @ADIOS2_VERSION@ EXACT)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/bout++Targets.cmake")
3 changes: 2 additions & 1 deletion cmake/FindHYPRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ include(FindPackageHandleStandardArgs)

find_package(HYPRE CONFIG QUIET)
if (HYPRE_FOUND)
message(STATUS "Found HYPRE: ${HYPRE_VERSION}")
return()
endif()

find_path(HYPRE_INCLUDE_DIR
NAMES HYPRE.h
DOC "HYPRE include directories"
REQUIRED
PATH_SUFFIXES include
PATH_SUFFIXES include include/hypre
)

find_library(HYPRE_LIBRARY
Expand Down
18 changes: 7 additions & 11 deletions cmake/SetupBOUTThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ endif()
message(STATUS "NetCDF support: ${BOUT_USE_NETCDF}")
set(BOUT_HAS_NETCDF ${BOUT_USE_NETCDF})

option(BOUT_USE_ADIOS2 "Enable support for ADIOS output" ON)
option(BOUT_USE_ADIOS2 "Enable support for ADIOS output" OFF)
option(BOUT_DOWNLOAD_ADIOS2 "Download and build ADIOS2" OFF)
if (BOUT_USE_ADIOS2)
enable_language(C)
find_package(MPI REQUIRED COMPONENTS C)

if (BOUT_DOWNLOAD_ADIOS2)
message(STATUS "Downloading and configuring ADIOS2")
include(FetchContent)
Expand All @@ -211,18 +214,11 @@ if (BOUT_USE_ADIOS2)
# Note: SST requires <rdma/fabric.h> but doesn't check at configure time
set(ADIOS2_USE_SST OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(adios2)
target_link_libraries(bout++ PUBLIC adios2::cxx11_mpi)
message(STATUS "ADIOS2 done configuring")
else()
find_package(ADIOS2)
if (ADIOS2_FOUND)
ENABLE_LANGUAGE(C)
find_package(MPI REQUIRED COMPONENTS C)
target_link_libraries(bout++ PUBLIC adios2::cxx11_mpi MPI::MPI_C)
else()
set(BOUT_USE_ADIOS2 OFF)
endif()
find_package(ADIOS2 REQUIRED)
endif()
target_link_libraries(bout++ PUBLIC adios2::cxx11_mpi MPI::MPI_C)
endif()
message(STATUS "ADIOS2 support: ${BOUT_USE_ADIOS2}")
set(BOUT_HAS_ADIOS2 ${BOUT_USE_ADIOS2})
Expand Down Expand Up @@ -282,7 +278,7 @@ if (BOUT_USE_SUNDIALS)
FetchContent_Declare(
sundials
GIT_REPOSITORY https://github.com/LLNL/sundials
GIT_TAG v7.0.0
GIT_TAG v7.2.1
)
# Note: These are settings for building SUNDIALS
set(EXAMPLES_ENABLE_C OFF CACHE BOOL "" FORCE)
Expand Down
20 changes: 11 additions & 9 deletions examples/6field-simple/data/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# settings file for BOUT++
# High-Beta reduced MHD case

##################################################
# Global settings used by the core code

nout = 100 # number of time-steps
timestep = 1.0 # time between outputs
wall_limit = 0.45 # wall time limit (in hours)

twistshift = true # use twist-shift condition?
Expand All @@ -17,7 +9,9 @@ zperiod = 15 # Fraction of a torus to simulate
MXG = 2
MYG = 2

grid = "cbm18_dens8.grid_nx68ny64.nc"
[mesh]

file = "cbm18_dens8.grid_nx68ny64.nc"

[mesh:paralleltransform]
type = shifted # Use shifted metric method
Expand Down Expand Up @@ -70,6 +64,14 @@ rtol = 1e-05 # relative tolerance
use_precon = false # Use preconditioner: User-supplied or BBD

mxstep = 10000 # Number of internal steps between outputs
output_step = 1.0 # time between outputs
# settings file for BOUT++
# High-Beta reduced MHD case

##################################################
# Global settings used by the core code

nout = 100 # number of time-steps

##################################################
# settings for high-beta reduced MHD
Expand Down
14 changes: 7 additions & 7 deletions examples/IMEX/advection-diffusion/data/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Settings for ImEx example case

##################################################
# settings used by the core code

nout = 50 # number of time-steps
timestep = 0.01 # time between outputs

periodicX = true # Make domain periodic in X

Expand Down Expand Up @@ -52,6 +45,13 @@ type = splitrk
timestep = 0.0001 # Internal timestep
nstages = 9 # Stages in RKL steps for diffusive component
adapt_period = 5 # Internal steps between accuracy checks
output_step = 0.01 # time between outputs
# Settings for ImEx example case

##################################################
# settings used by the core code

nout = 50 # number of time-steps

##################################################
# settings for split operator model
Expand Down
20 changes: 11 additions & 9 deletions examples/IMEX/advection-reaction/data/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# Settings for split operator test case

##################################################
# settings used by the core code

nout = 100 # number of time-steps
timestep = 0.01 # time between outputs

MZ = 64 # number of points in z direction (2^n)

grid = "simple_xz.nc"

NXPE = 1

periodicX = true # Make domain periodic in X

[mesh]

file = "simple_xz.nc"

##################################################
# derivative methods

Expand Down Expand Up @@ -45,6 +40,13 @@ flux = U1

type = splitrk
timestep = 0.0001
output_step = 0.01 # time between outputs
# Settings for split operator test case

##################################################
# settings used by the core code

nout = 100 # number of time-steps

##################################################
# settings for split operator model
Expand Down
8 changes: 5 additions & 3 deletions examples/IMEX/diffusion-nl/data/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

nout = 10
timestep = 1

alpha = 2.5 # Diffusion exponent: D = f ^ alpha

MXG = 0
Expand All @@ -22,3 +19,8 @@ ixseps2 = ny

scale = 1
function = 1 + 0.5*sin(y)

[solver]
output_step = 1

nout = 10
10 changes: 5 additions & 5 deletions examples/IMEX/drift-wave-constraint/data/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Drift wave test
# All variables in normalised units

timestep = 100
nout = 100

[mesh]

Expand All @@ -22,6 +17,11 @@ Ne0 = 1 + 0.1*(0.5 - x)

[solver]
type = imexbdf2
# Drift wave test
# All variables in normalised units

output_step = 100
nout = 100

[drift]
nu = 0.1
Expand Down
12 changes: 7 additions & 5 deletions examples/IMEX/drift-wave/data/BOUT.inp
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Drift wave test
# All variables in normalised units

timestep = 100
nout = 100

[mesh]

Expand Down Expand Up @@ -31,3 +26,10 @@ function = sin(y-z)
[Ne]
scale = 0
function = 0

[solver]
# Drift wave test
# All variables in normalised units

output_step = 100
nout = 100
Loading

0 comments on commit e052c26

Please sign in to comment.