Merge pull request #1155 from athomps/sna-atom-leakfix2
Fixed a segfault introduced by memory-leak fix (#1125)
This commit is contained in:
@ -113,7 +113,8 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
} else error->all(FLERR,"Illegal compute snad/atom command");
|
||||
}
|
||||
|
||||
snaptr = new SNA*[comm->nthreads];
|
||||
nthreads = comm->nthreads;
|
||||
snaptr = new SNA*[nthreads];
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(lmp,rfac0,twojmax,rmin0,switchflag,bzeroflag)
|
||||
#endif
|
||||
|
||||
@ -109,7 +109,8 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
} else error->all(FLERR,"Illegal compute snav/atom command");
|
||||
}
|
||||
|
||||
snaptr = new SNA*[comm->nthreads];
|
||||
nthreads = comm->nthreads;
|
||||
snaptr = new SNA*[nthreads];
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel default(none) shared(lmp,rfac0,twojmax,rmin0,switchflag,bzeroflag)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user