git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15247 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -132,7 +132,7 @@ if (test $1 = 1) then
|
|||||||
|
|
||||||
if (test -e ../Makefile.package) then
|
if (test -e ../Makefile.package) then
|
||||||
sed -i -e 's/[^ \t]*gpu[^ \t]* //' ../Makefile.package
|
sed -i -e 's/[^ \t]*gpu[^ \t]* //' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/gpu |' ../Makefile.package
|
sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/gpu$(LIBOBJDIR) |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_LIB =[ \t]*|&-lgpu |' ../Makefile.package
|
sed -i -e 's|^PKG_LIB =[ \t]*|&-lgpu |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(gpu_SYSINC) |' ../Makefile.package
|
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(gpu_SYSINC) |' ../Makefile.package
|
||||||
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(gpu_SYSLIB) |' ../Makefile.package
|
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(gpu_SYSLIB) |' ../Makefile.package
|
||||||
|
|||||||
@ -182,8 +182,8 @@ void PairBornCoulLongGPU::init_style()
|
|||||||
int success = borncl_gpu_init(atom->ntypes+1, cutsq, rhoinv,
|
int success = borncl_gpu_init(atom->ntypes+1, cutsq, rhoinv,
|
||||||
born1, born2, born3, a, c, d, sigma,
|
born1, born2, born3, a, c, d, sigma,
|
||||||
offset, force->special_lj, atom->nlocal,
|
offset, force->special_lj, atom->nlocal,
|
||||||
atom->nlocal+atom->nghost, 300, maxspecial,
|
atom->nlocal+atom->nghost, 300, maxspecial,
|
||||||
cell_size, gpu_mode, screen, cut_ljsq,
|
cell_size, gpu_mode, screen, cut_ljsq,
|
||||||
cut_coulsq, force->special_coul,
|
cut_coulsq, force->special_coul,
|
||||||
force->qqrd2e, g_ewald);
|
force->qqrd2e, g_ewald);
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ double borncw_gpu_bytes();
|
|||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
PairBornCoulWolfGPU::PairBornCoulWolfGPU(LAMMPS *lmp) : PairBornCoulWolf(lmp),
|
PairBornCoulWolfGPU::PairBornCoulWolfGPU(LAMMPS *lmp) : PairBornCoulWolf(lmp),
|
||||||
gpu_mode(GPU_FORCE)
|
gpu_mode(GPU_FORCE)
|
||||||
{
|
{
|
||||||
respa_enable = 0;
|
respa_enable = 0;
|
||||||
reinitflag = 0;
|
reinitflag = 0;
|
||||||
|
|||||||
@ -155,7 +155,7 @@ void PairBornGPU::init_style()
|
|||||||
born1, born2, born3, a, c, d, sigma,
|
born1, born2, born3, a, c, d, sigma,
|
||||||
offset, force->special_lj, atom->nlocal,
|
offset, force->special_lj, atom->nlocal,
|
||||||
atom->nlocal+atom->nghost, 300, maxspecial,
|
atom->nlocal+atom->nghost, 300, maxspecial,
|
||||||
cell_size, gpu_mode, screen);
|
cell_size, gpu_mode, screen);
|
||||||
GPU_EXTRA::check_flag(success,error,world);
|
GPU_EXTRA::check_flag(success,error,world);
|
||||||
|
|
||||||
if (gpu_mode == GPU_FORCE) {
|
if (gpu_mode == GPU_FORCE) {
|
||||||
|
|||||||
@ -153,7 +153,7 @@ void PairLJGromacsGPU::init_style()
|
|||||||
maxspecial=atom->maxspecial;
|
maxspecial=atom->maxspecial;
|
||||||
|
|
||||||
int success = ljgrm_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
int success = ljgrm_gpu_init(atom->ntypes+1, cutsq, lj1, lj2, lj3, lj4,
|
||||||
force->special_lj, atom->nlocal,
|
force->special_lj, atom->nlocal,
|
||||||
atom->nlocal+atom->nghost, 300, maxspecial,
|
atom->nlocal+atom->nghost, 300, maxspecial,
|
||||||
cell_size, gpu_mode, screen, ljsw1, ljsw2,
|
cell_size, gpu_mode, screen, ljsw1, ljsw2,
|
||||||
ljsw3, ljsw4, ljsw5, cut_inner, cut_inner_sq);
|
ljsw3, ljsw4, ljsw5, cut_inner, cut_inner_sq);
|
||||||
@ -215,31 +215,31 @@ void PairLJGromacsGPU::cpu_compute(int start, int inum, int eflag,
|
|||||||
|
|
||||||
if (rsq < cutsq[itype][jtype]) {
|
if (rsq < cutsq[itype][jtype]) {
|
||||||
r2inv = 1.0/rsq;
|
r2inv = 1.0/rsq;
|
||||||
r6inv = r2inv*r2inv*r2inv;
|
r6inv = r2inv*r2inv*r2inv;
|
||||||
forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]);
|
forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]);
|
||||||
if (rsq > cut_inner_sq[itype][jtype]) {
|
if (rsq > cut_inner_sq[itype][jtype]) {
|
||||||
r = sqrt(rsq);
|
r = sqrt(rsq);
|
||||||
t = r - cut_inner[itype][jtype];
|
t = r - cut_inner[itype][jtype];
|
||||||
fswitch = r*t*t*(ljsw1[itype][jtype] + ljsw2[itype][jtype]*t);
|
fswitch = r*t*t*(ljsw1[itype][jtype] + ljsw2[itype][jtype]*t);
|
||||||
forcelj += fswitch;
|
forcelj += fswitch;
|
||||||
}
|
}
|
||||||
fpair = factor_lj*forcelj * r2inv;
|
fpair = factor_lj*forcelj * r2inv;
|
||||||
|
|
||||||
f[i][0] += delx*fpair;
|
f[i][0] += delx*fpair;
|
||||||
f[i][1] += dely*fpair;
|
f[i][1] += dely*fpair;
|
||||||
f[i][2] += delz*fpair;
|
f[i][2] += delz*fpair;
|
||||||
|
|
||||||
if (eflag) {
|
if (eflag) {
|
||||||
evdwl = r6inv * (lj3[itype][jtype]*r6inv - lj4[itype][jtype]);
|
evdwl = r6inv * (lj3[itype][jtype]*r6inv - lj4[itype][jtype]);
|
||||||
evdwl += ljsw5[itype][jtype];
|
evdwl += ljsw5[itype][jtype];
|
||||||
if (rsq > cut_inner_sq[itype][jtype]) {
|
if (rsq > cut_inner_sq[itype][jtype]) {
|
||||||
eswitch = t*t*t*(ljsw3[itype][jtype] + ljsw4[itype][jtype]*t);
|
eswitch = t*t*t*(ljsw3[itype][jtype] + ljsw4[itype][jtype]*t);
|
||||||
evdwl += eswitch;
|
evdwl += eswitch;
|
||||||
}
|
}
|
||||||
evdwl *= factor_lj;
|
evdwl *= factor_lj;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evflag) ev_tally_full(i,evdwl,0.0,fpair,delx,dely,delz);
|
if (evflag) ev_tally_full(i,evdwl,0.0,fpair,delx,dely,delz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void PairSWGPU::compute(int eflag, int vflag)
|
|||||||
numneigh = list->numneigh;
|
numneigh = list->numneigh;
|
||||||
firstneigh = list->firstneigh;
|
firstneigh = list->firstneigh;
|
||||||
|
|
||||||
sw_gpu_compute(neighbor->ago, atom->nlocal, nall, inum+list->gnum,
|
sw_gpu_compute(neighbor->ago, inum, nall, inum+list->gnum,
|
||||||
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
||||||
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
||||||
success);
|
success);
|
||||||
|
|||||||
@ -119,7 +119,7 @@ void PairTersoffGPU::compute(int eflag, int vflag)
|
|||||||
numneigh = list->numneigh;
|
numneigh = list->numneigh;
|
||||||
firstneigh = list->firstneigh;
|
firstneigh = list->firstneigh;
|
||||||
|
|
||||||
tersoff_gpu_compute(neighbor->ago, atom->nlocal, nall, inum+list->gnum,
|
tersoff_gpu_compute(neighbor->ago, inum, nall, inum+list->gnum,
|
||||||
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
||||||
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
||||||
success);
|
success);
|
||||||
|
|||||||
@ -112,7 +112,7 @@ void PairTersoffMODGPU::compute(int eflag, int vflag)
|
|||||||
numneigh = list->numneigh;
|
numneigh = list->numneigh;
|
||||||
firstneigh = list->firstneigh;
|
firstneigh = list->firstneigh;
|
||||||
|
|
||||||
tersoff_mod_gpu_compute(neighbor->ago, atom->nlocal, nall, inum+list->gnum,
|
tersoff_mod_gpu_compute(neighbor->ago, inum, nall, inum+list->gnum,
|
||||||
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
||||||
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
||||||
success);
|
success);
|
||||||
|
|||||||
@ -120,7 +120,7 @@ void PairTersoffZBLGPU::compute(int eflag, int vflag)
|
|||||||
numneigh = list->numneigh;
|
numneigh = list->numneigh;
|
||||||
firstneigh = list->firstneigh;
|
firstneigh = list->firstneigh;
|
||||||
|
|
||||||
tersoff_zbl_gpu_compute(neighbor->ago, atom->nlocal, nall, inum+list->gnum,
|
tersoff_zbl_gpu_compute(neighbor->ago, inum, nall, inum+list->gnum,
|
||||||
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
atom->x, atom->type, ilist, numneigh, firstneigh, eflag,
|
||||||
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
vflag, eflag_atom, vflag_atom, host_start, cpu_time,
|
||||||
success);
|
success);
|
||||||
|
|||||||
@ -210,15 +210,15 @@ void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|
||||||
if (rsq < cut_globalsq) {
|
if (rsq < cut_globalsq) {
|
||||||
r = sqrt(rsq);
|
r = sqrt(rsq);
|
||||||
fpair = dzbldr(r, itype, jtype);
|
fpair = dzbldr(r, itype, jtype);
|
||||||
|
|
||||||
if (rsq > cut_innersq) {
|
if (rsq > cut_innersq) {
|
||||||
t = r - cut_inner;
|
t = r - cut_inner;
|
||||||
fswitch = t*t *
|
fswitch = t*t *
|
||||||
(sw1[itype][jtype] + sw2[itype][jtype]*t);
|
(sw1[itype][jtype] + sw2[itype][jtype]*t);
|
||||||
fpair += fswitch;
|
fpair += fswitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpair *= -1.0/r;
|
fpair *= -1.0/r;
|
||||||
f[i][0] += delx*fpair;
|
f[i][0] += delx*fpair;
|
||||||
@ -227,12 +227,12 @@ void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int vflag,
|
|||||||
|
|
||||||
if (eflag) {
|
if (eflag) {
|
||||||
evdwl = e_zbl(r, itype, jtype);
|
evdwl = e_zbl(r, itype, jtype);
|
||||||
evdwl += sw5[itype][jtype];
|
evdwl += sw5[itype][jtype];
|
||||||
if (rsq > cut_innersq) {
|
if (rsq > cut_innersq) {
|
||||||
eswitch = t*t*t *
|
eswitch = t*t*t *
|
||||||
(sw3[itype][jtype] + sw4[itype][jtype]*t);
|
(sw3[itype][jtype] + sw4[itype][jtype]*t);
|
||||||
evdwl += eswitch;
|
evdwl += eswitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evflag) ev_tally_full(i,evdwl,0.0,fpair,delx,dely,delz);
|
if (evflag) ev_tally_full(i,evdwl,0.0,fpair,delx,dely,delz);
|
||||||
|
|||||||
Reference in New Issue
Block a user