Crash when using compute pair/gran/local

msbentley's picture
Submitted by msbentley on Tue, 09/20/2011 - 17:08

Hi all,

I have been scratching my head over this one today - my simulation works fine unless I try to dump the per-particle forces with compute pair/gran/local - then it runs for a while, but crashes with:

2374000 1123 6.1525987
[comp-l06:09946] *** Process received signal ***
[comp-l06:09946] Signal: Segmentation fault (11)
[comp-l06:09946] Signal code: Address not mapped (1)
[comp-l06:09946] Failing at address: (nil)
[comp-l06:09946] [ 0] /lib/libpthread.so.0(+0xf8f0) [0x7f19103438f0]
[comp-l06:09946] [ 1] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS20ComputePairGranLocal8add_pairEiiddddddPd+0x51) [0x4d92e1]
[comp-l06:09946] [ 2] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS20PairGranHookeHistory7computeEiii+0xea2) [0x6e3632]
[comp-l06:09946] [ 3] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS20ComputePairGranLocal13compute_localEv+0x51) [0x4d9791]
[comp-l06:09946] [ 4] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS9DumpLocal5countEv+0x54) [0x548544]
[comp-l06:09946] [ 5] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS4Dump5writeEv+0x8d) [0x52ec2d]
[comp-l06:09946] [ 6] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS6Output5writeEi+0x12f) [0x6a4f1f]
[comp-l06:09946] [ 7] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS6Verlet3runEi+0x3de) [0x77911e]
[comp-l06:09946] [ 8] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS3Run7commandEiPPc+0x676) [0x74dba6]
[comp-l06:09946] [ 9] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS5Input15execute_commandEv+0x9ec) [0x65f4ec]
[comp-l06:09946] [10] /home/mab/bin/lmp_openmpi(_ZN9LAMMPS_NS5Input4fileEv+0x398) [0x660878]

I have also seen this on 3D simulations. Any ideas what's going wrong? I found it a bit strange that the error comes from PairGranHookeHistory when I'm using the Hertzian model. I assumed that the calculations performed by compute pair/gran/local are in any case performed internally to calculate the per-particle force, regardless of whether I dump them or not?

In any case, I have attached the working script, just uncomment the dump/local line to see the crash... Any words of wisdom gratefully received!

Regards, Mark

AttachmentSize
Plain text icon in.2d_force_test.txt3.01 KB

prasantud | Fri, 10/14/2011 - 16:14

Hi,
I tried liggghts1p4p5 to get the contact data by using Mark's file.
The programme is running now, but the output is not giving contact id, position and forces.

The output is as follows
ITEM: TIMESTEP
0
ITEM: NUMBER OF ENTRIES
0
ITEM: ENTRIES c_forces[1] c_forces[2] c_forces[3] c_forces[4] c_forces[5] c_forces[6] c_forces[7] c_forces[8] c_forces[9] c_forces[10] c_forces[11]
ITEM: TIMESTEP
1000
ITEM: NUMBER OF ENTRIES
0
ITEM: ENTRIES c_forces[1] c_forces[2] c_forces[3] c_forces[4] c_forces[5] c_forces[6] c_forces[7] c_forces[8] c_forces[9] c_forces[10] c_forces[11]

regards,
Samantaray

ckloss's picture

ckloss | Fri, 10/14/2011 - 16:19

no contacts - no data...
The file will start showing contact data later in the course of the simulation

Christoph

msbentley's picture

msbentley | Fri, 10/14/2011 - 17:18

Yes, as Christoph says the particles are inserted (not in contact) and fall under gravity, so until the first particles hit the simulation floor you won't have any interactions in the dump!

Also bear in mind that the dump local command now output 3 values for pos, to include the periodicity flag, so if you want to dump all the data from id + pos + force you'll need to include vectors up to 12 (i.e. 3 for id, 6 for pos and 3 for force).

Cheers, Mark