diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index a15d42933c..8d75db578a 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -16,6 +16,7 @@ #include "stdlib.h" #include "atom_vec_dipole.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -67,7 +68,7 @@ void AtomVecDipole::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); mu = memory->grow(atom->mu,nmax,4,"atom:mu"); @@ -821,7 +822,7 @@ bigint AtomVecDipole::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("mu")) bytes += memory->usage(mu,nmax,4); diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index facbf8f10b..ee601d7b81 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -14,6 +14,7 @@ #include "stdlib.h" #include "atom_vec_angle.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -68,7 +69,7 @@ void AtomVecAngle::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -815,7 +816,7 @@ bigint AtomVecAngle::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index ba433ea520..842a28f4b7 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -15,6 +15,7 @@ #include "stdlib.h" #include "atom_vec_bond.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -69,7 +70,7 @@ void AtomVecBond::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -773,7 +774,7 @@ bigint AtomVecBond::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index 78e99abc11..1e3e2d3490 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -15,6 +15,7 @@ #include "stdlib.h" #include "atom_vec_full.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -68,8 +69,7 @@ void AtomVecFull::grow(int n) mask = memory->grow(atom->mask,nmax,"atom:mask"); image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); - v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -985,7 +985,7 @@ bigint AtomVecFull::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index f1a09990ac..f85822722f 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -15,6 +15,7 @@ #include "stdlib.h" #include "atom_vec_molecular.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -69,7 +70,7 @@ void AtomVecMolecular::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -965,7 +966,7 @@ bigint AtomVecMolecular::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index ee36eb6db8..f42f1d1f4a 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -20,6 +20,7 @@ #include "stdlib.h" #include "atom_vec_peri.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -71,7 +72,7 @@ void AtomVecPeri::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); vfrac = memory->grow(atom->vfrac,nmax,"atom:vfrac"); rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); @@ -823,7 +824,7 @@ bigint AtomVecPeri::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("vfrac")) bytes += memory->usage(vfrac,nmax); if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index 3b67d8c0ba..8af7049746 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -19,6 +19,7 @@ #include "stdlib.h" #include "atom_vec_wavepacket.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "force.h" @@ -77,7 +78,7 @@ void AtomVecWavepacket::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); spin = memory->grow(atom->spin,nmax,"atom:spin"); @@ -990,7 +991,7 @@ bigint AtomVecWavepacket::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax); diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index c0c97d161b..55dd7f5c20 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -19,6 +19,7 @@ #include "stdlib.h" #include "atom_vec_electron.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "force.h" @@ -71,7 +72,7 @@ void AtomVecElectron::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); spin = memory->grow(atom->spin,nmax,"atom:spin"); @@ -838,7 +839,7 @@ bigint AtomVecElectron::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax); diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index fd33d6a41d..5a23ceadeb 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -15,6 +15,7 @@ #include "stdlib.h" #include "atom_vec_atomic.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -63,7 +64,7 @@ void AtomVecAtomic::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index a2e9720d33..1b9159c33d 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -15,6 +15,7 @@ #include "stdlib.h" #include "atom_vec_charge.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -65,7 +66,7 @@ void AtomVecCharge::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); @@ -694,7 +695,7 @@ bigint AtomVecCharge::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 929e10e09b..80776fedd1 100755 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -20,6 +20,7 @@ #include "atom_vec_ellipsoid.h" #include "math_extra.h" #include "atom.h" +#include "comm.h" #include "force.h" #include "domain.h" #include "modify.h" @@ -85,7 +86,7 @@ void AtomVecEllipsoid::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); angmom = memory->grow(atom->angmom,nmax,3,"atom:angmom"); @@ -1245,7 +1246,7 @@ bigint AtomVecEllipsoid::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); if (atom->memcheck("angmom")) bytes += memory->usage(angmom,nmax,3); diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index eee68209dd..77b33cc816 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -17,6 +17,7 @@ #include "string.h" #include "atom_vec_sphere.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "modify.h" #include "force.h" @@ -96,7 +97,7 @@ void AtomVecSphere::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3,"atom:f"); + f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); radius = memory->grow(atom->radius,nmax,"atom:radius"); rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); @@ -1047,7 +1048,7 @@ bigint AtomVecSphere::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); if (atom->memcheck("radius")) bytes += memory->usage(radius,nmax); if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax);