[petsc-users] MatSeqBAIJSetPreallocation

Sanjay Govindjee s_g at berkeley.edu
Thu Jun 4 16:21:20 CDT 2020


I'm moving from 3.10 to 3.13 and ran into a compilation problem with  
MatSeqBAIJSetPreallocation( ).
The manual page shows:

PetscErrorCode 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscErrorCode.html#PetscErrorCode> 
MatSeqBAIJSetPreallocation 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSeqBAIJSetPreallocation.html#MatSeqBAIJSetPreallocation>(Mat 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/Mat.html#Mat> 
B,PetscInt 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> 
bs,PetscInt 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> 
nz,const PetscInt 
<https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html#PetscInt> 
nnz[])


Which I think is the way it was before but my code is now tossing a 
compile error


    65 |      & PETSC_NULL_INTEGER,mr(np(246)),
       |                                     1
Error: Rank mismatch in argument 'c' at (1) (scalar and rank-1)


The full line looks like:
         call MatSeqBAIJSetPreallocation(Mmat,nsbk,
     & PETSC_NULL_INTEGER,mr(np(246)),
     & ierr)

Any suggestions on what I've messed up?
-sanjay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200604/51cf851a/attachment-0001.html>


More information about the petsc-users mailing list