<div class="gmail_quote">2012/3/13 Xiangze Zeng <span dir="ltr">&lt;<a href="mailto:zengshixiangze@163.com">zengshixiangze@163.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At the beginning and end of  the codes for setting the matrices values, I add &quot;printf&quot;, and compute the time of this period. It is much longer than that when I don&#39;t use the GPU. I just guess the time is used for copping data. My PCTYPE is sor. And 2000 iterations.  Do you have any suggestion about this?</blockquote>
</div><br><div>I suspect you have lost preallocation information when the matrix type was changed. Make sure you set preallocation after setting the matrix type.</div>