0

I am using KiFMM and PETSc for my code. It had no problems for the serial version, but when I am trying to use MPI with 2 nodes I am now getting an error at (*trgPos)(j,i), which is of type DblNumMat as seen here: http://www.mrl.nyu.edu/~harper/kifmm3d/documentation/common/html/nummat_8hpp_18ed51e81f911a23442591467d7a83ca.html.

The backtrace from gdb shows this:

 Program received signal SIGSEGV, Segmentation fault.
0x000000000070761e in NumMat<double>::operator() (this=0x0, i=0, j=0)
at /directory/src/Onepart/../../inc/KIFMM3D/common/nummat.hpp:101
101      assert( i>=0 && i<_m && j>=0 && j<_n );
 (gdb) bt
 #0  0x000000000070761e in NumMat<double>::operator() (this=0x0, i=0, j=0)
at /directory/src/Onepart/../../inc/KIFMM3D/common/nummat.hpp:101

Anyone know why this is occurring and what I can do about it?

M K
  • 69
  • 2
  • 8

1 Answers1

0
NumMat<double>::operator() (this=0x0, i=0, j=0)
                            ^^^^^^^^

This shows that you are calling the operator() through a NULL pointer and should already hint you that trgPos is that NULL pointer. You should examine the code and trace the code path that each rank takes. It must be that in some cases trgPos is not properly initialised or it could be that the memory allocation operator is failing due to lack of memory.

Hristo Iliev
  • 72,659
  • 12
  • 135
  • 186