[petsc-users] question about MPI_Bcast and 64-bit-indices

Barry Smith bsmith at mcs.anl.gov
Fri Nov 27 12:27:55 CST 2015


   Use MPIU_INTEGER for Fortran


> On Nov 27, 2015, at 12:09 PM, Jose E. Roman <jroman at dsic.upv.es> wrote:
> 
> 
>> El 27 nov 2015, a las 19:00, Randall Mackie <rlmackie862 at gmail.com> escribió:
>> 
>> If my program is compiled using 64-bit-indices, and I have an integer variable defined as PetscInt, what is the right way to broadcast that using MPI_Bcast?
>> 
>> I currently have:
>> 
>> call MPI_Bcast(n, 1, MPI_INTEGER, …
>> 
>> which is the right way to do it for regular integers, but what do I use in place of MPI_INTEGER when Petsc is compiled with 64-bit-indices.
>> 
>> 
>> Thanks,
>> 
>> Randy M.
> 
> There are PETSc-defined MPI types for basic PETSc datatypes: MPIU_INT for PetscInt, MPIU_SCALAR for PetscScalar, and so on. See petscsys.h for details.
> 
> Jose
> 



More information about the petsc-users mailing list