On Thu, Jun 4, 2020 at 6:41 PM Sanjay Govindjee <s...@berkeley.edu> wrote:
> thanks, that did it. now I am wondering about all the other > PETSC_NULL_INTEGER instances in > my code. how should I be thinking about PETSC_NULL_INTEGER I would think it's an integer array/pointer in C. > and > PETSC_DEFAULT_INTEGER, > and an integer in C. > so that I know that I am using the correct one? > > On 6/4/20 3:16 PM, Satish Balay wrote: > > On Thu, 4 Jun 2020, Sanjay Govindjee wrote: > > > >> 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)), > > I think this should be PETSC_DEFAULT_INTEGER. > > > > Previously there were no Interface definitions - so no error checks by > the compiler. > > > > Satish > > > >> & ierr) > >> > >> Any suggestions on what I've messed up? > >> -sanjay > >> > >> > >