[petsc-users] PETSC Matrix debugging
Barry Smith
bsmith at petsc.dev
Mon Apr 1 15:14:05 CDT 2024
Note, you can also run with the option -mat_view and it will print each matrix that gets assembled.
Also in the debugger you can do call MatView(mat,0)
> On Apr 1, 2024, at 2:18 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
> This Message Is From an External Sender
> This message came from outside your organization.
> On Mon, Apr 1, 2024 at 1:57 PM Shatanawi, Sawsan Muhammad via petsc-users <petsc-users at mcs.anl.gov <mailto:petsc-users at mcs.anl.gov>> wrote:
>> This Message Is From an External Sender
>> This message came from outside your organization.
>>
>> Hello everyone,
>>
>> I hope this email finds you well.
>>
>> Is there a way we can check how the matrix looks like after setting it.
>> I have tried debugging it with gdb- break points- and print statements, but it only gave me one value instead of a matrix.
>>
>> Thank you in advance for your time and assistance.
>>
> I usually use MatView(), which can print to the screen. Is that what you want?
>
> Thanks,
>
> Matt
>> Best regards,
>>
>> Sawsan
>>
>>
>
>
> --
> 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!bT1jdavVG8lGjxjhujAttmcaK9R1GFUxJtuFl1S2JK74c0mhrCwc2DkQippCFh8qwrk_9x5Dxjv-2H967RRgQPA$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cFl9o86vmX7ZWINcjhpIy1gzc938wF-1bgwtrPGwm8zQQ71WUgVstEpSos7o1OWqfmTup5bgaekGgXgHtARk$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240401/8f033e49/attachment-0001.html>
More information about the petsc-users
mailing list