[lammps-users] Segmentation fault at output->setup

Hello everybody,

i am having a segmentation fault with this backtrace:

#0 0x00002aaaabc50ed8 in int_mallinfo () from /lib64/libc.so.6
#1 0x00002aaaabc5747e in mallinfo () from /lib64/libc.so.6
#2 0x00002aaaab3818bc in LAMMPS_NS::Info::get_memory_info (this=0x7fffffff3950, meminfo=0x7fffffff3a10) at ../info.cpp:1314
#3 0x00002aaaab320ba5 in LAMMPS_NS::Output::memory_usage (this=0x450c80) at ../output.cpp:824
#4 0x00002aaaab31bae8 in LAMMPS_NS::Output::setup (this=0x450c80, memflag=1) at ../output.cpp:248
#5 0x00002aaaab4268a0 in LAMMPS_NS::Min::setup (this=0x452d20, flag=1) at ../min.cpp:330
#6 0x00002aaaab733052 in LAMMPS_NS::abc::min (this=0x7fffffff60e0, narg=4, arg=0x5d90d0) at ../abc.cpp:397
#7 0x00002aaaab732032 in LAMMPS_NS::abc::normalabc (this=0x7fffffff60e0, narg=15, arg=0x539c20) at ../abc.cpp:255
#8 0x00002aaaab731224 in LAMMPS_NS::abc::command (this=0x7fffffff60e0, narg=15, arg=0x539c20) at ../abc.cpp:132
#9 0x00002aaaaafc2b24 in LAMMPS_NS::Input::command_creator<LAMMPS_NS::ABC> (lmp=0x414c20, narg=15, arg=0x539c20) at ../input.cpp:798
#10 0x00002aaaaafb7612 in LAMMPS_NS::Input::execute_command (this=0x438840) at ../input.cpp:781
#11 0x00002aaaaafb475d in LAMMPS_NS::Input::file (this=0x438840) at ../input.cpp:270

#12 0x0000000000400ade in main (argc=3, argv=0x7fffffff6608) at ../main.cpp:64

The ABC command is an own code. Is this related to my own code or to my dump command ? This occurs after over 20 hours of simulation.

Best regards

abc.in (2.87 KB)

Please alway report the LAMMPS version and the platform you are using (including compiler).

A) as the stack trace clearly indicates, this happens during a “setup” phase of a minimization started by your code. That would usually only happen at the beginning of a calculation.

B) this happens when executing a library function that is not likely to segfault, which suggests that you have a corrupted stack memory or worse. Thus likely some serious programming issue.


Hello Alex,

i am using the version from 24th december and GCCcore/.8.3.0. This is happening after many steps. Is my compiler an issue or is it a coding issue ?

Thank you.

This is not likely a compiler related issue.

Hello Axel,

found it. Thanks a lot for your support.

Best regards