[petsc-dev] Bad use of defined(MPI_XXX)

Zhang, Junchao jczhang at mcs.anl.gov
Fri May 24 16:15:53 CDT 2019


PetscSF has many PETSC_HAVE_MPI_REDUCE_LOCAL. It is disturbing. But consider the time gap between MPI-2.0 (1998) and MPI-2.2 (2009), it is better to keep it.


On Fri, May 24, 2019 at 3:53 PM Jed Brown <jed at jedbrown.org<mailto:jed at jedbrown.org>> wrote:
"Zhang, Junchao" <jczhang at mcs.anl.gov<mailto:jczhang at mcs.anl.gov>> writes:

> How about stuff in MPI-2.2 (approved in 2009), the last of MPI-2.x, e.g., PETSC_HAVE_MPI_REDUCE_LOCAL?

Currently we only require MPI-2.0, but I would not object to increasing
to MPI-2.1 or 2.2 if such systems are sufficiently rare (almost
nonexistent) in the wild.  I'm not sure how great the benefits are.

> On Fri, May 24, 2019 at 2:51 PM Jed Brown via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov><mailto:petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>>> wrote:
> Lisandro Dalcin via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov><mailto:petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>>> writes:
>
>> These two are definitely wrong, we need PETSC_HAVE_MPI_XXX instead.
>
> Thanks, we can delete both of these cpp guards.
>
>> include/petscsf.h:#if defined(MPI_REPLACE)
>
> MPI-2.0
>
>> src/sys/objects/init.c:#if defined(PETSC_USE_64BIT_INDICES) ||
>> !defined(MPI_2INT)
>
> MPI-1.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190524/63f6fa1a/attachment.html>


More information about the petsc-dev mailing list