segmentation fault of compute chunk/atom molecule

Dear LAMMPS users,

I have a problem related to segmentation fault.

LAMMPS version I used is 11Apr15 and I ran the simulation with multi-processors.

All of my input script are read by LAMMPS well.
The log file shows “Setting up run …”.
Afterwards, however, error occurs and simulation stops. “5 total processes killed (some possibly by mpirun during cleanup)”

I tested to find which line or command is problematic.
when i include a command below

compute bcpmol bcp chunk/atom molecule &
nchunk once limit 0 ids once compress no

segmentation errors shown below occur.

Without that command, simulation is continued.

*** Process received signal ***
Signal: Segmentation fault (11)
Signal code: Address not mapped (1)
Failing at address: 0x210
[ 0] /lib64/libpthread.so.0 [0x338220e4c0]
[ 1] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZN9LAMMPS_NS16ComputeChunkAtom14compute_ichunkEv+0x4ec) [0x57942c]
[ 2] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZN9LAMMPS_NS6Modify5setupEi+0x9f) [0x88f3bf]
[ 3] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZN9LAMMPS_NS5Respa5setupEv+0x655) [0xc58e25]
[ 4] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZN9LAMMPS_NS3Run7commandEiPPc+0xd3f) [0xc5bd4f]
[ 5] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZN9LAMMPS_NS5Input15command_creatorINS_3RunEEEvPNS_6LAMMPSEiPPc+0x29) [0x85e3d9]
[ 6] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZN9LAMMPS_NS5Input15execute_commandEv+0x23e5) [0x858835]
[ 7] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZN9LAMMPS_NS5Input4fileEv+0x1fb) [0x85483b]
[ 8] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(main+0x94) [0x871e04]
[ 9] /lib64/libc.so.6(__libc_start_main+0xf4) [0x338161d974]
[10] /phome01/p425jsh/lammps-11Apr15/bin/lmp_cheetah(_ZNSt8ios_base4InitD1Ev+0x41) [0x4d8d09]
*** End of error message ***

Thank you very much.
Best regards,
Sehun Joo

Dear LAMMPS users,

I have a problem related to segmentation fault.

LAMMPS version I used is 11Apr15 and I ran the simulation with
multi-processors.

All of my input script are read by LAMMPS well.
The log file shows "Setting up run ...".
Afterwards, however, error occurs and simulation stops. "5 total processes
killed (some possibly by mpirun during cleanup)"

I tested to find which line or command is problematic.
when i include a command below

compute bcpmol bcp chunk/atom molecule &
nchunk once limit 0 ids once compress no

segmentation errors shown below occur.

Without that command, simulation is continued.

​do you need to use "ids once"? there seems to be a bug in handling this
case. if you remove that flag and stick with the defaults, it should work.​

as an alternative, you may want to try out the following changes, that try to improve handling the internal logic for handling the case of ids once.

diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp
index 2eeb046…86a5dc9 100644
— a/src/compute_chunk_atom.cpp
+++ b/src/compute_chunk_atom.cpp
@@ -480,7 +480,7 @@ void ComputeChunkAtom::init()
// fixstore ID = compute-ID + COMPUTE_STORE, fix group = compute group
// fixstore initializes all values to 0.0

  • if (lockcount && !fixstore) {
  • if ((idsflag == ONCE || (idsflag == NFREQ && lockcount)) && !fixstore) {
    int n = strlen(id) + strlen("_COMPUTE_STORE") + 1;
    id_fix = new char[n];
    strcpy(id_fix,id);
    @@ -497,7 +497,7 @@ void ComputeChunkAtom::init()
    delete [] newarg;
    }
  • if (!lockcount && fixstore) {
  • if ((idsflag == NFREQ && !lockcount) && fixstore) {
    delete fixstore;
    fixstore = NULL;
    }

yes, I think Axel’s changes should fix the issue.

Will be in next patch.

Thanks,

Steve