From efd6f7b2d06abd6b97312e18c5b6f3d99d489ff4 Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Tue, 4 May 2021 23:12:55 -0500 Subject: [PATCH] Fixed issue with accessing type2frho array in eam energy kernels --- lib/gpu/lal_eam.cu | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/gpu/lal_eam.cu b/lib/gpu/lal_eam.cu index 4c6aa2f6b2..a2e8a0e41a 100644 --- a/lib/gpu/lal_eam.cu +++ b/lib/gpu/lal_eam.cu @@ -226,7 +226,7 @@ __kernel void k_energy(const __global numtyp4 *restrict x_, const numtyp rdr, const numtyp rdrho, const numtyp rhomax, const int nrho, const int nr, const int t_per_atom) { - int tid, ii, offset, i, itype; + int tid, ii, offset, i, itype, tfrho; atom_info(t_per_atom,ii,tid,offset); int n_stride; @@ -243,6 +243,7 @@ __kernel void k_energy(const __global numtyp4 *restrict x_, numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i]; itype=ix.w; + tfrho=type2frho[itype]; for ( ; nbor