Dear all
PFA the input and potential files for a simple npt run for pure Ni slab.
In the 31-march-17 version of lammps the following error is being shown
when reading the potential file, but it was showing no error in my
colleagues version of Lammps:
LAMMPS (31 Mar 2017)
Reading data file ...
orthogonal box = (0 0 0) to (40.168 40.168 40.168)
2 by 2 by 5 MPI processor grid
reading atoms ...
5324 atoms
Reading potential file Ni_u3.eam with DATE: 2007-06-11
APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
How should be check the mistake in the code?
this is *not* cause by reading the potential, but due to a bug in compute
orientorder/atom that was introduced in january 2017, when a new feature
was added.
you can easily tell by running lammps with the -echo screen flag. you
should get something like this:
#Equilibration
velocity all create 300.0 492825 dist gaussian
timestep 0.001
compute press all pressure thermo_temp
thermo 1000
thermo_style custom step temp pe etotal press vol lx ly lz xy c_press[1]
c_press[2] c_press[3] c_press[4] c_press[5] c_press[6]
fix 1 all npt temp 300.0 300.0 10 x 1 1 0.1 y 1 1 0.1 z 1 1 0.1
fix 2 all momentum 1000 linear 1 1 1
compute myBond all orientorder/atom degrees 2 4 6
[crunch:03777] *** Process received signal ***
[crunch:03777] Signal: Segmentation fault (11)
[crunch:03777] Signal code: Address not mapped (1)
[crunch:03777] Failing at address: (nil)
the bug fix is to make the following change. this is now also included in
a pending pull request on github Collected small changes by akohlmey · Pull Request #510 · lammps/lammps · GitHub
and will be released with the next lammps patch.
axel.
diff --git a/src/compute_orientorder_atom.cpp
b/src/compute_orientorder_atom.cpp
index 43f13ec..90e2830 100644
--- a/src/compute_orientorder_atom.cpp
+++ b/src/compute_orientorder_atom.cpp
@@ -102,23 +102,22 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS
*lmp, int narg, char **arg
if (qlist[iw] > qmax) qmax = qlist[iw];
}
iarg += nqlist;
- if (strcmp(arg[iarg],"components") == 0) {
- qlcompflag = 1;
- if (iarg+2 > narg)
- error->all(FLERR,"Illegal compute orientorder/atom command");
- qlcomp = force->numeric(FLERR,arg[iarg+1]);
- if (qlcomp <= 0)
- error->all(FLERR,"Illegal compute orientorder/atom command");
- iqlcomp = -1;
- for (int iw = 0; iw < nqlist; iw++)
- if (qlcomp == qlist[iw]) {
- iqlcomp = iw;
- break;
- }
- if (iqlcomp < 0)
- error->all(FLERR,"Illegal compute orientorder/atom command");
- iarg += 2;
- }
+ } else if (strcmp(arg[iarg],"components") == 0) {
+ qlcompflag = 1;
+ if (iarg+2 > narg)
+ error->all(FLERR,"Illegal compute orientorder/atom command");
+ qlcomp = force->numeric(FLERR,arg[iarg+1]);
+ if (qlcomp <= 0)
+ error->all(FLERR,"Illegal compute orientorder/atom command");
+ iqlcomp = -1;
+ for (int iw = 0; iw < nqlist; iw++)
+ if (qlcomp == qlist[iw]) {
+ iqlcomp = iw;
+ break;
+ }
+ if (iqlcomp < 0)
+ error->all(FLERR,"Illegal compute orientorder/atom command");
+ iarg += 2;
} else if (strcmp(arg[iarg],"cutoff") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute orientorder/atom command");