<div dir="ltr">On Fri, Apr 5, 2013 at 7:05 AM, George Pau <span dir="ltr"><<a href="mailto:gpau@lbl.gov" target="_blank">gpau@lbl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi <div><br></div><div>Just a follow up on the previous email which was sent accidentally. The info during assembly indicates there is no mallocs (typo in previous email). In addition, mncon is 18 and so the total nonzero column blocks per row block is greater than the nonzero blocks shown. If I use a single processor, I do not see the above error.</div>
</div></blockquote><div><br></div><div style>Then this is likely you are not dividing the nonzeros between the diagonal and off-diagonal blocks correctly.</div><div style><br></div><div style> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>Thanks,</div><div>George</div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 4, 2013 at 1:01 PM, George Pau <span dir="ltr"><<a href="mailto:gpau@lbl.gov" target="_blank">gpau@lbl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am trying to determine where there is malloc when I am doing a MatSetValuesBlocked. The following is the error:</div>
<div><br></div><div><div>[1]PETSC ERROR: --------------------- Error Message ------------------------------------</div>
<div>[1]PETSC ERROR: Argument out of range!</div><div>[1]PETSC ERROR: New nonzero at (69216,95036) caused a malloc!</div><div><br></div><div>However, when I look at the info during the assembly, I have </div><div>
<br></div><div><div>[0] MatAssemblyBegin_MPIBAIJ(): Stash has 0 entries,uses 0 mallocs.</div><div>[0] MatAssemblyBegin_MPIBAIJ(): Block-Stash has 0 entries, uses 0 mallocs.</div><div>[1] MatAssemblyEnd_SeqBAIJ(): Matrix size: 381300 X 381300, block size 4; storage space: 14143776 unneeded, 10259424 used</div>
<div>[1] MatAssemblyEnd_SeqBAIJ(): Number of mallocs during MatSetValues is 0</div><div>[1] MatAssemblyEnd_SeqBAIJ(): Most nonzeros blocks in any row is 16</div><div>[0] MatAssemblyEnd_SeqBAIJ(): Matrix size: 381300 X 381300, block size 4; storage space: 13696176 unneeded, 10707024 used</div>
<div>[0] MatAssemblyEnd_SeqBAIJ(): Number of mallocs during MatSetValues is 0</div><div>[0] MatAssemblyEnd_SeqBAIJ(): Most nonzeros blocks in any row is 11</div><div><br></div><div>which indicates there is mallocs.</div>
<div><br></div><div>The following is how I set up the matrix:</div><div><br></div><div><div>call MatCreate(PETSC_COMM_WORLD,petsc_obj%jacmat, pierr) </div><div>call MatSetSizes(petsc_obj%jacmat,PETSC_DECIDE,PETSC_DECIDE,nel*neq,nel*neq,pierr)</div>
<div>call MatSetFromOptions(petsc_obj%jacmat,pierr)<br></div><div>call MatSetBlockSize(petsc_obj%jacmat,neq,pierr)<br></div><div>call MatSetType(petsc_obj%jacmat,MATBAIJ,pierr)</div><div>call MatSeqBAIJSetPreallocation(petsc_obj%jacmat,neq,(mncon+1)*neq*neq,PETSC_NULL_INTEGER,pierr)</div>
<div>call MatMPIBAIJSetPreallocation(petsc_obj%jacmat, </div><div>neq,neq*neq,PETSC_NULL_INTEGER,mncon*neq*neq,PETSC_NULL_INTEGER,pierr)</div><div> call MatSetOption(petsc_obj%jacmat,MAT_ROW_ORIENTED,PETSC_FALSE,pierr) !because of how aval is stored.</div>
<span><font color="#888888">
</font></span></div></div><span><font color="#888888"><div><br></div>-- <br><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">George Pau</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Earth Sciences Division</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Lawrence Berkeley National Laboratory</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">One Cyclotron, MS 74-120</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Berkeley, CA 94720</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><a href="tel:%28510%29%20486-7196" value="+15104867196" target="_blank">(510) 486-7196</a><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<a href="mailto:gpau@lbl.gov" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">gpau@lbl.gov</a><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<a href="http://esd.lbl.gov/about/staff/georgepau/" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">http://esd.lbl.gov/about/staff/georgepau/</a><br>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">George Pau</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Earth Sciences Division</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Lawrence Berkeley National Laboratory</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">One Cyclotron, MS 74-120</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Berkeley, CA 94720</span><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><a href="tel:%28510%29%20486-7196" value="+15104867196" target="_blank">(510) 486-7196</a><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<a href="mailto:gpau@lbl.gov" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">gpau@lbl.gov</a><br style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<a href="http://esd.lbl.gov/about/staff/georgepau/" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">http://esd.lbl.gov/about/staff/georgepau/</a><br>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>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>