<div dir="ltr">Dear PETSc Dev Team,<div> The documentation recommends calling
both of the above preallocation routines for simplicity. Do we waste memory by calling both?</div><div><br></div><div>Thanks,</div><div>Sam</div><div><a name="MATAIJ" style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><h1>MATAIJ</h1></a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"></span><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MATAIJ.html#MATAIJ" style="font-family:"Times New Roman";font-size:medium">MATAIJ</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"> = "aij" - A matrix type to be used for sparse matrices. This matrix type is identical to </span><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MATSEQAIJ.html#MATSEQAIJ" style="font-family:"Times New Roman";font-size:medium">MATSEQAIJ</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"> when constructed with a single process communicator, and </span><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MATMPIAIJ.html#MATMPIAIJ" style="font-family:"Times New Roman";font-size:medium">MATMPIAIJ</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"> otherwise. As a result, for single process communicators, </span><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSeqAIJSetPreallocation.html#MatSeqAIJSetPreallocation" style="font-family:"Times New Roman";font-size:medium">MatSeqAIJSetPreallocation</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"> is supported, and similarly </span><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMPIAIJSetPreallocation.html#MatMPIAIJSetPreallocation" style="font-family:"Times New Roman";font-size:medium">MatMPIAIJSetPreallocation</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">() is supported for communicators controlling multiple processes. It is recommended that you call both of the above preallocation routines for simplicity.</span> <br></div></div>