Hi, I try to use the VecPlaceArray/VecResetArray functions.
Unfortunately, the call to VecPlaceArray only work the firsdt time I do it, even if I call VecResetArray before the next call... the code looks like this: VecPlaceArray(vec, myvec); ... VecResetArray(vec); VecPlaceArray(vec, myvec2); /* PETSCERROR ON THIS LINE*/ The error I get is the following (from src/vec/vec/impls/seq/dvec2.c:975): if (v->unplacedarray) SETERRQ(PETSC_ERR_ARG_WRONGSTATE,"VecPlaceArray() was already called on this vector, without a call to VecResetArray()"); After looking at the code, I found that MPI vectors where defining a VecPlaceArray_MPI which call VecPlaceArray on the "child" v->localrep (ref: src/vec/vec/impls/mpi/pbvec.c:79), but I haven't found an "overload" of VecResetArray that would do the same work. Is that the problem? I am using PETSc 2.3.3-p6. Thanks, Eric