Fixed a segfault introduced by memory-leak fix

This commit is contained in:
Aidan Thompson 2018-10-10 17:24:14 -06:00
parent 7faa48b4c3
commit c142288eb3
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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