[lammps-users] Sporadic Segmentation faults

Hi,

I have noticed that my sims sometimes shows segmentation faults and fails but when I run it a bit later, it runs without the error and works fine. It is sporadic and I don’t know why.

Why is this the case? I am using Feb2016 LAMMPS.

Best,
Aved

Hi,

I have noticed that my sims sometimes shows segmentation faults and fails but when I run it a bit later, it runs without the error and works fine. It is sporadic and I don’t know why.

neither does any of us base on such extremely minimal information.

Why is this the case?

impossible to say without knowing more details. it could be one of many reasons like weak hardware or a bug in the code that is dependent on the specific memory layout and what memory pages are re-used. sometimes these are connected to specific features being used or to how many processors are used and how the system is distributed across processors. it can also be due to having made incorrect modifications to the source code or using packages not bundled with LAMMPS and thus not tested to the degree that bundled source code is tested. it can happen due to running out of stack space and thus depend on the specific ordering of commands.

I am using Feb2016 LAMMPS.

using an old version of LAMMPS could be one of the reasons. over the years since this specific version we have significantly improved on testing, static code analysis and consistent initialization and deallocation of dynamic memory in LAMMPS.

so the first line of action would be to upgrade LAMMPS to the latest available (stable?) version and the second would be to capture the location of the segmentation fault by having the segfault trigger a coredump and generating a stack trace from it (which requires compilation of LAMMPS with debug symbols to be included, that is by including the -g flag when compiling and linking).

axel.