[petsc-dev] Segmentation faults in MatMatMult & MatTransposeMatMult

Jed Brown jed at jedbrown.org
Wed Jan 16 08:22:32 CST 2019


Matthew Knepley <knepley at gmail.com> writes:

> On Wed, Jan 16, 2019 at 9:01 AM Jed Brown via petsc-dev <
> petsc-dev at mcs.anl.gov> wrote:
>
>> Pierre Jolivet via petsc-dev <petsc-dev at mcs.anl.gov> writes:
>>
>> > OK, I was wrong about MATAIJ, as Jed already pointed out.
>> > What about BAIJ or Dense matrices?
>>
>> BAIJ (and SBAIJ) is handled by MatXAIJSetPreallocation.
>>
>
> Dense matrices don't need preallocation.

True, MatMPIDenseSetPreallocation is more like a *PlaceArray or
Create*WithArray.  The caller needs to be aware of parallelism to create
and use arrays; I guess Pierre does that but doesn't want the noise at
the particular call site (though at least the if statements aren't
needed).


More information about the petsc-dev mailing list