<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof">Dear PETSc developers<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
I am creating a very large parallel sparse matrix (MATMPIAIJ) with PETSc. I write this matrix to disk.<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
The number of non-zeros exceeds the maximum number a 32-bit integer can hold.</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
When I read the matrix from disk i get an error because there was an overflow in the nz number.</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
(see petsc-3.18.4/src/mat/impls/aij/seq/aij.c:4977)</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1 ContentPasted3">
Obviously I could compile PETSc with 64bit integers (--with-64-bit-indices).</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1 ContentPasted3">
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.</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1 ContentPasted3">
It would not be efficient to use 64bit integers everywhere just because of this single number.<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<span style="font-size:10pt" class="ContentPasted0 ContentPasted1 ContentPasted4">This how I configured PETSc:</span>
<div style="font-size:10pt" class="ContentPasted0 ContentPasted1"><br class="ContentPasted4">
</div>
<div style="font-size:10pt" class="ContentPasted0 ContentPasted1"><span><code spellcheck="false" class="listtype-code listindent1 list-code1 lang-typescript"><span class="author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3mz80zidoqhb5z69zofz80zz68zz122zez65zn3o3z89zz85z5z67zz88zz87zyz72z ContentPasted2 ContentPasted4">./configure
--download-fblaslapack --download-hpddm --download-hypre --with-debugging=0 <br class="ContentPasted4">
</span></code></span></div>
<div style="font-size:10pt" class="ContentPasted0 ContentPasted1"><span><code spellcheck="false" class="listtype-code listindent1 list-code1 lang-typescript"><span class="author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3mz80zidoqhb5z69zofz80zz68zz122zez65zn3o3z89zz85z5z67zz88zz87zyz72z ContentPasted2 ContentPasted4">COPTFLAGS='-O3
-march=native -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native' <br class="ContentPasted4">
</span></code></span></div>
<div style="font-size:10pt" class="ContentPasted0 ContentPasted1"><span><code spellcheck="false" class="listtype-code listindent1 list-code1 lang-typescript"><span class="author-d-iz88z86z86za0dz67zz78zz78zz74zz68zjz80zz71z9iz90za3mz80zidoqhb5z69zofz80zz68zz122zez65zn3o3z89zz85z5z67zz88zz87zyz72z ContentPasted2 ContentPasted4">FOPTFLAGS='-O3
-march=native -mtune=native' --with-scalar-type=real (--with-mpi-dir=/home/benno/Libraries/openMPI)</span></code></span><br class="ContentPasted4">
</div>
<span style="font-size:10pt" class="ContentPasted0"></span><br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
Kind Regards</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
Benno</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1">
<br>
</div>
<div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div>
<div>
<div>
<div>
<div>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: rgb(31, 73, 125);" lang="de">________________________________</span><span style="font-size:10pt;font-family:Tahoma,sans-serif" lang="de">
</span></p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><b><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);" lang="de">Hochschule Luzern<br>
Technik & Architektur</span></b><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);" lang="de"><br>
</span><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);" lang="de">Institute for Mechanical Engineering and Energy Technology</span></p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);" lang="de">Competence Center Fluid Mechanics and Numerical Methods<b><br>
</b></span></p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);" lang="de"><b><br>
</b></span></p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);" lang="de"><b>Benno Fleischli</b><br>
MSc in Mechanical Engineering / BSc in Electrical Engineering</span><span style="font-size:10pt;font-family:Tahoma,sans-serif" lang="de"></span></p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);" lang="de">Wissenschaftlicher Mitarbeiter</span><span style="font-size:10pt;font-family:Tahoma,sans-serif" lang="de"></span><span style="font-size: 9pt; font-family: Tahoma, sans-serif; color: rgb(31, 73, 125);" lang="de"><br>
</span></p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(31, 73, 125);"><a href="https://webmail.hslu.ch/owa/redir.aspx?C=rM5K5xPd_kKJmyojcJXaG18BaXM9wM8IqSslYJQen5H6HtdiNS2KtWNFL89yfRdRtW-Oa6xCXTk.&URL=mailto%3akatrina.kemp%40hslu.ch" target="_blank" rel="noopener noreferrer" data-auth="NotApplicable" data-safelink="true" data-linkindex="1"><span lang="de">benno.fleischli@hslu.ch</span></a></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
</body>
</html>