Mohammad: > > MatCreate(comm, &A); > MatSetSizes(A, localRowSize, localColumnSize, globalRowSize, > globalColumnSize); > MatSetType(A, MATMPIAIJ); > MatMPIAIJSetPreallocation(A, 0, d_nnz, 0, o_nnz); > MatSetFromOptions(A); > MatGetOwnershipRange(A, &rStart, &rEnd); > > > This (even without MatSetType(A, MATMPIAIJ);) works with 3.2-p6 but not > dev. The only difference I can see is 1) the order of MatSetFromOptions and > 2) I do not call MatSeqAIJSetPreallocation which I think I do not need > anyway. Is there something I'm doing wrong? >
MatSetFromOptions() must be called before MatMPIAIJSetPreallocation(). If user set mattype at runtime, MatSetFromOptions() picks it and set the type accordingly. SetPreallocation() will be called after the type is set. Hong > > Mohammd > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120425/8e9fc0b5/attachment.htm>
