sorry, disregard that. I had forgotten to do TSCreate earlier.

On 05/12/2015 04:38 PM, Mark Lohry wrote:
I'm getting a segfault when trying to set up a matrix-free solver:

Program received signal SIGSEGV, Segmentation fault.
0x00002aaaabe7b7de in MatCreateSNESMF (snes=0x0, J=0x7fffffffc340)
    at /home/mlohry/dev/petsc-3.5.3/src/snes/mf/snesmfj.c:151
151      if (snes->vec_func) {
(gdb) bt
#0  0x00002aaaabe7b7de in MatCreateSNESMF (snes=0x0, J=0x7fffffffc340)
    at /home/mlohry/dev/petsc-3.5.3/src/snes/mf/snesmfj.c:151


from the line


  SNES snes; // non-linear algebraic solver context
  TSGetSNES(ts,&snes);
  Mat JacMatFree=NULL;
MatCreateSNESMF(snes,&JacMatFree); // tell non-linear solver this is matrix-free


any idea where this could come from?

Reply via email to