<div dir="ltr">I have having to fix AIJ methods that don't get the type from the args to set created matrix type, so as to keep the MKL typing.<div><br></div><div>I am not sure how to fix this because I don't know to say 'make MPI from SEQ' in this method</div><div><br></div><div><div>PetscErrorCode MatCreateMPIAIJWithSeqAIJ(MPI_Comm comm,Mat A,Mat B,const PetscInt garray[],Mat *mat)</div><div>{</div><div> ....  </div><div>  ierr = MatCreate(comm,mat);CHKERRQ(ierr);</div><div>  ierr = MatGetSize(A,&m,&n);CHKERRQ(ierr);</div><div>.... </div><div>  ierr = MatSetSizes(*mat,m,n,PETSC_DECIDE,N);CHKERRQ(ierr);</div><div>  ierr = MatSetType(*mat,MATMPIAIJ);CHKERRQ(ierr);</div></div><div><br></div><div>How should I do this?  Other places in the code I get the type from input (MPI) args and set created matrix types accordingly. I could just put a switch with an error for any new types that might come along in the future ...</div><div><br></div><div>Mark</div></div>