<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">I updated the branch and made a PR. I tried to do MPI_SUM on MPI_CHAR. We do not have UnpackAdd on this type (we are right). But unfortunately, MPICH's MPI_Reduce_local did not report errors (it should) so we did not generate an error either.
<div>
<div><br>
</div>
<div>--Junchao Zhang<br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Apr 4, 2019 at 10:37 AM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Fande Kong via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> writes:<br>
<br>
> Hi Jed,<br>
><br>
> One more question. Is it fine to use the same SF to exchange two groups of<br>
> data at the same time? What is the better way to do this<br>
<br>
This should work due to the non-overtaking property defined by MPI.<br>
<br>
> Fande Kong,<br>
><br>
> ierr =<br>
> PetscSFReduceBegin(ptap->sf,MPIU_INT,rmtspace,space,MPIU_REPLACE);CHKERRQ(ierr);<br>
> ierr =<br>
> PetscSFReduceBegin(ptap->sf,MPI_CHAR,rmtspace2,space2,MPIU_REPLACE);CHKERRQ(ierr);<br>
> Doing some calculations<br>
> ierr =<br>
> PetscSFReduceEnd(ptap->sf,MPIU_INT,rmtspace,space,MPIU_REPLACE);CHKERRQ(ierr);<br>
> ierr =<br>
> PetscSFReduceEnd(ptap->sf,MPI_CHAR,rmtspace2,space2,MPIU_REPLACE);CHKERRQ(ierr);<br>
</blockquote>
</div>
</body>
</html>