Segmentation Fault

Hi Lammps users

I want to investigate the response of a graphene sheet under biaxial pressure.

But after equilibration I get segmentation fault in linux and in windows, program ended without any error.

What is wrong with my code?

#-------------------Initialization----------------------------------------

units metal

dimension 3

boundary p p p

atom_style atomic

log buckle.txt

#---------------------Variables--------------------------------------------

variable T equal 300

variable T2 equal 2*$T

variable ER equal 3000

variable erate equal -1.0e10

variable              srate  equal "v_srate / 1.0e12"

variable strain equal “(lx - v_L0)/v_L0”

variable p1 equal “v_strain”

variable p2 equal “-pxx/10000”

variable p3 equal “-pyy/10000”

variable p4 equal “-pzz/10000”


#-------------------Atom definition------------------------------------------

read_data cnt.txt

mass 1 12.0107

#----------------------Settings----------------------------------------------

neighbor 5.0 bin

neigh_modify every 1 delay 1

pair_style airebo 3.0 1 1

pair_coeff * * CH.airebo C

#---------------------Equilibrate---------------------------------------------

velocity all create ${T2} 5812 mom yes rot yes dist gaussian

fix 1 all nvt temp $T $T 0.01 drag 2.0

thermo 50

timestep 0.0001

run ${ER}

#-----------------------Deformation--------------------------------------------

fix 4 all deform 1 xy erate ${srate} units box

fix                   def1 all print 100 "${p1} ${p2} ${p3} ${p4}" file Buckle.txt screen no

thermo 100

run $R

Sincerely

Richard J.Ford

Hi Lammps users

I want to investigate the response of a graphene sheet under biaxial
pressure.

But after equilibration I get segmentation fault in linux and in windows,
program ended without any error.

What is wrong with my code?

impossible to say. segmentation faults are a very generic kind of
error and can happen for many different reasons. thus just looking at
the input script is not sufficient. you either have to find out
yourself exactly where the segfault it happening or provide a
minimal(!) example that triggers it. just saying "windows" or "linux"
version is not sufficient either. we need to know which version or
lammps exactly (it is printed out at the very beginning) and how it
was compiled.

axel.

Hi Dr.Kohlmeyer
Thanks for your reply and your consideration.
The error happens just after the fix deform command.
I used Lammps version 4 Jul 2012 on Red Hat Enterprise Linux Client release
5.2 (Tikanga)
and Lammps version 12 Apr 2013 on windows 7 home basic both in serial.
Sincerely you
Richard J.Ford

This script is quite complicated. Did you do any testing of simpler
versions. And I see lots of suspect logic. For example:

variable strain equal "(lx - v_L0)/v_L0"

where is L0 defined? Also:

variable srate equal "v_srate / 1.0e12"

srate is initially undefined. Instead of asking us to debug your
script, you should learn how to do it yourself. The key is to isolate
each error by removing steps in the script until the problem goes
away.

Alternatively, you can explore what syntax LAMMPS supports by doing
interactive testing:

[boss]$ ../../src/lmp_serial
LAMMPS (16 Aug 2013)
variable x equal 1
print $x
1
variable x equal 2*v_x
print $x
Segmentation fault

Aidan