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