Mark Adams <[email protected]> writes: > MatSetup was the issues: this seems to work with and w/o -mat_type dense: > > call MatCreate(solver%comm,solver%schur,ierr); > call > MatSetSizes(solver%schur,nloc,nloc,PETSC_DECIDE,PETSC_DECIDE,ierr) > call MatSetType(solver%schur,MATAIJ,ierr) > call > MatSeqAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,ierr) > call > MatMPIAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,i,PETSC_NULL_INTEGER,ierr) > call MatSetFromOptions(solver%schur,ierr)
Changing the matrix type (-mat_type) after calling the preallocation functions above will lose that preallocation information. Better to call MatSetFromOptions first. > call MatSetup(solver%schur,ierr) How is A->preallocated being set? MatSetValues checks for it and MatSetType makes it false. We need to find out why so that users don't stumble over this.
pgp39qYvSOp0G.pgp
Description: PGP signature
