[petsc-users] Does PETSc have any broadcast function?

Jed Brown jed at 59A2.org
Wed Sep 1 16:02:12 CDT 2010


On Wed, 1 Sep 2010 20:54:54 +0000, "Li, Zhisong (lizs)" <lizs at mail.uc.edu> wrote:
>  Hi, Petsc Team,
> 
> I wonder if Petsc has any function like MPI_Bcast() which can
> broadcast a value to all processes. If we directly add MPI functions
> into the Petsc program, the MPI datatype may be incompatible with the
> Petsc datatype. Does Petsc have any easy way to handle this?

PETSc registers the types MPIU_SCALAR, MPIU_REAL, and MPIU_INT so you
can use these to send PetscScalar, PetscReal, and PetscInt respectively
using any MPI functions.

Jed


More information about the petsc-users mailing list