[petsc-dev] [petsc-users] MatPreallocatorPreallocate segfault with PETSC 3.16
Patrick Sanan
patrick.sanan at gmail.com
Tue Feb 1 09:45:34 CST 2022
That works, as in the attached example - Marius, would that work for your
case?
Am Di., 1. Feb. 2022 um 16:33 Uhr schrieb Jed Brown <jed at jedbrown.org>:
> Patrick Sanan <patrick.sanan at gmail.com> writes:
>
> > Am Di., 1. Feb. 2022 um 16:20 Uhr schrieb Jed Brown <jed at jedbrown.org>:
> >
> >> Patrick Sanan <patrick.sanan at gmail.com> writes:
> >>
> >> > Sorry about the delay on this. I can reproduce.
> >> >
> >> > This regression appears to be a result of this optimization:
> >> > https://gitlab.com/petsc/petsc/-/merge_requests/4273
> >>
> >> Thanks for tracking this down. Is there a reason to prefer preallocating
> >> twice
> >>
> >> ierr =
> >> MatPreallocatorPreallocate(preallocator,PETSC_TRUE,A);CHKERRQ(ierr);
> >> ierr =
> >>
> MatPreallocatorPreallocate(preallocator,PETSC_TRUE,A_duplicate);CHKERRQ(ierr);
> >>
> >> versus using MatDuplicate() or MatConvert()?
> >>
> >
> > Maybe if your preallocation is an overestimate for each of two different
> > post-assembly non-zero structures in A and A_duplicate?
>
> Even then, why not preallocate A and duplicate immediately, before
> compressing out zeros?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220201/c3be88d9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex251.c
Type: application/octet-stream
Size: 2442 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20220201/c3be88d9/attachment.obj>
More information about the petsc-dev
mailing list