From cb77d32ac8559d8d57fe0ef0efe251d9cbaf2309 Mon Sep 17 00:00:00 2001 From: Jack Betteridge <43041811+JDBetteridge@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:40:00 +0100 Subject: [PATCH] JDBetteridge/gcc14 (#3617) * Fix for GCC 14 --- firedrake/preconditioners/fdm.py | 5 +++-- firedrake/supermeshing.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/firedrake/preconditioners/fdm.py b/firedrake/preconditioners/fdm.py index 6d98e1555d..1656b2e6c5 100644 --- a/firedrake/preconditioners/fdm.py +++ b/firedrake/preconditioners/fdm.py @@ -1743,8 +1743,9 @@ def load_setSubMatCSR(comm, triu=False): InsertMode addv) {{ PetscInt m, ncols, irow, icol; - PetscInt *cols, *indices; - PetscScalar *vals; + PetscInt *indices; + const PetscInt *cols; + const PetscScalar *vals; PetscFunctionBeginUser; PetscCall(MatGetSize(B, &m, NULL)); PetscCall(MatSeqAIJGetMaxRowNonzeros(B, &ncols)); diff --git a/firedrake/supermeshing.py b/firedrake/supermeshing.py index afc9d22987..a1ce2cde17 100644 --- a/firedrake/supermeshing.py +++ b/firedrake/supermeshing.py @@ -210,10 +210,11 @@ def likely(cell_A): #define complex_mode %(complex_mode)s #define PrintInfo(...) do { if (PetscLogPrintInfo) printf(__VA_ARGS__); } while (0) + #define FPrintInfo(...) do { if (PetscLogPrintInfo) fprintf(stderr, __VA_ARGS__); } while (0) static void print_array(PetscScalar *arr, int d) { for(int j=0; j