<div dir="ltr"><div dir="ltr">On Thu, Jul 3, 2025 at 2:25 PM Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I added a case to the SeqAIJ options switch:</div></blockquote><div><br></div><div>It looks like the local matrix is created by MatSetLocalToGlobalMapping(), so you cannot call MatSetOption() before that. You should probably put in a check</div><div><br></div><div> if (a->A)</div><div><br></div><div>here.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> case MAT_COO_BLOCKED_ASSEMBLY:<br> A->coo_blocked_assembly = flg;<br> break;</div><div><br></div><div>And added the flag for this to mat/tests/ex123* and when we have '-mat_type is', I get matis calling <b>MatSetOption</b> with a NULL argument (a->A)</div><div><br></div><div>What is wrong here? Not being able to use blocked assembly for matis is fine, but this is not a useful error message.</div><div><br></div><div>x* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1</div> frame #0: 0x0000000128c58223 libpetsc.3.023.dylib`PetscError(comm=0, line=-1, func=0x0000000000000000, file="", n=PETSC_SUCCESS, p=PETSC_ERROR_INITIAL, mess="<b>Null Pointer: Parameter # %d</b>") at err.c:387<br> frame #1: 0x000000011fa3df99 libpetsc.3.023.dylib`<b>MatSetOption(mat=<font color="#ff0000">0x0000000000000000</font>, op=MAT_COO_BLOCKED_ASSEMBLY, flg=PETSC_TRUE) a</b>t matrix.c:6048:3<br> * frame #2: 0x000000011ebdcfef libpetsc.3.023.dylib`MatSetOption_IS(A=0x0000621000004350, op=MAT_COO_BLOCKED_ASSEMBLY, flg=PETSC_TRUE) at matis.c:3286:3<br> frame #3: 0x000000011fa4a7e0 libpetsc.3.023.dylib`MatSetOption(mat=0x0000621000004350, op=MAT_COO_BLOCKED_ASSEMBLY, flg=PETSC_TRUE) at matrix.c:6127:3<br> frame #4: 0x000000011fd87f66 libpetsc.3.023.dylib`MatSetFromOptions(B=0x0000621000004350) at gcreate.c:320:12<br> frame #5: 0x00000001000039d3 ex123`main(argc=11, args=0x000000030412d1f0) at ex123.c:44:3<br> frame #6: 0x0000000200018530 dyld`start + 3056</div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Y7FVPyBD4utSlNmPo6u3Usp0JteK7FhlhlRO4G2luhVpQ5jMWf64Uevry1RMuDlGq4tarX6JlOWIpvplkzV2$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>