Bug 1924231

Summary: PETSc requires specifc MPI version at compile time
Product: [Fedora] Fedora Reporter: david08741
Component: petscAssignee: Antonio T. sagitter <trpost>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: trpost
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-06 23:33:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1921129    

Description david08741 2021-02-02 20:52:07 UTC
Description of problem:
PETSc checks during the build that it is build against the same mpi version, against which PETSc was build.

That means, whenever openmpi or mpich is update, petsc needs to be rebuild, or depending packages are FTBFS.

I think it should be safe to remove the check, but I guess upstream wouldn't want to merge such a patch, and keeping patches around isn't nice.

Otherwise an explicit dependency on the specific mpi version used to compile could be added to the devel sub-packages. That would ensure that it fails earlier, and you would get FTI notices if that happens.

Version-Release number of selected component (if applicable):
petsc-3.13.4-2.fc33.x86_64


How reproducible:
always

Steps to Reproduce:
1. Try to rebuild bout++


Actual results:
/usr/include/mpich-i386/petsc/petscsys.h:213:6: error: #error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version"
  213 | #    error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version"
      |      ^~~~~
  Compiling  rk4.cxx
In file included from /usr/include/mpich-i386/petsc/petscbag.h:4,
                 from /usr/include/mpich-i386/petsc/petsc.h:5,
                 from ../../../../include/bout/petsclib.hxx:50,
                 from imex-bdf2.hxx:47,
                 from imex-bdf2.cxx:4:
/usr/include/mpich-i386/petsc/petscsys.h:213:6: error: #error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version"
  213 | #    error "PETSc was configured with one MPICH mpi.h version but now appears to be compiling using a different MPICH mpi.h version"
      |      ^~~~~

Expected results:
Builds as expected.

Additional info:
I hoped the mass rebuild would fix this at least temporary (as a new openmpi was  build around 14 days ago) but then two days ago mpich was updated, and I am back to not being able to rebuild bout++

Comment 1 Antonio T. sagitter 2021-02-03 16:34:25 UTC
Hi David.

I have modified and rebuilt PETSc in Rawhide branch (https://src.fedoraproject.org/rpms/petsc/c/412a009d556300487759ba3613e45c86eadb3e8a?branch=rawhide); are those changes fine for your needs?

Next step is to build PETSc-3.14.3 and push it in stable branch (f33) if needed.

Comment 2 david08741 2021-02-06 23:33:00 UTC
Thanks for the quick rebuild.

Yes, that is great, thanks a lot.