<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">After I changed the Mat type for using GPU, can I still use MatMPIAIJSetPreallocation to set preallocation?<div><br><div>I have add Petsc events in the code.The attachments are the outputs of log_summary (I'll configure --with-debugging=no later).</div><div>The fileinterface.c is my code in which set preallocation and insert matrices values.</div><div><br></div><div>Thank you.</div><div><br></div><div><div>Zeng</div></div><div><div><br><br>ÔÚ 2012-03-16 19:43:38£¬"Jed Brown" <jedbrown@mcs.anl.gov> дµÀ£º<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div class="gmail_quote">2012/3/15 Xiangze Zeng <span dir="ltr"><<a href="mailto:zengshixiangze@163.com">zengshixiangze@163.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">I can see log_summary output when I use -log_summary [filename].<div><br><div>But the time of inserting the matrices values is almost the same when I use PCJACOBI to run the code on GPU instead of PCSOR.They are all much longer than that when I run the code in CPU(I still use a small system to test it). The attachments are outputs of log_summary, c_jacobi_sum is the output of using CPU, PCJACOBI;g_sor_sum using GPU, PCSOR;g_jac_sum using GPU, PCJACOBI. </div>
</div></div></blockquote></div><div><br></div><div><div><font face="'courier new', monospace"> ##########################################################</font></div><div><font face="'courier new', monospace"> # #</font></div>
<div><font face="'courier new', monospace"> # WARNING!!! #</font></div><div><font face="'courier new', monospace"> # #</font></div>
<div><font face="'courier new', monospace"> # This code was compiled with a debugging option, #</font></div><div><font face="'courier new', monospace"> # To get timing results run ./configure #</font></div>
<div><font face="'courier new', monospace"> # using --with-debugging=no, the performance will #</font></div><div><font face="'courier new', monospace"> # be generally two or three times faster. #</font></div>
<div><font face="'courier new', monospace"> # #</font></div><div><font face="'courier new', monospace"> ##########################################################</font></div>
</div><div><br></div><div>It's a waste of time to look at performance of a debug build, especially when it only takes half a second.</div><br><div>You have probably lost preallocation information. I don't see an assembly event, so I can't tell if that is really where the time is. (SNES makes one automatically, you can PetscLogEventRegister(), PetscLogEventBegin/End().</div>
</blockquote></div></div></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>