Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

petsc does not compile with MPI > 3.0 #57

Open
AntoineMazuyer opened this issue Sep 10, 2019 · 7 comments
Open

petsc does not compile with MPI > 3.0 #57

AntoineMazuyer opened this issue Sep 10, 2019 · 7 comments
Assignees

Comments

@AntoineMazuyer
Copy link

Hello,

It seems that PETSc use functions that are not supported anymore in MPI v4.0.1

/home/amazuyer/devel/geosx/thirdPartyLibs/build-default-clang-release/petsc/src/petsc/src/sys/objects/init.c: In function ‘PetscOptionsCheckInitial_Private’:
/home/amazuyer/devel/geosx/thirdPartyLibs/build-default-clang-release/petsc/src/petsc/src/sys/objects/init.c:417:40: error: ‘MPI_Handler_function’ undeclared (first use in this function); did you mean ‘MPI_User_function’?
  417 |     ierr = MPI_Comm_create_errhandler((MPI_Handler_function*)Petsc_MPI_DebuggerOnError,&err_handler);CHKERRQ(ierr);
      |                                        ^~~~~~~~~~~~~~~~~~~~
      |   

Indeed, according to this comment:

https://github.com/open-mpi/ompi/blob/c672a51ccd09c7c0b208c912101e46ce391ab1e7/ompi/include/mpi.h.in#L2753

It does not exist anymore

@AntoineMazuyer AntoineMazuyer changed the title petsc does not compile with MPI v4.0.1 petsc does not compile with MPI > 3.0 Sep 10, 2019
@rrsettgast
Copy link
Member

@AntoineMazuyer it passes the travis CI tests using /usr/local/Cellar/open-mpi/4.0.1_2. What mpi are you using?

@AntoineMazuyer
Copy link
Author

@rrsettgast I also use 4.0.1 🤔

a full read of the comment:

2737 /*
2738  * Removed typedefs.  These typedefs are only available if Open MPI
2739  * was configured with --enable-mpi1-compatibility.
2740  *
2741  * These typedefs were formally removed from the MPI specification
2742  * and should no longer be used in MPI applications.
2743  *
2744  * Even though MPI_Handler_function is removed, we do not use the
2745  * attributes marking it as such, because otherwise the compiler
2746  * will warn for all the functions that are declared using them
2747  * (e.g., MPI_Errhandler_create).
2748  */

makes me think that my MPI version was compiled without the option --enable-mpi1-compatibility

@rrsettgast
Copy link
Member

@AntoineMazuyer did you use homebrew?

@AntoineMazuyer
Copy link
Author

No I am not on mac I have a Arch based distribution

@tjligocki-lbl
Copy link

I modified the PETSc source "init.c" (see attached file - I have to "gzip" it to get this interface to upload it, :-) and PETSc compiled with openMPI 4.0.1 on my Ubuntu workstation. Hope this helps...

    Terry J.

init.c.gz

P.S. I also have mods to HDF5 in the thirdPartyLibs to get it to compile with openMPI 4.0.1 - Let me know if I should post them somewhere...

@AntoineMazuyer
Copy link
Author

I ended up doing the same thing... I am not sure it is a long term solution though.

@klevzoff
Copy link
Contributor

Problem has been fixed in PETSc over a year ago: https://gitlab.com/petsc/petsc/-/commit/33c7d6994e4f540f91592e336fef5f1374a75c9f

Just another reason to update sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants