[petsc-users] PETSC_INT 32bits / 64 bits problem

Satish Balay balay at mcs.anl.gov
Mon Jul 29 14:51:49 CDT 2013


On Mon, 29 Jul 2013, Lu Qiyue wrote:

> Dear All:
> 
> I am solving a huge system of AX=b, Matrix A is a sparse matrix but its
> number of non-zeros has been out of range of the upper limit of PETSC_INT
> (4 bytes).
> 
> In the online documents
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html
> It shows:
> Its size can be configured with the option --with-64-bit-indices - to be
> either 32bit or 64bit [default 32 bits int].
> Also, in the document:
> http://www.mcs.anl.gov/petsc/petsc-current/include/petscsys.h.html#PetscInt
> Looks need to configure BLAS and LAPACK lib with 64 bits options as well.
> 
> If I just change the PETSC_INT declaration in the driver to LONG INT,
> warnings prompt out when calling functions which used PETSC_INT data as its
> parameters.
> 
> Should I recompile (re-install) PETSC to add the 64 bits configurations?

Yes - you need to reconfigure with --with-64-bit-indices. Suggest
using different PETSC_ARCH for this build - so that your current build
is still useable.

> And for BLAS and LAPACK libs? Or, is there any other solutions?

We use 32bit blas for --with-64-bit-indices build aswell - so nothing special
is needed for it.

Note: this relies on the subproblem [per mpi proc] to be within the 32bit int limit..

Satish

> 
> Thanks
> 
> Qiyue Lu
> 



More information about the petsc-users mailing list