Thanks a lot Dave and Jed! That helped :) On Jan 25, 2015 7:40 PM, "Jed Brown" <[email protected]> wrote:
> Dave May <[email protected]> writes: > > > This type of bizarre unexplainable behaviour usually indicates memory > > corruption. > > For example: an illegal read of write from an array. > > I suggest you run your code through valgrind to rule this out. > > > > Also, I would recommend you modify and annotate your functions to enable > > petsc to generate a stack trace when segv's occur, i.e., declare them > like > > this > > > > #undef __FUNCT__ > > #define __FUNCT__ "MyFunction" > > PetscErrorCode MyFunction(void) > > { > > I agree with everything Dave says, but put the following before the > first statement in the function. > > PetscFunctionBeginUser; > > > PetscFunctionReturn(0); > > } >
