[petsc-dev] Removed functions in MPI 3
Jed Brown
jedbrown at mcs.anl.gov
Mon Jan 21 17:41:05 CST 2013
On Mon, Jan 21, 2013 at 5:31 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Mon, Jan 21, 2013 at 4:12 PM, Karl Rupp <rupp at mcs.anl.gov> wrote:
>
>> Dear PETScians,
>>
>> MPI 3.0 *removes* a set of functions from MPI 1.x, of which the following
>> are in use in PETSc:
>>
>> * MPI_Type_struct, used in
>> src/ts/characteristic/impls/**da/slda.c
>> src/dm/impls/mesh/meshpcice.c
>>
>> * MPI_Errhandler_create/MPI_**Errhandler_set, used in
>> src/sys/objects/pinit.c
>> src/sys/objects/init.c
>>
>> In both cases function were renamed in MPI-2.0:
>> MPI_Type_struct -> MPI_Type_create_struct
>> MPI_Errhandler_create -> MPI_Comm_create_errhandler
>> MPI_Errhandler_set -> MPI_Comm_set_errhandler
>>
>> It should be sufficient to update BuildSystem/config/packages/**MPI.py
>> and add the respective checks in configureMPI2(). Any objections on the
>> following defines:
>> HAVE_MPI_TYPE_CREATE_STRUCT
>> HAVE_MPI_COMM_CREATE_**ERRHANDLER
>> HAVE_MPI_COMM_SET_ERRHANDLER
>> in the case of success?
>>
>
> Yes, this is the right way.
>
I'm also in favor of changing all the call sites to the new function names.
I think that if configure does not find a new function name, we can
#define MPI_Type_create_struct(count,lens,displs,types,newtype)
MPI_Type_struct((count),(lens),(displs),(types),(newtype))
similar to the defines in petsclog.h (though those are for logging) so that
we don't need macros at every call site. FWIW, I'd prefer that the
redefines in petsclog.h be moved to a header that is not mandatory for
users to include (because the current approach cannot be used with another
library that also does the same thing).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130121/81cc4687/attachment.html>
More information about the petsc-dev
mailing list