Skip to content
Snippets Groups Projects
Commit c142288e authored by Aidan Thompson's avatar Aidan Thompson
Browse files

Fixed a segfault introduced by memory-leak fix

parent 7faa48b4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment