diff --git a/lib/gpu/lal_amoeba.cu b/lib/gpu/lal_amoeba.cu index 192f440112..a4b0063a4f 100644 --- a/lib/gpu/lal_amoeba.cu +++ b/lib/gpu/lal_amoeba.cu @@ -743,9 +743,7 @@ __kernel void k_amoeba_udirect2b(const __global numtyp4 *restrict x_, int itype,igroup; numtyp bn[4],bcn[3]; numtyp fid[3],fip[3]; - numtyp ci,uix,uiy,uiz,uixp,uiyp,uizp; - ci = polar1[i].x; // rpole[i][0]; dix = polar1[i].y; // rpole[i][1]; diy = polar1[i].z; // rpole[i][2]; diz = polar1[i].w; // rpole[i][3]; @@ -934,10 +932,9 @@ __kernel void k_amoeba_umutual2b(const __global numtyp4 *restrict x_, acctyp _fieldp[6]; for (int l=0; l<6; l++) _fieldp[l]=(acctyp)0; - numtyp dix,diy,diz,qixx,qixy,qixz,qiyy,qiyz,qizz; - numtyp4* polar1 = (numtyp4*)(&extra[0]); - numtyp4* polar2 = (numtyp4*)(&extra[4*nall]); numtyp4* polar3 = (numtyp4*)(&extra[8*nall]); + numtyp4* polar4 = (numtyp4*)(&extra[12*nall]); + numtyp4* polar5 = (numtyp4*)(&extra[16*nall]); //numtyp4 xi__; @@ -953,32 +950,13 @@ __kernel void k_amoeba_umutual2b(const __global numtyp4 *restrict x_, int itype,igroup; numtyp bn[4],bcn[3]; numtyp fid[3],fip[3]; - numtyp ci,uix,uiy,uiz,uixp,uiyp,uizp; - ci = polar1[i].x; // rpole[i][0]; - dix = polar1[i].y; // rpole[i][1]; - diy = polar1[i].z; // rpole[i][2]; - diz = polar1[i].w; // rpole[i][3]; - qixx = polar2[i].x; // rpole[i][4]; - qixy = polar2[i].y; // rpole[i][5]; - qixz = polar2[i].z; // rpole[i][6]; - qiyy = polar2[i].w; // rpole[i][8]; - qiyz = polar3[i].x; // rpole[i][9]; - qizz = polar3[i].y; // rpole[i][12]; itype = polar3[i].z; // amtype[i]; igroup = polar3[i].w; // amgroup[i]; - // debug: - // xi__ = ix; xi__.w = itype; - numtyp pdi = damping[itype].x; - numtyp pti = damping[itype].y; numtyp ddi = damping[itype].z; - numtyp aesq2 = (numtyp)2.0 * aewald*aewald; - numtyp aesq2n = (numtyp)0.0; - if (aewald > (numtyp)0.0) aesq2n = (numtyp)1.0 / (MY_PIS*aewald); - for ( ; nborreverse_comm_pair(this); + if (!gpu_umutual2b_ready) { + crstyle = FIELD; + comm->reverse_comm_pair(this); + } for (i = 0; i < nlocal; i++) { itype = amtype[i]; @@ -525,8 +527,11 @@ void PairAmoebaGPU::induce() */ ufield0c(field,fieldp); - crstyle = FIELD; - comm->reverse_comm_pair(this); + if (!gpu_umutual2b_ready) { + crstyle = FIELD; + comm->reverse_comm_pair(this); + } + /* if (comm->me == 0) { printf("GPU: cutghost = %f\n", comm->cutghost[0]); @@ -593,8 +598,10 @@ void PairAmoebaGPU::induce() //error->all(FLERR,"STOP"); - crstyle = FIELD; - comm->reverse_comm_pair(this); + if (!gpu_umutual2b_ready) { + crstyle = FIELD; + comm->reverse_comm_pair(this); + } /* if (comm->me == 0) { printf("GPU: iter = %d\n", iter);