exit code 11 - address not mapped - segmentation fault

Dear lammps users,

I have seen that errors similar to this have been extensively discussed in mailing list but reading many of the answers none seemed to be similar so i’ll explain the issue.

I created a new simulation, very similar to others i have been performing, just diiodimethane instead of water.

The datafile and input are attached.

I tried to run it on two different computers which have different lammps versions:

  1. 11 aug 2017 ( i just use it to try the scripts syntax etc)

Reading data file …
orthogonal box = (0 0 -5) to (64.206 64.206 495)
1 by 1 by 1 MPI processor grid
[annalisa-Precision-T7610:18610] *** Process received signal ***
[annalisa-Precision-T7610:18610] Signal: Segmentation fault (11)
[annalisa-Precision-T7610:18610] Signal code: Address not mapped (1)
[annalisa-Precision-T7610:18610] Failing at address: (nil)
[annalisa-Precision-T7610:18610] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f1da064f390]
[annalisa-Precision-T7610:18610] [ 1] lammps(_ZN9LAMMPS_NS8ReadData10bondcoeffsEv+0x160)[0x78e0c0]
[annalisa-Precision-T7610:18610] [ 2] lammps(_ZN9LAMMPS_NS8ReadData7commandEiPPc+0x2e76)[0x793046]
[annalisa-Precision-T7610:18610] [ 3] lammps(_ZN9LAMMPS_NS5Input15command_creatorINS_8ReadDataEEEvPNS_6LAMMPSEiPPc+0x39)[0x565e59]
[annalisa-Precision-T7610:18610] [ 4] lammps(_ZN9LAMMPS_NS5Input15execute_commandEv+0x7a3)[0x563433]
[annalisa-Precision-T7610:18610] [ 5] lammps(_ZN9LAMMPS_NS5Input4fileEv+0x337)[0x563f37]
[annalisa-Precision-T7610:18610] [ 6] lammps(main+0x46)[0x4f4c86]
[annalisa-Precision-T7610:18610] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f1d9f2e7830]
[annalisa-Precision-T7610:18610] [ 8] lammps(_start+0x29)[0x4f67f9]
[annalisa-Precision-T7610:18610] *** End of error message ***
Segmentation fault (core dumped)

  1. 12 dec 2018 on a computation center server
    = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
    = PID 45528 RUNNING AT r111c13s04
    = EXIT CODE: 11
    = CLEANING UP REMAINING PROCESSES
    = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
    =================================================================================== Intel® MPI Library trouble$
    https://software.intel.com/node/561764

segmentation_fault.tar.xz (269 KB)

Greetings Lorenzo,

A lot of reasons could cause this; your system or LAMMPS. To narrow down which I suggest using ulimit -c unlimited on your input so that the job termination will generate a core dump. Loading this core dump (if it is output) into the gdb debugger will then tell us if the segfault happened in LAMMPS. If there is no core dump chances are this is an issue with your MPI or C++ libs. If the core dump points to some odd library function in the stack, likely the same reason.

Sincerely,
Adrian Diaz

Hello Lorenzo,

I think there is a formatting error in your data file. Specifically there is an extra blank line under “Bond Coeffs”.

-David

Thank you! Solved

Indeed there was and seems to run now, but why didn’t it give “incorrect data format” or similar as it happened me a lot of other times?

Just to understand the logic behind

Thank you! Solved

Indeed there was and seems to run now, but why didn’t it give “incorrect data format” or similar as it happened me a lot of other times?

that is because some code was added at some point, that assumed you always input correctly formatted data files.
i’ve identified the issue and added a suitable change so that future versions of LAMMPS will print an error message in these cases instead of a segfault.

axel.