[petsc-users] portability question for reduce operations
Jed Brown
jed at jedbrown.org
Fri Apr 10 16:31:52 CDT 2015
Ed Bueler <elbueler at alaska.edu> writes:
> option 1. full use of MPIU_ types and ops:
>
> PetscReal x, xloc;
> PetscInt n, nloc;
> MPI_Allreduce(&xloc,&x,1,MPIU_REAL,MPIU_SUM,comm);
> MPI_Allreduce(&nloc,&n,1,MPIU_INT,MPIU_SUM,comm);
Use MPI_SUM for integer types. MPIU_SUM is for real/scalar types.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150410/4337712b/attachment.pgp>
More information about the petsc-users
mailing list