[petsc-dev] NULL arg for AIJ field with MATIS
Mark Adams
mfadams at lbl.gov
Mon Jul 7 06:21:30 CDT 2025
👍
Mark Adams reacted via Gmail
<https://urldefense.us/v3/__https://www.google.com/gmail/about/?utm_source=gmail-in-product&utm_medium=et&utm_campaign=emojireactionemail*app__;Iw!!G_uCfscf7eWS!ZCvL2B3RCyVU8AELVaVz1mh39rVjbdj17eUx59EvTOv1mWKiKHjQyYXHkpPt1EtphrAvg1z6E5pJ7B-R37wmKA$ >
On Sun, Jul 6, 2025 at 2:13 PM Matthew Knepley <knepley at gmail.com> wrote:
> 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!ZCvL2B3RCyVU8AELVaVz1mh39rVjbdj17eUx59EvTOv1mWKiKHjQyYXHkpPt1EtphrAvg1z6E5pJ7B8UJsbfyA$
> <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ZCvL2B3RCyVU8AELVaVz1mh39rVjbdj17eUx59EvTOv1mWKiKHjQyYXHkpPt1EtphrAvg1z6E5pJ7B_73jpsKA$ >
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/vnd.google.email-reaction+json
Size: 37 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20250707/1a310a50/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20250707/1a310a50/attachment.html>
More information about the petsc-dev
mailing list