[petsc-users] 64 bit integers

Satish Balay balay at mcs.anl.gov
Fri Aug 17 10:21:26 CDT 2012


On Fri, 17 Aug 2012, Jed Brown wrote:

> On Fri, Aug 17, 2012 at 10:12 AM, Michele Rosso <mrosso at uci.edu> wrote:
> 
> > Does this mean that Fortran compiler invoked by the PETSc Makefile will
> > compile to code with the 64 bit integer option so that also Fortran
> > Integer will be 64 bit?
> 
> 
> NO, that would be bad because it breaks library interfaces.
> 
> You have to use the right types internally. If you use PetscInt everywhere,
> then you'll be fine. If you mix types, you have to find out where to
> convert.

A couple of notes.

- PETSc does not use -i8 compiler flag.  It uses '#define PetscInt integer*8'.

- Some fortran compilers default to 32bit indexing for arrays [g95?]
but I think most compilers do use 64bit array indexing.

- With /--with-64-bit-indices=1/ one can have the global problem
dimentions exceed 32bit indices - but it should still be within 32bit
limit for the local parts. [as we still use 32bit blas calls].

Satish




More information about the petsc-users mailing list