On Fri, Mar 20, 2026 at 09:57:18AM +0100, Drew Parsons wrote: > Source: petsc > Followup-For: Bug #1102465 > Control: forwarded -1 https://gitlab.com/petsc/petsc/-/work_items/1881 > > For further reference and further discussion, and to understand > upstream's reasons for the version checks, I raised the question > upstream at > > https://gitlab.com/petsc/petsc/-/work_items/1881
Since we are hitting the problem again, could you add something like the attached patch? I understand from the upstream issue that they are worried about more broken setups, but for us the version check is the only known problem here. Thanks Adrian
>From ab0270dd0d76007276b186e61473dd69fbf6ae4d Mon Sep 17 00:00:00 2001 From: Adrian Bunk <[email protected]> Date: Mon, 5 Oct 2026 01:10:33 +0300 Subject: petscsys.h: Remove MPI version checks, trust that the soversion covers it --- include/petscsys.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/petscsys.h b/include/petscsys.h index 857fad8d231..e9c46949680 100644 --- a/include/petscsys.h +++ b/include/petscsys.h @@ -138,36 +138,22 @@ M*/ #elif PetscDefined(HAVE_I_MPI) #if !defined(I_MPI_NUMVERSION) #error "PETSc was configured with I_MPI but now appears to be compiling using a non-I_MPI mpi.h" - #elif I_MPI_NUMVERSION != PETSC_PKG_I_MPI_NUMVERSION - #error "PETSc was configured with one I_MPI mpi.h version but now appears to be compiling using a different I_MPI mpi.h version" #endif #elif PetscDefined(HAVE_MVAPICH2) #if !defined(MVAPICH2_NUMVERSION) #error "PETSc was configured with MVAPICH2 but now appears to be compiling using a non-MVAPICH2 mpi.h" - #elif MVAPICH2_NUMVERSION != PETSC_PKG_MVAPICH2_NUMVERSION - #error "PETSc was configured with one MVAPICH2 mpi.h version but now appears to be compiling using a different MVAPICH2 mpi.h version" #endif #elif PetscDefined(HAVE_MPICH) #if !defined(MPICH_NUMVERSION) || defined(MVAPICH2_NUMVERSION) || defined(I_MPI_NUMVERSION) #error "PETSc was configured with MPICH but now appears to be compiling using a non-MPICH mpi.h" - #elif PETSC_PKG_MPICH_VERSION_GT(MPICH_NUMVERSION / 10000000, MPICH_NUMVERSION / 100000 % 100, MPICH_NUMVERSION / 1000 % 100) - #error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using an older MPICH mpi.h version" - #elif PETSC_PKG_MPICH_VERSION_LT(MPICH_NUMVERSION / 10000000, 0, 0) - #error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a newer major MPICH mpi.h version" #endif #elif PetscDefined(HAVE_OPENMPI) #if !defined(OMPI_MAJOR_VERSION) #error "PETSc was configured with Open MPI but now appears to be compiling using a non-Open MPI mpi.h" - #elif PETSC_PKG_OPENMPI_VERSION_GT(OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION, OMPI_RELEASE_VERSION) - #error "PETSc was configured with one Open MPI mpi.h version but now appears to be compiling using an older Open MPI mpi.h version" - #elif PETSC_PKG_OPENMPI_VERSION_LT(OMPI_MAJOR_VERSION, 0, 0) - #error "PETSc was configured with one Open MPI mpi.h version but now appears to be compiling using a newer major Open MPI mpi.h version" #endif #elif defined(PETSC_HAVE_MSMPI_VERSION) #if !defined(MSMPI_VER) #error "PETSc was configured with MSMPI but now appears to be compiling using a non-MSMPI mpi.h" - #elif (MSMPI_VER != PETSC_HAVE_MSMPI_VERSION) - #error "PETSc was configured with one MSMPI mpi.h version but now appears to be compiling using a different MSMPI mpi.h version" #endif #elif defined(OMPI_MAJOR_VERSION) || defined(MPICH_NUMVERSION) || defined(MSMPI_VER) #error "PETSc was configured with undetermined MPI - but now appears to be compiling using any of Open MPI, MS-MPI or a MPICH variant" -- 2.47.3

