<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><span></span></div><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="direction: ltr;">Hello</div><div style="direction: ltr;"><span style="background-color: rgba(255, 255, 255, 0);"><blockquote type="cite">Is there any reason to use ADD_VALUES? Since you need to insert each value for an individual column/row exactly once?<br><br>  In the timings you sent did you zero the matrix before? Does it make a difference in the timing for setting values into there matrix?</blockquote>I don’t need to use add values and In all previous emails it is only used once for the sake testing and as a result I use it with MatZeroEntries </span></div><div style="direction: ltr;"><span style="background-color: rgba(255, 255, 255, 0);">It costs more time but only very small but MatZeroEntries is what costs some time </span></div><div></div><blockquote type="cite"><blockquote type="cite"><div><span style="background-color: rgba(255, 255, 255, 0);">With InsertValues</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">FillMAT_with_MatSetValues     100 1.0 2.5512e+00 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 16  0  0  0  0  93  0  0  0  0     0<br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">WithAddValues</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">FillPetscMat     100 1.0 2.6654e+00 1.0 7.44e+07 1.0 0.0e+00 0.0e+00 0.0e+00 17 53  0  0  0  90100  0  0  0   167<br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">Additionally I have to zero the matrix which costs</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">MatZeroEntries       100 1.0 9.5259e-02 1.2 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00  1  0  0  0  0   3  0  0  0  0     0<br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);"> INSERT_VALUES is abit faster than ADD_VALUES the difference I saw can be attributed to the cost computation ( addition)</span></div></blockquote></blockquote><div id="AppleMailSignature" dir="ltr">Regards,<div>Mohamed M. Kamra</div></div><div dir="ltr"><br>On Jul 21, 2019, at 12:05 PM, Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><span>Is there any reason to use ADD_VALUES? Since you need to insert each value for an individual column/row exactly once?</span><br><span></span><br><span>   In the timings you sent did you zero the matrix before? Does it make a difference in the timing for setting values into there matrix?</span></div></blockquote></div></body></html>