[lammps-users] A compiling problem

Hi,all

I write a new pair_style “pair_style sh/cut” and I make it successfully.
When I run a simulation using it in it, "Segmentation fault " appears.
So, I debug it with “gdb” and the informations given are:

gdb) where
#0 0x00000000005bc025 in LAMMPS_NS::PairSHCut::compute (this=0x9a4e200, eflag=1, vflag=)at pair_sh_cut.cpp:153
#1 0x0000000000590f88 in LAMMPS_NS::PairHybrid::compute (this=0x9a4dd70, eflag=1, vflag=) at pair_hybrid.cpp:93
#2 0x0000000000608082 in LAMMPS_NS::Verlet::setup (this=0x99c1a20) at verlet.cpp:111
#3 0x00000000005eaa69 in LAMMPS_NS::Run::command (this=0x7fff56658660, narg=1, arg=0x9a4f860) at run.cpp:173
#4 0x0000000000516cb6 in LAMMPS_NS::Input::execute_command (this=0x99af220) at run.h:16
#5 0x00000000005176d8 in LAMMPS_NS::Input::file (this=0x99af220) at input.cpp:195
#6 0x000000000051f797 in main (argc=1, argv=0x7fff56659118) at main.cpp:29

Is there anyone who can give me some help ? Any help will be appreciated!

Best wishes

zhang

In addition, my system is redhat and the compiler is mpicxx.

2011/2/28 xiangxiong zhang <zhangxx1986@…24…>

Hi,all

    I write a new pair\_style &quot;pair\_style sh/cut&quot; and I make it

successfully.
When I run a simulation using it in it, "Segmentation fault "
appears.
So, I debug it with "gdb" and the informations given are:

gdb) where
#0 0x00000000005bc025 in LAMMPS_NS::PairSHCut::compute (this=0x9a4e200,
eflag=1, vflag=<value optimized out>)at pair_sh_cut.cpp:153
#1 0x0000000000590f88 in LAMMPS_NS::PairHybrid::compute (this=0x9a4dd70,
eflag=1, vflag=<value optimized out>) at pair_hybrid.cpp:93
#2 0x0000000000608082 in LAMMPS_NS::Verlet::setup (this=0x99c1a20) at
verlet.cpp:111
#3 0x00000000005eaa69 in LAMMPS_NS::Run::command (this=0x7fff56658660,
narg=1, arg=0x9a4f860) at run.cpp:173
#4 0x0000000000516cb6 in LAMMPS_NS::Input::execute_command (this=0x99af220)
at run.h:16
#5 0x00000000005176d8 in LAMMPS_NS::Input::file (this=0x99af220) at
input.cpp:195
#6 0x000000000051f797 in main (argc=1, argv=0x7fff56659118) at main.cpp:29

Is there anyone who can give me some help ? Any help will be
appreciated!

well, gdb tells you that it crashes in your code and on line 153 at that.

since i am not a psychic, i don't know what you have written there,
so it is up to you to debug your own errors.

cheers,
    axel.