rodarima / cpic

Particle in Cell simulation of plasma in C
GNU General Public License v3.0
1 stars 1 forks source link

Particle out of chunk with 16 processes #17

Closed rodarima closed 4 years ago

rodarima commented 4 years ago

src/interpolate.c:185: void interpolate_p2f(pchunk_t , vi64 , vf64 , vf64 , vf64 , vf64 , vf64, mat_t *): Assertion `x[Y][iv] >= c->x0[Y][iv]' failed

(gdb) p c->x0[Y]
$1 = {12, 12, 12, 12}
(gdb) p x[Y]
$2 = {0, 5.0058335984118427e-317, 5.0058335984118427e-317, 5.0093750609612327e-317}
(gdb) p c->x1[Y]
$3 = {16, 16, 16, 16}

The ppack is bad:

(gdb) p/x p->magic
$20 = {0x7fa8a70d5738, 0x92fc20, 0x1, 0x0}
rodarima commented 4 years ago

The pointer p was never initialized, as we only have 3 particles, so never gets into the first loop in interpolate_p2f_rho.