diff --git a/.ci_fedora.sh b/.ci_fedora.sh index 1a3d2d92b2..5b62228092 100755 --- a/.ci_fedora.sh +++ b/.ci_fedora.sh @@ -15,16 +15,18 @@ then # 3. docker start -a mobydick <=> start to run the container (initialized with docker-cp) if test $1 = podman ; then cmd=podman + # For the use of testing + git submodule update --init # --recursive else cmd="sudo docker" fi test . != ".$2" && mpi="$2" || mpi=openmpi - test . != ".$3" && version="$3" || version=latest + test . != ".$3" && version="$3" || version=rawhide time $cmd pull registry.fedoraproject.org/fedora:$version time $cmd create --cap-add=SYS_PTRACE --security-opt seccomp=unconfined \ --name mobydick registry.fedoraproject.org/fedora:$version \ /tmp/BOUT-dev/.ci_fedora.sh $mpi - time $cmd cp ${TRAVIS_BUILD_DIR} mobydick:/tmp + time $cmd cp ${TRAVIS_BUILD_DIR:-$(pwd)} mobydick:/tmp/BOUT-dev time $cmd start -a mobydick exit 0 fi @@ -37,11 +39,12 @@ then cat /etc/os-release # Ignore weak depencies echo "install_weak_deps=False" >> /etc/dnf/dnf.conf - time dnf -y install dnf5-plugins python3-pip cmake + time dnf -y install dnf5 + time dnf5 -y install dnf5-plugins cmake python3-zoidberg python3-natsort # Allow to override packages - see #2073 - time dnf copr enable -y davidsch/fixes4bout || : - time dnf -y upgrade - time dnf -y builddep bout++ + time dnf5 copr enable -y davidsch/fixes4bout || : + time dnf5 -y upgrade + time dnf5 -y builddep bout++ useradd test cp -a /tmp/BOUT-dev /home/test/ chown -R test /home/test @@ -49,7 +52,6 @@ then sudo -u test ${0/\/tmp/\/home\/test} $mpi ## If we are called as normal user, run test else - pip install --user zoidberg natsort . /etc/profile.d/modules.sh module load mpi/${1}-x86_64 export OMPI_MCA_rmaps_base_oversubscribe=yes @@ -58,7 +60,12 @@ else cd cd BOUT-dev echo "starting configure" - time cmake -S . -B build -DBOUT_USE_PETSC=ON + time cmake -S . -B build -DBOUT_USE_PETSC=ON \ + -DBOUT_UPDATE_GIT_SUBMODULE=OFF \ + -DBOUT_USE_SYSTEM_FMT=ON \ + -DBOUT_USE_SYSTEM_MPARK_VARIANT=ON \ + -DBOUT_USE_SUNDIALS=ON + time make -C build build-check -j 2 time make -C build check fi diff --git a/src/bout++.cxx b/src/bout++.cxx index 7d7b38b947..127cb6ff4a 100644 --- a/src/bout++.cxx +++ b/src/bout++.cxx @@ -218,6 +218,7 @@ namespace experimental { void setupSignalHandler(SignalHandler signal_handler) { #if BOUT_USE_SIGNAL std::signal(SIGSEGV, signal_handler); + std::signal(SIGBUS, signal_handler); #endif #if BOUT_USE_SIGFPE std::signal(SIGFPE, signal_handler); diff --git a/src/invert/laplace/impls/petsc/petsc_laplace.cxx b/src/invert/laplace/impls/petsc/petsc_laplace.cxx index 1df560f288..d125b90694 100644 --- a/src/invert/laplace/impls/petsc/petsc_laplace.cxx +++ b/src/invert/laplace/impls/petsc/petsc_laplace.cxx @@ -856,7 +856,7 @@ FieldPerp LaplacePetsc::solve(const FieldPerp& b, const FieldPerp& x0) { if (reason <= 0) { throw BoutException( "petsc_laplace: inversion failed to converge. KSPConvergedReason: {} ({})", - KSPConvergedReasons[reason], reason); + KSPConvergedReasons[reason], static_cast(reason)); } // Add data to FieldPerp Object diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx index 24d61af783..633e938ccc 100644 --- a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx +++ b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx @@ -267,7 +267,7 @@ Field3D LaplacePetsc3dAmg::solve(const Field3D& b_in, const Field3D& x0) { if (reason <= 0) { throw BoutException( "Petsc3dAmg: inversion failed to converge. KSPConvergedReason: {} ({})", - KSPConvergedReasons[reason], reason); + KSPConvergedReasons[reason], static_cast(reason)); } // Create field from result diff --git a/src/solver/impls/imex-bdf2/imex-bdf2.cxx b/src/solver/impls/imex-bdf2/imex-bdf2.cxx index 11954d331a..adafbb71c5 100644 --- a/src/solver/impls/imex-bdf2/imex-bdf2.cxx +++ b/src/solver/impls/imex-bdf2/imex-bdf2.cxx @@ -1228,17 +1228,19 @@ PetscErrorCode IMEXBDF2::solve_implicit(BoutReal curtime, BoutReal gamma) { KSPGetConvergedReason(ksp, &kreason); if (kreason < 0) { if (verbose) { - output << "KSP Failed to converge with reason " << kreason << endl; + output << "KSP Failed to converge with reason " << static_cast(kreason) + << endl; } linear_fails++; } else { nonlinear_fails++; if (verbose) { - output << "KSP Succeeded with reason " << kreason << endl; + output << "KSP Succeeded with reason " << static_cast(kreason) << endl; } }; if (verbose) { - output << "SNES failed to converge with reason " << reason << endl; + output << "SNES failed to converge with reason " << static_cast(reason) + << endl; } throw PetscLib::SNESFailure(snesUse); }