<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><font size="3" face="Calibri,Helvetica,sans-serif" color="black"><span style="font-size:12pt;">Hello,</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="3" face="Calibri,Helvetica,sans-serif" color="black"><span style="font-size:12pt;"><br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="3" face="Calibri,Helvetica,sans-serif" color="black"><span style="font-size:12pt;">My matrix is too large to be constructed in one node. The matrix construction is the issue here. My matrix is quite sparse
 with less 1% occupancy. If we preallocate the matrix and fill it with zero, won't it effect the sparsity? I suspect it may cause issues during eigenvalue analysis later.
<br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="3" face="Calibri,Helvetica,sans-serif" color="black"><span style="font-size:12pt;"><br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="3" face="Calibri,Helvetica,sans-serif" color="black"><span style="font-size:12pt;">DP<br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="3" face="Calibri,Helvetica,sans-serif" color="black"><span style="font-size:12pt;"><br>
</span></font><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Từ:</b> Matthew Knepley <knepley@gmail.com><br>
<b>Đã gửi:</b> 17 Tháng Tám 2018 4:16:09 CH<br>
<b>Đến:</b> Barry Smith<br>
<b>Cc:</b> Pham, Dung Ngoc; PETSc<br>
<b>Chủ đề:</b> Re: [petsc-users] Implementing checkpoints in matrix construction</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div>
<div dir="ltr">
<div class="x_gmail_quote">
<div dir="ltr">On Fri, Aug 17, 2018 at 4:02 PM Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<br>
   I assume the matrix is relatively sparse?<br>
<br>
   It is not even close to being amenable to this type of thing.<br>
<br>
   I would simply have your program save the matrix entries to disk in some simple binary format and write another simple program that reads them in and sets them into a SeqAIJ matrix,</blockquote>
<div><br>
</div>
<div>It might be that his matrix is too large for the memory of one node. Is it? If so, you could use Jed's scheme for decomposing it.</div>
<div>If that is not easy, you could do that following:</div>
<div><br>
</div>
<div>  1) Preallocate the matrix</div>
<div><br>
</div>
<div>  2) Fill it with zeros</div>
<div><br>
</div>
<div>  3) Start calculating entries and adding them</div>
<div><br>
</div>
<div>  4) At any time you can MatView() the matrix in binary format</div>
<div><br>
</div>
<div>  5) You can always restart your calculations from the last MatView() just by MatLoad()ing that file</div>
<div><br>
</div>
<div>  Thanks,</div>
<div><br>
</div>
<div>     MAtt</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
then VecView that matrix to a binary viewer, finally have your eigenvalue code simply use VecLoad to load the matrix and start the eigen computations.<br>
<br>
   Barry<br>
<br>
<br>
> On Aug 17, 2018, at 2:45 PM, Pham, Dung Ngoc <<a href="mailto:dnpham@wpi.edu" target="_blank">dnpham@wpi.edu</a>> wrote:<br>
> <br>
> Dear Petsc developers and Users,<br>
> <br>
> I am constructing a very large matrices (~5,000,000*5,000,000) for a generalized eigenvalue problem in MPIAIJ format across multiple nodes. The program is to be run on a shared HPC cluster using Slurm workload manager. Due to multiple loops and calculations
 needed, the matrix construction time is long (may span for more than a week).  <br>
> <br>
> Hence, I am trying to see if I can implement checkpoints into the codes, so that the matrix can be constructed partially through multiple job submissions, each job picking up from where the previous one left until the matrix is fully built and we can write
 the global matrix into a binary file for further eigenvalue analysis. My questions are:
<br>
> Does Petsc MPIAIJ format is amenable to such check points? <br>
> If so, are there any subroutines/functions that I can start with?  <br>
> <br>
> I appreciate any comments/suggestions. <br>
> <br>
> Thank you, <br>
> D. N. Pham<br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_gmail_signature">
<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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>