Blob Blame History Raw
==> 0001-Prefer-dnf5.patch <==
From f3b6992cb9f29d34af0bc97fd30845bdfe340c03 Mon Sep 17 00:00:00 2001
From: David Bold <dschwoerer@users.noreply.github.com>
Date: Wed, 13 Sep 2023 10:25:29 +0200
Subject: [PATCH 01/13] Prefer dnf5

dnf5 is faster, and is sufficiently feature complete for our needs
---
 .ci_fedora.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index 1a3d2d92b..13bcd3b33 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -39,9 +39,9 @@ then
     echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
     time dnf -y install dnf5-plugins python3-pip cmake
     # 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

==> 0002-Change-default-to-rawhide.patch <==
From 5986581a9813489d31447a43fc355bec47c3ffbe Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Wed, 13 Sep 2023 14:30:04 +0200
Subject: [PATCH 02/13] Change default to rawhide

This is what is tested in CI
---
 .ci_fedora.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index 13bcd3b33..be369e081 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -19,7 +19,7 @@ then
 	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 \

==> 0003-Ensure-submodules-are-present-for-local-testing.patch <==
From f5e90c806316959760d1eccdf8dcd557a8a1cf4c Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Wed, 13 Sep 2023 14:30:34 +0200
Subject: [PATCH 03/13] Ensure submodules are present for local testing

---
 .ci_fedora.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index be369e081..154f5d1cb 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -15,6 +15,8 @@ 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

==> 0004-Default-to-current-working-directory.patch <==
From 3de5e26f5c1205a18fa2d472bace4d0bdeb52c80 Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Wed, 13 Sep 2023 14:30:51 +0200
Subject: [PATCH 04/13] Default to current working directory

---
 .ci_fedora.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index 154f5d1cb..bab7b5f5a 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -26,7 +26,7 @@ then
     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

==> 0005-Switch-to-fedora-packes.patch <==
From a573c82aa91d6f2df58804a487faa73d314b4dfd Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Wed, 13 Sep 2023 14:32:00 +0200
Subject: [PATCH 05/13] Switch to fedora packes

Should be faster and more consistent
---
 .ci_fedora.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index bab7b5f5a..525b01e95 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -39,7 +39,8 @@ 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 dnf5 copr enable -y davidsch/fixes4bout || :
     time dnf5 -y upgrade
@@ -51,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

==> 0006-CI-switch-to-mpich-to-workaround-openmpi-issue.patch <==
From 7d3fa7cd30f12ae808e08e553db040b875c38437 Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 15 Sep 2023 14:43:36 +0200
Subject: [PATCH 06/13] CI: switch to mpich to workaround openmpi issue

---
 .github/workflows/tests.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index da209d659..fd19d3cc0 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -194,7 +194,7 @@ jobs:
         with:
           submodules: true
       - name: Build Fedora rawhide
-        run: ./.ci_fedora.sh setup openmpi rawhide
+        run: ./.ci_fedora.sh setup mpich rawhide
         shell: bash
         env:
           TRAVIS_BUILD_DIR: ${{ github.workspace }}

==> 0007-Switch-back-to-openmpi.patch <==
From 2b4cc3e6b3e2b3a844010ef073d6292d7d758711 Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 22 Sep 2023 14:57:06 +0200
Subject: [PATCH 07/13] Switch back to openmpi

---
 .github/workflows/tests.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index fd19d3cc0..da209d659 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -194,7 +194,7 @@ jobs:
         with:
           submodules: true
       - name: Build Fedora rawhide
-        run: ./.ci_fedora.sh setup mpich rawhide
+        run: ./.ci_fedora.sh setup openmpi rawhide
         shell: bash
         env:
           TRAVIS_BUILD_DIR: ${{ github.workspace }}

==> 0008-Also-give-a-backtrace-if-we-are-hitting-a-bus-error.patch <==
From 1ec4255f302042e82f95610556a20fc4c8cb9bfd Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 22 Sep 2023 14:57:22 +0200
Subject: [PATCH 08/13] Also give a backtrace if we are hitting a bus error

---
 src/bout++.cxx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bout++.cxx b/src/bout++.cxx
index 7d7b38b94..127cb6ff4 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);

==> 0009-Try-disabeling-PETSc.patch <==
From 2aa8a16f7c910a7b59f27682c7b61338140c5723 Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 6 Oct 2023 09:14:15 +0200
Subject: [PATCH 09/13] Try disabeling PETSc

---
 .ci_fedora.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index 525b01e95..b920a7654 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -60,7 +60,7 @@ 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=OFF
     time make -C build build-check -j 2
     time make -C build check
 fi

==> 0010-CI-Reenable-petsc.patch <==
From 63f8243cce9fe53b151bf14a7b82396eba3fb2ca Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 6 Oct 2023 10:08:08 +0200
Subject: [PATCH 10/13] CI: Reenable petsc

---
 .ci_fedora.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index b920a7654..525b01e95 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -60,7 +60,7 @@ else
     cd
     cd BOUT-dev
     echo "starting configure"
-    time cmake -S . -B build -DBOUT_USE_PETSC=OFF
+    time cmake -S . -B build -DBOUT_USE_PETSC=ON
     time make -C build build-check -j 2
     time make -C build check
 fi

==> 0011-CI-Use-more-system-packages.patch <==
From 6651addec69899e65cde4a2d272ee22d7c04f6ca Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 6 Oct 2023 10:09:59 +0200
Subject: [PATCH 11/13] CI: Use more system packages

---
 .ci_fedora.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.ci_fedora.sh b/.ci_fedora.sh
index 525b01e95..5b6222809 100755
--- a/.ci_fedora.sh
+++ b/.ci_fedora.sh
@@ -60,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

==> 0012-Do-not-try-to-print-KSPConvergedReason.patch <==
From 320b88c7882f46b5b1dd17836581941ef882e0b2 Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 6 Oct 2023 11:18:05 +0200
Subject: [PATCH 12/13] Do not try to print KSPConvergedReason

---
 src/invert/laplace/impls/petsc/petsc_laplace.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/invert/laplace/impls/petsc/petsc_laplace.cxx b/src/invert/laplace/impls/petsc/petsc_laplace.cxx
index 1df560f28..d125b9069 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<int>(reason));
   }
 
   // Add data to FieldPerp Object

==> 0013-Cast-reason-to-int-for-formatting.patch <==
From 12ef939b0799392d7f7871ef5a467294097f87ab Mon Sep 17 00:00:00 2001
From: David Bold <dave@ipp.mpg.de>
Date: Fri, 6 Oct 2023 11:27:09 +0200
Subject: [PATCH 13/13] Cast reason to int for formatting

---
 src/invert/laplace/impls/petsc3damg/petsc3damg.cxx | 2 +-
 src/solver/impls/imex-bdf2/imex-bdf2.cxx           | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx b/src/invert/laplace/impls/petsc3damg/petsc3damg.cxx
index 24d61af78..633e938cc 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<int>(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 11954d331..d8515660e 100644
--- a/src/solver/impls/imex-bdf2/imex-bdf2.cxx
+++ b/src/solver/impls/imex-bdf2/imex-bdf2.cxx
@@ -1228,17 +1228,17 @@ 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<int>(kreason) << endl;
       }
       linear_fails++;
     } else {
       nonlinear_fails++;
       if (verbose) {
-        output << "KSP Succeeded with reason " << kreason << endl;
+        output << "KSP Succeeded with reason " << static_cast<int>(kreason) << endl;
       }
     };
     if (verbose) {
-      output << "SNES failed to converge with reason " << reason << endl;
+      output << "SNES failed to converge with reason " << static_cast<int>(reason) << endl;
     }
     throw PetscLib::SNESFailure(snesUse);
   }