Fande Kong via petsc-users <petsc-users@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);