From 1cce8e649d27cd217e48e632e2128f396b9b6ba0 Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 4 Nov 2025 11:10:29 +0100 Subject: [PATCH 1/2] BoutComm::get() might return int --- src/invert/laplacexy/impls/petsc/laplacexy-petsc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invert/laplacexy/impls/petsc/laplacexy-petsc.cxx b/src/invert/laplacexy/impls/petsc/laplacexy-petsc.cxx index a116d78475..04abecfe05 100644 --- a/src/invert/laplacexy/impls/petsc/laplacexy-petsc.cxx +++ b/src/invert/laplacexy/impls/petsc/laplacexy-petsc.cxx @@ -84,7 +84,7 @@ LaplaceXYpetsc::LaplaceXYpetsc(Mesh* m, Options* opt, const CELL_LOC loc) default_prefix = opt->name(); // Get MPI communicator - auto* comm = BoutComm::get(); + auto comm = BoutComm::get(); // Local size const int localN = localSize(); From c2b5e0e283e286d59aeb0e501306ffd3f650e669 Mon Sep 17 00:00:00 2001 From: David Bold Date: Tue, 4 Nov 2025 12:30:46 +0100 Subject: [PATCH 2/2] Avoid mpi-compatibility issues MPI_Comm can be a pointer or an int (or anything else) Co-authored-by: Peter Hill --- .clang-tidy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 4caf530aee..a142355fc4 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -12,6 +12,12 @@ CheckOptions: - key: misc-include-cleaner.IgnoreHeaders value: 'petsc.*\.h;mpi\.h' + + - key: readability-qualified-auto.IgnoreAliasing + value: 'false' + + - key: readability-qualified-auto.AllowedTypes + value: 'MPI_Comm' --- Disabled checks and reasons: