git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15248 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-07-01 23:27:26 +00:00
parent 8366b35459
commit 9656958169
245 changed files with 4890 additions and 4832 deletions

View File

@ -9,7 +9,7 @@
This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
__________________________________________________________________________
begin :
begin :
email : ndactrung@gmail.com
***************************************************************************/
@ -27,11 +27,11 @@ static ZBL<PRECISION,ACC_PRECISION> ZBLMF;
// ---------------------------------------------------------------------------
// Allocate memory on host and device and copy constants to device
// ---------------------------------------------------------------------------
int zbl_gpu_init(const int ntypes, double **cutsq, double **host_sw1,
int zbl_gpu_init(const int ntypes, double **cutsq, double **host_sw1,
double **host_sw2, double **host_sw3, double **host_sw4, double **host_sw5,
double **host_d1a, double **host_d2a, double **host_d3a, double **host_d4a,
double **host_d1a, double **host_d2a, double **host_d3a, double **host_d4a,
double **host_zze, double cut_globalsq, double cut_innersq, double cut_inner,
const int inum, const int nall, const int max_nbors,
const int inum, const int nall, const int max_nbors,
const int maxspecial, const double cell_size, int &gpu_mode, FILE *screen) {
ZBLMF.clear();
gpu_mode=ZBLMF.device->gpu_mode();
@ -55,7 +55,7 @@ int zbl_gpu_init(const int ntypes, double **cutsq, double **host_sw1,
int init_ok=0;
if (world_me==0)
init_ok=ZBLMF.init(ntypes, cutsq, host_sw1, host_sw2, host_sw3, host_sw4,
init_ok=ZBLMF.init(ntypes, cutsq, host_sw1, host_sw2, host_sw3, host_sw4,
host_sw5, host_d1a, host_d2a, host_d3a, host_d4a, host_zze,
cut_globalsq, cut_innersq, cut_inner,
inum, nall, 300, maxspecial, cell_size, gpu_split, screen);
@ -74,13 +74,13 @@ int zbl_gpu_init(const int ntypes, double **cutsq, double **host_sw1,
fflush(screen);
}
if (gpu_rank==i && world_me!=0)
init_ok=ZBLMF.init(ntypes, cutsq, host_sw1, host_sw2, host_sw3, host_sw4,
init_ok=ZBLMF.init(ntypes, cutsq, host_sw1, host_sw2, host_sw3, host_sw4,
host_sw5, host_d1a, host_d2a, host_d3a, host_d4a, host_zze,
cut_globalsq, cut_innersq, cut_inner,
cut_globalsq, cut_innersq, cut_inner,
inum, nall, 300, maxspecial, cell_size, gpu_split, screen);
ZBLMF.device->gpu_barrier();
if (message)
if (message)
fprintf(screen,"Done.\n");
}
if (message)
@ -105,8 +105,8 @@ int ** zbl_gpu_compute_n(const int ago, const int inum_full,
return ZBLMF.compute(ago, inum_full, nall, host_x, host_type, sublo,
subhi, tag, nspecial, special, eflag, vflag, eatom,
vatom, host_start, ilist, jnum, cpu_time, success);
}
}
void zbl_gpu_compute(const int ago, const int inum_full, const int nall,
double **host_x, int *host_type, int *ilist, int *numj,
int **firstneigh, const bool eflag, const bool vflag,