Code Stability Problems in 3D

I’ve had several problems with my code in 3D, and now one more is left.
If I just place spheres into the lattice (via the Domainfunctional) the code works fine (at least up to 265000 iteration steps).

But if I place my structures of interest into the lattice, it will crash sooner or later (20k to 60k steps so far).
Now what I’m wondering about is the error message :

[PC183:14967] *** Process received signal ***
[PC183:14967] Signal: Segmentation fault (11)
[PC183:14967] Signal code: Address not mapped (1)
[PC183:14967] Failing at address: 0xbf0bb60c
[PC183:14967] [ 0] [0xb77da410]
[PC183:14967] [ 1] finderror02(_ZN3plb14BlockLattice3DIdNS_11descriptors21ForcedD3Q19DescriptorEE16collideAndStreamENS_5Box3DE+0x30e) [0x80ee19e]
[PC183:14967] [ 2] finderror02(_ZN3plb19MultiBlockLattice3DIdNS_11descriptors21ForcedD3Q19DescriptorEE16collideAndStreamEv+0xe2) [0x80e64a2]

were a Segmentation fault usually is the result of moving out of the range of an array or something similar. So I don’t understand why this should happen after 20k or 60k steps, and not right at the beginning.

Or is this the MPI way telling me occoured somewhere ?

Any ideas/hints ?


Segmentation faults appear always with arrays. Can you look whether you deleted or created some additional arrays after 20k or 60k or you try to access.

Also, use gdb to debug - you need to compile the program with -g flag. Then issue the command gdb name_of_executable

Type run
Wait until it crashes - when you can type backtrace and see which line the error occurs.

Hopefully it will help,

Hi Alex,

thanks, I’ll try it