<div dir="ltr">Is it because indices for the nonzeros also need memory?<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--Junchao Zhang</div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 2, 2020 at 10:04 PM Karl Lin <<a href="mailto:karl.linkui@gmail.com">karl.linkui@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi, Matthew</div><div><br></div><div>Thanks for the reply. However, I don't really get why additional malloc would double the memory footprint. If I know there is only 1GB matrix being loaded, there shouldn't be 2GB memory occupied even if Petsc needs to allocate more space.</div><div><br></div><div>regards,</div><div><br></div><div>Karl<br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jul 2, 2020 at 8:10 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr">On Thu, Jul 2, 2020 at 7:30 PM Karl Lin <<a href="mailto:karl.linkui@gmail.com" target="_blank">karl.linkui@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr"><div>Hi, Matt</div><div><br></div><div>Thanks for the tip last time. We just encountered another issue with large data sets. This time the behavior is the opposite from last time. The data is 13.5TB, the total number of matrix columns is 2.4 billion. Our program crashed during matrix loading due to memory overflow in one node. As said before, we have a little memory check during loading the matrix to keep track of rss. The printout of rss in the log shows normal increase in many nodes, i.e., if we load in a portion of the matrix that is 1GB, after MatSetValues for that portion, rss will increase roughly about 1GB. On the node that has memory overflow, the rss increased by 2GB after only 1GB of matrix is loaded through MatSetValues. We are very puzzled by this. What could make the memory footprint twice as much as needed? Thanks in advance for any insight.</div></div></div></blockquote><div><br></div><div>The only way I can imagine this happening is that you have not preallocated correctly, so that some values are causing additional mallocs.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div><div>Karl <span><span><br></span></span></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jun 11, 2020 at 12:00 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr">On Thu, Jun 11, 2020 at 12:52 PM Karl Lin <<a href="mailto:karl.linkui@gmail.com" target="_blank">karl.linkui@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr"><div>Hi, Matthew</div><div><br></div><div>Thanks for the suggestion, just did another run and here are some detailed stack traces, maybe will provide some more insight:</div><div> *** Process received signal ***<br>Signal: Aborted (6)<br>Signal code: (-6)<br>/lib64/libpthread.so.0(+0xf5f0)[0x2b56c46dc5f0]</div><div> [ 1] /lib64/libc.so.6(gsignal+0x37)[0x2b56c5486337]<br> [ 2] /lib64/libc.so.6(abort+0x148)[0x2b56c5487a28]<br> [ 3] /libpetsc.so.3.10(PetscTraceBackErrorHandler+0xc4)[0x2b56c1e6a2d4]<br> [ 4] /libpetsc.so.3.10(PetscError+0x1b5)[0x2b56c1e69f65]<br> [ 5] /libpetsc.so.3.10(PetscCommBuildTwoSidedFReq+0x19f0)[0x2b56c1e03cf0]<br> [ 6] /libpetsc.so.3.10(+0x77db17)[0x2b56c2425b17]<br> [ 7] /libpetsc.so.3.10(+0x77a164)[0x2b56c2422164]<br> [ 8] /libpetsc.so.3.10(MatAssemblyBegin_MPIAIJ+0x36)[0x2b56c23912b6]<br> [ 9] /libpetsc.so.3.10(MatAssemblyBegin+0xca)[0x2b56c1feccda]<br></div><div><br></div><div>By reconfiguring, you mean recompiling petsc with that option, correct?</div></div></div></blockquote><div><br></div><div>Reconfiguring.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr"><div>Thank you.</div><div><br></div><div>Karl<span><span><br></span></span></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Thu, Jun 11, 2020 at 10:56 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div dir="ltr">On Thu, Jun 11, 2020 at 11:51 AM Karl Lin <<a href="mailto:karl.linkui@gmail.com" target="_blank">karl.linkui@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div>Hi, there</div><div><br></div><div>We have written a program using Petsc to solve large sparse matrix system. It has been working fine for a while. Recently we encountered a problem when the size of the sparse matrix is larger than 10TB. We used several hundred nodes and 2200 processes. The program always crashes during MatAssemblyBegin.Upon a closer look, there seems to be something unusual. We have a little memory check during loading the matrix to keep track of rss. The printout of rss in the log shows normal increase up to rank 2160, i.e., if we load in a portion of matrix that is 1GB, after MatSetValues for that portion, rss will increase roughly about that number. From rank 2161 onwards, the rss in every rank doesn't increase after matrix loaded. Then comes MatAssemblyBegin, the program crashed on rank 2160. </div><div><br></div><div>Is there a upper limit on the number of processes Petsc can handle? or is there a upper limit in terms of the size of the matrix petsc can handle? Thank you very much for any info.</div></div></blockquote><div><br></div><div>It sounds like you overflowed int somewhere. We try and check for this, but catching every place is hard. Try reconfiguring with</div><div><br></div><div> --with-64-bit-indices</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div dir="ltr"><div>Regards,</div><div><br></div><div>Karl </div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>