[petsc-users] PetscSFReduceBegin can not handle MPI_CHAR?
Jed Brown
jed at jedbrown.org
Thu Apr 4 10:36:56 CDT 2019
Fande Kong via petsc-users <petsc-users at mcs.anl.gov> writes:
> Hi Jed,
>
> One more question. Is it fine to use the same SF to exchange two groups of
> data at the same time? What is the better way to do this
This should work due to the non-overtaking property defined by MPI.
> Fande Kong,
>
> ierr =
> PetscSFReduceBegin(ptap->sf,MPIU_INT,rmtspace,space,MPIU_REPLACE);CHKERRQ(ierr);
> ierr =
> PetscSFReduceBegin(ptap->sf,MPI_CHAR,rmtspace2,space2,MPIU_REPLACE);CHKERRQ(ierr);
> Doing some calculations
> ierr =
> PetscSFReduceEnd(ptap->sf,MPIU_INT,rmtspace,space,MPIU_REPLACE);CHKERRQ(ierr);
> ierr =
> PetscSFReduceEnd(ptap->sf,MPI_CHAR,rmtspace2,space2,MPIU_REPLACE);CHKERRQ(ierr);
More information about the petsc-users
mailing list