#include "petscvec.h" PetscErrorCode VecCreate(MPI_Comm comm, Vec *vec)If you never call VecSetType() or VecSetFromOptions() it will generate an error when you try to use the vector.
Collective
comm | - The communicator for the vector object |
vec | - The vector object |