[petsc-dev] NULL arg for AIJ field with MATIS
Matthew Knepley
knepley at gmail.com
Sun Jul 6 13:12:49 CDT 2025
On Thu, Jul 3, 2025 at 2:25 PM Mark Adams <mfadams at lbl.gov> wrote:
> I added a case to the SeqAIJ options switch:
>
It looks like the local matrix is created by MatSetLocalToGlobalMapping(),
so you cannot call MatSetOption() before that. You should probably put in a
check
if (a->A)
here.
Thanks,
Matt
> case MAT_COO_BLOCKED_ASSEMBLY:
> A->coo_blocked_assembly = flg;
> break;
>
> And added the flag for this to mat/tests/ex123* and when we have
> '-mat_type is', I get matis calling *MatSetOption* with a NULL argument
> (a->A)
>
> What is wrong here? Not being able to use blocked assembly for matis is
> fine, but this is not a useful error message.
>
> x* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
> frame #0: 0x0000000128c58223 libpetsc.3.023.dylib`PetscError(comm=0,
> line=-1, func=0x0000000000000000, file="", n=PETSC_SUCCESS,
> p=PETSC_ERROR_INITIAL, mess="*Null Pointer: Parameter # %d*") at err.c:387
> frame #1: 0x000000011fa3df99 libpetsc.3.023.dylib`*MatSetOption(mat=0x0000000000000000,
> op=MAT_COO_BLOCKED_ASSEMBLY, flg=PETSC_TRUE) a*t matrix.c:6048:3
> * frame #2: 0x000000011ebdcfef
> libpetsc.3.023.dylib`MatSetOption_IS(A=0x0000621000004350,
> op=MAT_COO_BLOCKED_ASSEMBLY, flg=PETSC_TRUE) at matis.c:3286:3
> frame #3: 0x000000011fa4a7e0
> libpetsc.3.023.dylib`MatSetOption(mat=0x0000621000004350,
> op=MAT_COO_BLOCKED_ASSEMBLY, flg=PETSC_TRUE) at matrix.c:6127:3
> frame #4: 0x000000011fd87f66
> libpetsc.3.023.dylib`MatSetFromOptions(B=0x0000621000004350) at
> gcreate.c:320:12
> frame #5: 0x00000001000039d3 ex123`main(argc=11,
> args=0x000000030412d1f0) at ex123.c:44:3
> frame #6: 0x0000000200018530 dyld`start + 3056
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Y7FVPyBD4utSlNmPo6u3Usp0JteK7FhlhlRO4G2luhVpQ5jMWf64Uevry1RMuDlGq4tarX6JlOWIpmdPEKWw$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Y7FVPyBD4utSlNmPo6u3Usp0JteK7FhlhlRO4G2luhVpQ5jMWf64Uevry1RMuDlGq4tarX6JlOWIpvplkzV2$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20250706/a2b86d61/attachment.html>
More information about the petsc-dev
mailing list