[petsc-users] Large MATMPIAIJ - 32bit integer overflow in nz value
Fleischli Benno HSLU T&A
benno.fleischli at hslu.ch
Wed May 17 07:55:35 CDT 2023
Dear PETSc developers
I am creating a very large parallel sparse matrix (MATMPIAIJ) with PETSc. I write this matrix to disk.
The number of non-zeros exceeds the maximum number a 32-bit integer can hold.
When I read the matrix from disk i get an error because there was an overflow in the nz number.
(see petsc-3.18.4/src/mat/impls/aij/seq/aij.c:4977)
Obviously I could compile PETSc with 64bit integers (--with-64-bit-indices).
But I wanted to ask if there is another way. Because the total number of nonzeros nz is the only numer that exceeds the 32bit limit.
It would not be efficient to use 64bit integers everywhere just because of this single number.
This how I configured PETSc:
./configure --download-fblaslapack --download-hpddm --download-hypre --with-debugging=0
COPTFLAGS='-O3 -march=native -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native'
FOPTFLAGS='-O3 -march=native -mtune=native' --with-scalar-type=real (--with-mpi-dir=/home/benno/Libraries/openMPI)
Kind Regards
Benno
________________________________
Hochschule Luzern
Technik & Architektur
Institute for Mechanical Engineering and Energy Technology
Competence Center Fluid Mechanics and Numerical Methods
Benno Fleischli
MSc in Mechanical Engineering / BSc in Electrical Engineering
Wissenschaftlicher Mitarbeiter
benno.fleischli at hslu.ch<https://webmail.hslu.ch/owa/redir.aspx?C=rM5K5xPd_kKJmyojcJXaG18BaXM9wM8IqSslYJQen5H6HtdiNS2KtWNFL89yfRdRtW-Oa6xCXTk.&URL=mailto%3akatrina.kemp%40hslu.ch>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230517/c413833b/attachment.html>
More information about the petsc-users
mailing list