Skip to content

Commit

Permalink
Merge branch 'par-bc-cleanup' into par-bc-improve
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwoerer committed Feb 7, 2024
2 parents d7e624e + b63c033 commit 0dcd257
Show file tree
Hide file tree
Showing 106 changed files with 2,638 additions and 701 deletions.
62 changes: 62 additions & 0 deletions .build_adios2_for_ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

set -e

if test $BUILD_ADIOS2 ; then
if [[ ! -d $HOME/local/adios/include/adios2.h ]] || test $1 ; then
echo "****************************************"
echo "Building ADIOS2"
echo "****************************************"

branch=${1:-release_29}
if [ ! -d adios2 ]; then
git clone -b $branch https://github.com/ornladios/ADIOS2.git adios2 --depth=1
fi

pushd adios2
rm -rf build
mkdir -p build
pushd build

cmake .. \
-DCMAKE_INSTALL_PREFIX=$HOME/local \
-DADIOS2_USE_MPI=ON \
-DADIOS2_USE_Fortran=OFF \
-DADIOS2_USE_Python=OFF \
-DADIOS2_BUILD_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DADIOS2_USE_SST=OFF \
-DADIOS2_USE_MGARD=OFF \
-DADIOS2_USE_HDF5=OFF \
-DADIOS2_USE_BZip2=OFF \
-DADIOS2_USE_Blosc2=OFF \
-DADIOS2_USE_SZ=OFF \
-DADIOS2_USE_ZFP=OFF \
-DADIOS2_USE_DAOS=OFF \
-DADIOS2_USE_UCX=OFF \
-DADIOS2_USE_LIBPRESSIO=OFF \
-DADIOS2_USE_Sodium=OFF \
-DADIOS2_USE_ZeroMQ=OFF \
-DADIOS2_USE_MHS=OFF \
-DADIOS2_USE_DataMan=OFF

make -j 4 && make install
popd

echo "****************************************"
echo " Finished building ADIOS2"
echo "****************************************"

else

echo "****************************************"
echo " ADIOS2 already installed"
echo "****************************************"
fi
else
echo "****************************************"
echo " ADIOS2 not requested"
echo "****************************************"
fi
1 change: 1 addition & 0 deletions .ci_fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ else
. /etc/profile.d/modules.sh
module load mpi/${1}-x86_64
export OMPI_MCA_rmaps_base_oversubscribe=yes
export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe
export TRAVIS=true
export FLEXIBLAS=NETLIB
cd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# the unit tests until they're fixed or ignored upstream
exclude: "tests/unit/*cxx"
cmake_command: |
pip install cmake && \
pip install --break-system-packages cmake && \
cmake --version && \
git config --global --add safe.directory "$GITHUB_WORKSPACE" && \
cmake . -B build -DBUILD_SHARED_LIBS=ON \
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
OMP_NUM_THREADS: ${{ matrix.config.omp_num_threads }}
PYTHONPATH: ${{ github.workspace }}/tools/pylib
OMPI_MCA_rmaps_base_oversubscribe: yes
PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe"
MPIRUN: mpiexec -np
strategy:
fail-fast: true
Expand All @@ -38,20 +39,23 @@ jobs:
is_cron:
- ${{ github.event_name == 'cron' }}
config:
- name: "CMake, PETSc unreleased"
- name: "CMake, PETSc unreleased, ADIOS"
os: ubuntu-20.04
cmake_options: "-DBUILD_SHARED_LIBS=ON
-DBOUT_ENABLE_METRIC_3D=ON
-DBOUT_ENABLE_OPENMP=ON
-DBOUT_USE_PETSC=ON
-DBOUT_USE_SLEPC=ON
-DBOUT_USE_SUNDIALS=ON
-DBOUT_USE_ADIOS2=ON
-DBOUT_ENABLE_PYTHON=ON
-DADIOS2_ROOT=/home/runner/local/adios2
-DSUNDIALS_ROOT=/home/runner/local
-DPETSC_DIR=/home/runner/local/petsc
-DSLEPC_DIR=/home/runner/local/slepc"
build_petsc: -petsc-main
build_petsc_branch: main
build_adios2: true
on_cron: true

- name: "Default options, Ubuntu 20.04"
Expand Down Expand Up @@ -185,9 +189,8 @@ jobs:

- name: Install pip packages
run: |
./.pip_install_for_ci.sh 'cython~=0.29' 'netcdf4~=1.5' 'sympy~=1.5' 'gcovr' 'cmake' zoidberg fastcov
# Add the pip install location to the runner's PATH
echo ~/.local/bin >> $GITHUB_PATH
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
- name: Cache SUNDIALS build
uses: actions/cache@v3
Expand All @@ -201,6 +204,9 @@ jobs:
- name: Build PETSc
run: BUILD_PETSC=${{ matrix.config.build_petsc }} ./.build_petsc_for_ci.sh ${{ matrix.config.build_petsc_branch }}

- name: Build ADIOS2
run: BUILD_ADIOS2=${{ matrix.config.build_adios2 }} ./.build_adios2_for_ci.sh

- name: Build BOUT++
run: UNIT_ONLY=${{ matrix.config.unit_only }} ./.ci_with_cmake.sh ${{ matrix.config.cmake_options }}

Expand Down
20 changes: 0 additions & 20 deletions .pip_install_for_ci.sh

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
### Breaking changes

- The autotools `./configure` build system has been removed
- Parsing of booleans has changed [\#2828][https://github.com/boutproject/BOUT-dev/pull/2828] ([bendudson][https://github.com/bendudson]).
See the [manual page](https://bout-dev.readthedocs.io/en/stable/user_docs/bout_options.html#boolean-expressions) for details.


## [v5.1.0](https://github.com/boutproject/BOUT-dev/tree/v5.1.0)
Expand Down
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function(bout_update_submodules)
endfunction()

set(BOUT_SOURCES
./include/bout/adios_object.hxx
./include/bout/array.hxx
./include/bout/assert.hxx
./include/bout/boundary_factory.hxx
Expand Down Expand Up @@ -146,7 +147,7 @@ set(BOUT_SOURCES
./include/bout/openmpwrap.hxx
./include/bout/operatorstencil.hxx
./include/bout/options.hxx
./include/bout/options_netcdf.hxx
./include/bout/options_io.hxx
./include/bout/optionsreader.hxx
./include/bout/output.hxx
./include/bout/output_bout_types.hxx
Expand Down Expand Up @@ -325,6 +326,7 @@ set(BOUT_SOURCES
./src/solver/impls/split-rk/split-rk.cxx
./src/solver/impls/split-rk/split-rk.hxx
./src/solver/solver.cxx
./src/sys/adios_object.cxx
./src/sys/bout_types.cxx
./src/sys/boutcomm.cxx
./src/sys/boutexception.cxx
Expand All @@ -338,7 +340,11 @@ set(BOUT_SOURCES
./src/sys/options/optionparser.hxx
./src/sys/options/options_ini.cxx
./src/sys/options/options_ini.hxx
./src/sys/options/options_io.cxx
./src/sys/options/options_netcdf.cxx
./src/sys/options/options_netcdf.hxx
./src/sys/options/options_adios.cxx
./src/sys/options/options_adios.hxx
./src/sys/optionsreader.cxx
./src/sys/output.cxx
./src/sys/petsclib.cxx
Expand Down Expand Up @@ -462,7 +468,7 @@ set_target_properties(bout++ PROPERTIES
# Set some variables for the bout-config script
set(CONFIG_LDFLAGS "${CONFIG_LDFLAGS} -L\$BOUT_LIB_PATH -lbout++")
set(BOUT_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(CONFIG_CFLAGS "${CONFIG_CFLAGS} -I\${BOUT_INCLUDE_PATH} -I${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CXX_FLAGS}")
set(CONFIG_CFLAGS "${CONFIG_CFLAGS} -I\${BOUT_INCLUDE_PATH} -I${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CXX_FLAGS} -std=c++17")

target_compile_features(bout++ PUBLIC cxx_std_17)
set_target_properties(bout++ PROPERTIES CXX_EXTENSIONS OFF)
Expand Down Expand Up @@ -930,6 +936,7 @@ message("
SUNDIALS support : ${BOUT_HAS_SUNDIALS}
HYPRE support : ${BOUT_HAS_HYPRE}
NetCDF support : ${BOUT_HAS_NETCDF}
ADIOS support : ${BOUT_HAS_ADIOS}
FFTW support : ${BOUT_HAS_FFTW}
LAPACK support : ${BOUT_HAS_LAPACK}
OpenMP support : ${BOUT_USE_OPENMP}
Expand Down
77 changes: 13 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ For example, the following set of equations for magnetohydrodynamics
(MHD):

![ddt_rho](http://latex.codecogs.com/png.latex?%5Cfrac%7B%5Cpartial%20%5Crho%7D%7B%5Cpartial%20t%7D%20%3D%20-%5Cmathbf%7Bv%7D%5Ccdot%5Cnabla%5Crho%20-%20%5Crho%5Cnabla%5Ccdot%5Cmathbf%7Bv%7D)

![ddt_p](http://latex.codecogs.com/png.latex?%5Cfrac%7B%5Cpartial%20p%7D%7B%5Cpartial%20t%7D%20%3D%20-%5Cmathbf%7Bv%7D%5Ccdot%5Cnabla%20p%20-%20%5Cgamma%20p%5Cnabla%5Ccdot%5Cmathbf%7Bv%7D)

![ddt_v](http://latex.codecogs.com/png.latex?%5Cfrac%7B%5Cpartial%20%5Cmathbf%7Bv%7D%7D%7B%5Cpartial%20t%7D%20%3D%20-%5Cmathbf%7Bv%7D%5Ccdot%5Cnabla%5Cmathbf%7Bv%7D%20+%20%5Cfrac%7B1%7D%7B%5Crho%7D%28-%5Cnabla%20p%20+%20%28%5Cnabla%5Ctimes%5Cmathbf%7BB%7D%29%5Ctimes%5Cmathbf%7BB%7D%29)

![ddt_B](http://latex.codecogs.com/png.latex?%7B%7B%5Cfrac%7B%5Cpartial%20%5Cmathbf%7BB%7D%7D%7B%5Cpartial%20t%7D%7D%7D%20%3D%20%5Cnabla%5Ctimes%28%5Cmathbf%7Bv%7D%5Ctimes%5Cmathbf%7BB%7D%29)

can be written simply as:
Expand All @@ -43,7 +46,7 @@ The full code for this example can be found in the [orszag-tang
example](examples/orszag-tang/mhd.cxx).
Jointly developed by University of York (UK), LLNL, CCFE, DCU, DTU,
and other international partners.
and other international partners. See the Git logs for author details.
Homepage found at [http://boutproject.github.io/](http://boutproject.github.io/)
Expand All @@ -52,7 +55,6 @@ Homepage found at [http://boutproject.github.io/](http://boutproject.github.io/)
* [Requirements](#requirements)
* [Usage and installation](#usage-and-installation)
* [Terms of use](#terms-of-use)
* [Overview of files](#overview-of-files)
* [Contributing](#contributing)
* [License](#license)
Expand All @@ -66,18 +68,17 @@ BOUT++ needs the following:
BOUT++ has the following optional dependencies:
* FFTW3 (strongly recommended!)
* OpenMP
* PETSc
* SLEPc
* ARKODE
* IDA
* CVODE
* [FFTW3](https://www.fftw.org/) (strongly recommended!)
* [SUNDIALS](https://computing.llnl.gov/projects/sundials): CVODE, IDA, ARKODE
* [PETSc](https://petsc.org)
* [ADIOS2](https://adios2.readthedocs.io/)
* [SLEPc](https://slepc.upv.es/)
* LAPACK
* OpenMP
* Score-p (for performance diagnostics)
## Usage and installation
Please see the [users manual](http://bout-dev.readthedocs.io)
Please see the [users manual](http://bout-dev.readthedocs.io).
## Terms of use
Expand Down Expand Up @@ -105,58 +106,14 @@ You can convert the CITATION.cff file into a Bibtex file as follows:
pip3 install --user cffconvert
cffconvert -if CITATION.cff -f bibtex -of CITATION.bib
## Overview of files
This directory contains
* **bin** Files for setting the BOUT++ configuration
* **examples** Example models and test codes
* **externalpackages** External packages needed for installing BOUT++
* **include** Header files used in BOUT++
* **manual** Manuals and documentation (also [doxygen](http://www.stack.nl/~dimitri/doxygen/) documentation)
* **src** The main code directory
* **CITATION** Contains the paper citation for BOUT++
* **LICENSE** LGPL license
* **LICENSE.GPL** GPL license
* **tools** Tools for helping with analysis, mesh generation, and data managment
* **archiving** Routines for managing input/output files e.g. compressing data, converting formats, and managing runs
* **cyl_and_helimak_grids** IDL codes for generating cylindrical and helimak grids
* **eigensolver** Matlab routines for solving eigenmodes
* **idllib** Analysis codes in IDL. Add this to your IDL_PATH environment variable
* **line_tracing** IDL routines for line tracing of field lines
* **line_tracing_v2** Newer version of the IDL routines for line tracing of field lines
* **mathematicalib** Library for post processing using Mathematica
* **matlablib** Library for post processing using MATLAB
* **numlib** Numerical IDL routines
* **octave** Routines for post processing using octave
* **plasmalib** IDL routines for calculation of plasma parameters
* **pdb2idl** Library to read Portable Data Binary (PDB) files into IDL
* **pylib** Analysis codes in Python
* **boutdata** Routines to simplify accessing BOUT++ output
* **boututils** Some useful routines for accessing and plotting data
* **post_bout** Routines for post processing in BOUT++
* **slab** IDL routine for grid generation of a slab
* **tokamak_grids** Code to generate input grids for tokamak equilibria
* **gridgen** Grid generator in IDL. Hypnotoad GUI for converting G-EQDSK files into a flux-aligned orthogonal grid.
* **elite** Convert ELITE .eqin files into an intermediate binary file
* **gato** Convert DSKGATO files into intermediate binary format
* **all** Convert the intermediate binary file into BOUT++ input grid
* **coils** Routines for calculating the field due to external RMP coils and adding to existing equilibria
* **cyclone** Generate cyclone test cases (concentric circle "equilibrium" for local flux-surface calculations)
* **py_gridgen** Translation" into python of the corresponding IDL routines in the folder gridgen
* **shifted_circle** Produce shifted cirle equilibria input grids
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).
See [CONTRIBUTING.md](CONTRIBUTING.md) and the [manual page](https://bout-dev.readthedocs.io/en/stable/developer_docs/contributing.html)
## License
Copyright 2010 B.D.Dudson, S.Farley, M.V.Umansky, X.Q.Xu
Copyright 2010-2024 BOUT++ contributors
BOUT++ is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
Expand All @@ -171,15 +128,7 @@ GNU Lesser General Public License for more details.
A copy of the LGPL license is in [LICENSE](LICENSE). Since this is based
on (and refers to) the GPL, this is included in [LICENSE.GPL](LICENSE.GPL).
Some of the autoconf macros under [m4](m4) are licensed under
GPLv3. These are not necessary to either build or run BOUT++, but are
used in the creation of [configure](configure) from
[configure.ac](configure.ac), and are provided as a courtesy to
developers. You are free to substitute them with other autoconf macros
that provide equivalent functionality.
BOUT++ links by default with some GPL licensed libraries. Thus if you
compile BOUT++ with any of them, BOUT++ will automatically be licensed
as GPL. Thus if you want to use BOUT++ with GPL non-compatible code,
make sure to compile without GPLed code.
7 changes: 7 additions & 0 deletions bin/bout-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ idlpath="@IDLCONFIGPATH@"
pythonpath="@PYTHONCONFIGPATH@"

has_netcdf="@BOUT_HAS_NETCDF@"
has_adios="@BOUT_HAS_ADIOS@"
has_legacy_netcdf="@BOUT_HAS_LEGACY_NETCDF@"
has_pnetcdf="@BOUT_HAS_PNETCDF@"
has_pvode="@BOUT_HAS_PVODE@"
Expand Down Expand Up @@ -71,6 +72,7 @@ Available values for OPTION include:
--python Python path
--has-netcdf NetCDF file support
--has-adios ADIOS file support
--has-legacy-netcdf Legacy NetCDF file support
--has-pnetcdf Parallel NetCDF file support
--has-pvode PVODE solver support
Expand Down Expand Up @@ -109,6 +111,7 @@ all()
echo " --python -> $pythonpath"
echo
echo " --has-netcdf -> $has_netcdf"
echo " --has-adios -> $has_adios"
echo " --has-legacy-netcdf -> $has_legacy_netcdf"
echo " --has-pnetcdf -> $has_pnetcdf"
echo " --has-pvode -> $has_pvode"
Expand Down Expand Up @@ -197,6 +200,10 @@ while test $# -gt 0; do
echo $has_netcdf
;;

--has-adios)
echo $has_adios
;;

--has-legacy-netcdf)
echo $has_legacy_netcdf
;;
Expand Down
1 change: 1 addition & 0 deletions bout++Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ set(BOUT_USE_METRIC_3D @BOUT_USE_METRIC_3D@)

set(BOUT_HAS_PVODE @BOUT_HAS_PVODE@)
set(BOUT_HAS_NETCDF @BOUT_HAS_NETCDF@)
set(BOUT_HAS_ADIOS @BOUT_HAS_ADIOS@)
set(BOUT_HAS_FFTW @BOUT_HAS_FFTW@)
set(BOUT_HAS_LAPACK @BOUT_HAS_LAPACK@)
set(BOUT_HAS_PETSC @BOUT_HAS_PETSC@)
Expand Down
Loading

0 comments on commit 0dcd257

Please sign in to comment.