[petsc-users] MatMPIBAIJSetPreallocationCSR i and j indices

Barry Smith bsmith at mcs.anl.gov
Sun Sep 29 16:14:19 CDT 2013


On Sep 29, 2013, at 2:52 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Barry Smith <bsmith at mcs.anl.gov> writes:
>> 
>>    Also there is no way to get this flag into MatCreateMPIBAIJWithArrays()
> 
> The user calls MatSetOption before making that call and changes it
> afterward if they want.

   Huh?  I can't do

   MatSetOption(?, MAT_ROW_ORIENTED,something)
   MatCreateMPIBAIJWithArrays(……, &mat);

   because mat doesn't exist before the MatCreate… () call. Now obviously they could call the several routines instead of MatCreateMPIBAIJWithArrays() but then we still need to decide what format MatCreateMPIBAIJWithArrays() should use since the user cannot choose from several. I conclude the best thing to do is to just use the default column oriented as the only possibility.  If, by chance, the user built their block CSR by row (in the block) they could easily change that around at the same time they "ported" to PETSc, this change would presumably be trivial in their code and matches our mantra that PETSc will provide some tools for porting legacy CSR based codes to PETSc but won't make it a rich flexible development environment for working with legacy CSR codes.


   Barry




More information about the petsc-users mailing list