[petsc-dev] Deprecated MPI functions
Lisandro Dalcin
dalcinl at gmail.com
Mon Mar 17 01:32:48 CDT 2014
On 15 March 2014 05:09, Jed Brown <jed at jedbrown.org> wrote:
> PETSc still uses some deprecated MPI functions for
> backward-compatibility with MPI-1, but now implementations are getting
> louder about them. I assume the status quo of not requiring MPI-2 is
> still in effect [1], so we should have configure test for the new
> version and define them in terms of the old names if not.
>
>
> /home/jed/petsc/src/sys/utils/mpiu.c: In function ‘PetscSequentialPhaseBegin’:
> /home/jed/petsc/src/sys/utils/mpiu.c:108:5: warning: ‘MPI_Keyval_create’ is deprecated (declared at /home/jed/usr/ompi/include/mpi.h:1536): MPI_Keyval_create is superseded by MPI_Comm_create_keyval in MPI-2.0 [-Wdeprecated-declarations]
> ierr = MPI_Keyval_create(MPI_NULL_COPY_FN,MPI_NULL_DELETE_FN,&Petsc_Seq_keyval,0);CHKERRQ(ierr);
> ^
> /home/jed/petsc/src/sys/utils/mpiu.c:108:5: warning: ‘OMPI_C_MPI_NULL_COPY_FN’ is deprecated (declared at /home/jed/usr/ompi/include/mpi.h:844): MPI_NULL_COPY_FN is deprecated in MPI-2.0 [-Wdeprecated-declarations]
> /home/jed/petsc/src/sys/utils/mpiu.c:108:5: warning: ‘OMPI_C_MPI_NULL_DELETE_FN’ is deprecated (declared at /home/jed/usr/ompi/include/mpi.h:840): MPI_NULL_DELETE_FN is deprecated in MPI-2.0 [-Wdeprecated-declarations]
> /home/jed/petsc/src/sys/utils/mpiu.c:116:3: warning: ‘MPI_Attr_put’ is deprecated (declared at /home/jed/usr/ompi/include/mpi.h:1221): MPI_Attr_put is superseded by MPI_Comm_set_attr in MPI-2.0 [-Wdeprecated-declarations]
> ierr = MPI_Attr_put(comm,Petsc_Seq_keyval,(void*)addr_local_comm);CHKERRQ(ierr);
> ^
> /home/jed/petsc/src/sys/utils/mpiu.c: In function ‘PetscSequentialPhaseEnd’:
> /home/jed/petsc/src/sys/utils/mpiu.c:153:3: warning: ‘MPI_Attr_get’ is deprecated (declared at /home/jed/usr/ompi/include/mpi.h:1219): MPI_Attr_get is superseded by MPI_Comm_get_attr in MPI-2.0 [-Wdeprecated-declarations]
> ierr = MPI_Attr_get(comm,Petsc_Seq_keyval,(void**)&addr_local_comm,&flag);CHKERRQ(ierr);
> ^
> /home/jed/petsc/src/sys/utils/mpiu.c:161:3: warning: ‘MPI_Attr_delete’ is deprecated (declared at /home/jed/usr/ompi/include/mpi.h:1217): MPI_Attr_delete is superseded by MPI_Comm_delete_attr in MPI-2.0 [-Wdeprecated-declarations]
> ierr = MPI_Attr_delete(comm,Petsc_Seq_keyval);CHKERRQ(ierr);
> ^
>
Why not just use a configure test for MPI_VERSION to #define
PETSC_MPI_VERSION, and then if PETSC_MPI_VERSION<2 #definine the new
functions as the old ones? Do you expect a MPI implementation
advertising itself as MPI-2 but not providing the new functions for
attribute access?
>
> [1] Something is wrong with the process when 17 years after a
> standardization that involved the relevant vendors, we still cannot rely
> on systems having upgraded.
I totally agree. One way of make pressure for the upgrades is to just
stop supporting them :-), of making the support more difficult to get.
--
Lisandro Dalcin
---------------
CIMEC (UNL/CONICET)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1016)
Tel/Fax: +54-342-4511169
More information about the petsc-dev
mailing list