<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body>
It turns out some values in d_nnz were wrong. The program runs fine after I fixed the issue. <div><br></div><div>Thank you all for your help!</div><div><br></div><div>Regards,</div><div>Qin<br><br><br><a href="https://overview.mail.yahoo.com/?.src=iOS">Sent from Yahoo Mail for iPhone</a><br><br><p class="yahoo-quoted-begin" style="font-size: 15px; color: #715FFA; padding-top: 15px; margin-top: 0">On Thursday, January 14, 2021, 5:40 PM, Barry Smith <bsmith@petsc.dev> wrote:</p><blockquote class="iosymail"><div id="yiv9533729845"><div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">A merge request to catch more cases of integer overflow <a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" target="_blank" href="https://gitlab.com/petsc/petsc/-/merge_requests/3562">https://gitlab.com/petsc/petsc/-/merge_requests/3562</a></div><div class="yiv9533729845yqt1785190944" id="yiv9533729845yqt19185"><div class="yiv9533729845"><br clear="none" class="yiv9533729845"><div><br clear="none" class="yiv9533729845"><blockquote class="yiv9533729845" type="cite"><div class="yiv9533729845">On Jan 14, 2021, at 5:18 PM, Barry Smith <<a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" ymailto="mailto:bsmith@petsc.dev" target="_blank" href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:</div><br clear="none" class="yiv9533729845Apple-interchange-newline"><div class="yiv9533729845"></div></blockquote></div></div></div></div><div class="yiv9533729845yqt1785190944" id="yiv9533729845yqt90638"><div><div class="yiv9533729845" style="word-wrap:break-word;"><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div>  These giant sizes are sometime an indication of integer overflow. Did you previously build PETSc with the --with-64-bit-indices ? Are you sure the d_nnz and o_nnz arguments are correct and not too large?<div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">  Barry</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"><div class="yiv9533729845"><br clear="none" class="yiv9533729845"><div class="yiv9533729845"><br clear="none" class="yiv9533729845"><blockquote class="yiv9533729845" type="cite"><div class="yiv9533729845">On Jan 14, 2021, at 4:13 PM, Matthew Knepley <<a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" ymailto="mailto:knepley@gmail.com" target="_blank" href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:</div><br clear="none" class="yiv9533729845Apple-interchange-newline"><div class="yiv9533729845"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845" dir="ltr">On Thu, Jan 14, 2021 at 4:38 PM Qin Lu <<a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" ymailto="mailto:lu_qin_2000@yahoo.com" target="_blank" href="mailto:lu_qin_2000@yahoo.com">lu_qin_2000@yahoo.com</a>> wrote:<br clear="none" class="yiv9533729845"></div><div class="yiv9533729845gmail_quote"><blockquote class="yiv9533729845gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv9533729845">
Hi Matthew,<div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">Thanks for your response! Does CHKERRQ work for FORTRAN-90?</div></div></blockquote><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">Yes, see the examples.</div><div class="yiv9533729845"> </div><blockquote class="yiv9533729845gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv9533729845"><div class="yiv9533729845">I linked my program with debug version of Petsc lib and got more error messages as attached below. I only used 8 processes, but the message said a big number, as well as a huge memory size, which must be wrong since the problem size is not very big. Does this mean the non-zero sizes passed to the subroutine are not correct?</div></div></blockquote><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">Yes, the sizes passed are too large.</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">  Thanks,</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">     Matt</div><div class="yiv9533729845"> </div><blockquote class="yiv9533729845gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv9533729845"><div class="yiv9533729845">Thanks,</div><div class="yiv9533729845">Qin</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">==== error messages =====</div><div class="yiv9533729845"><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: Out of memory. This could be due to allocating</span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: too large an object or bleeding by not properly</span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: destroying unneeded objects.</span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: Memory allocated 0 Memory used by process <a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" dir="ltr" style="text-decoration:underline;"><a dir="ltr" href="tel:2049617920" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="5">2049617920</a></a></span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: Try running with -malloc_dump or -malloc_view for info.</span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: Memory requested 18446744073458206720</span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: See <a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" target="_blank" href="https://www.mcs.anl.gov/petsc/documentation/faq.html" style="text-decoration:underline;">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</span></p><p class="yiv9533729845" style=""><span class="yiv9533729845" style="background-color:rgba(255,255,255,0);">[2]PETSC ERROR: Petsc Release Version 3.12.5, Mar, 29, 2020</span></p><br clear="none" class="yiv9533729845"><br clear="none" class="yiv9533729845"><a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" target="_blank" href="https://overview.mail.yahoo.com/?.src=iOS">Sent from Yahoo Mail for iPhone</a><br clear="none" class="yiv9533729845"><br clear="none" class="yiv9533729845"><p class="yiv9533729845" style="font-size:15px;color:rgb(113,95,250);padding-top:15px;margin-top:0px;">On Thursday, January 14, 2021, 2:30 PM, Matthew Knepley <<a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" ymailto="mailto:knepley@gmail.com" target="_blank" href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:</p><blockquote class="yiv9533729845"><div class="yiv9533729845" id="yiv9533729845gmail-m_-6588212407959388715yiv3795398373"><div class="yiv9533729845"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845" dir="ltr">On Thu, Jan 14, 2021 at 11:58 AM Qin Lu via petsc-users <<a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" ymailto="mailto:petsc-users@mcs.anl.gov" target="_blank" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br clear="none" class="yiv9533729845"></div><div class="yiv9533729845"><blockquote class="yiv9533729845" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv9533729845">
Hello,<div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">My program got error 55 from calling <span class="yiv9533729845">MatMPIAIJSetPreallocation with Petsc version 3.12.5, what does this error mean? Interestingly, the same program using an older version 3.4.2 works fine. I did make necessary interface change in my program when I upgraded to 3.12.5. </span></div></div></blockquote><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">1) You should always call CHKERRQ(ierr) after a Petsc call. Then you will get the full error message and stack to send in.</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">2) Your error code is here:</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">  <a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" target="_blank" href="https://gitlab.com/petsc/petsc/-/blob/v3.12.5/include/petscerror.h#L17">https://gitlab.com/petsc/petsc/-/blob/v3.12.5/include/petscerror.h#L17</a></div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">3) It is a memory error. You asked for more memory than your machine could allocate.</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">  Thanks,</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845">     Matt</div><div class="yiv9533729845" id="yiv9533729845gmail-m_-6588212407959388715yiv3795398373yqtfd05748"><div class="yiv9533729845"> </div></div><blockquote class="yiv9533729845" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"><div class="yiv9533729845"><div class="yiv9533729845" id="yiv9533729845gmail-m_-6588212407959388715yiv3795398373yqtfd69522"><div class="yiv9533729845"><span class="yiv9533729845">Thanks in advance for your help. </span></div><div class="yiv9533729845"><span class="yiv9533729845"><br clear="none" class="yiv9533729845"></span></div><div class="yiv9533729845"><span class="yiv9533729845">Regards,</span></div><div class="yiv9533729845"><span class="yiv9533729845">Qin</span></div></div>
</div></blockquote></div><br clear="all" class="yiv9533729845"><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div>-- <br clear="none" class="yiv9533729845"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br clear="none" class="yiv9533729845">-- Norbert Wiener</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845"><a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" target="_blank" href="http://www.cse.buffalo.edu/~knepley/">https://www.cse.buffalo.edu/~knepley/</a><div class="yiv9533729845" id="yiv9533729845gmail-m_-6588212407959388715yiv3795398373yqtfd16347"><br clear="none" class="yiv9533729845"></div></div></div></div></div></div></div></div></div><div class="yiv9533729845" id="yiv9533729845gmail-m_-6588212407959388715yiv3795398373yqtfd88236">
</div></div></div><blockquote class="yiv9533729845"></blockquote></blockquote></div>
</div></blockquote></div><br clear="all" class="yiv9533729845"><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div>-- <br clear="none" class="yiv9533729845"><div class="yiv9533729845gmail_signature" dir="ltr"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845"><div class="yiv9533729845" dir="ltr"><div class="yiv9533729845">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br clear="none" class="yiv9533729845">-- Norbert Wiener</div><div class="yiv9533729845"><br clear="none" class="yiv9533729845"></div><div class="yiv9533729845"><a rel="nofollow noopener noreferrer" shape="rect" class="yiv9533729845" target="_blank" href="http://www.cse.buffalo.edu/~knepley/">https://www.cse.buffalo.edu/~knepley/</a><br clear="none" class="yiv9533729845"></div></div></div></div></div></div></div></div>
</div></blockquote></div><br clear="none" class="yiv9533729845"></div></div></div><br clear="none" class="yiv9533729845"></div></div></div><blockquote></blockquote></blockquote></div>
</body></html>