From c58343b2e29c0c514563169018f322cccf73715d Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Fri, 9 Sep 2022 13:50:41 -0500 Subject: [PATCH] Cleaned up debugging stuffs, need more refactoring and add to hippo --- lib/gpu/lal_amoeba.cu | 7 +------ lib/gpu/lal_base_amoeba.cpp | 11 +---------- src/GPU/pair_amoeba_gpu.cpp | 3 --- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/lib/gpu/lal_amoeba.cu b/lib/gpu/lal_amoeba.cu index b0013f0b9b..591a896bc8 100644 --- a/lib/gpu/lal_amoeba.cu +++ b/lib/gpu/lal_amoeba.cu @@ -14,7 +14,7 @@ // *************************************************************************** #if defined(NV_KERNEL) || defined(USE_HIP) -#include +//#include #include "lal_aux_fun1.h" #ifdef LAMMPS_SMALLBIG #define tagint int @@ -1789,11 +1789,6 @@ __kernel void k_fphi_uind(const __global numtyp4 *restrict x_, int gidx = 2*(k*ngridxy + j*ngridx + i); tq_1 = grid[gidx]; tq_2 = grid[gidx+1]; -/* - if (ii == 0 && jb == 0 && kb == 0) - printf("ii = 0: igrid %d %d %d; grid %f %f; k = %d j = %d; i = %d; origin = %f %f; gidx = %d\n", - igrid[4*ii+0], igrid[4*ii+1], igrid[4*ii+2], tq_1, tq_2, k, j, i, grid[0], grid[1], gidx); -*/ t0_1 += tq_1*w0; t1_1 += tq_1*w1; t2_1 += tq_1*w2; diff --git a/lib/gpu/lal_base_amoeba.cpp b/lib/gpu/lal_base_amoeba.cpp index ceb9b97cbc..05b830d773 100644 --- a/lib/gpu/lal_base_amoeba.cpp +++ b/lib/gpu/lal_base_amoeba.cpp @@ -642,10 +642,7 @@ void BaseAmoebaT::precompute_induce(const int inum_full, const int bsorder, dview_int[idx+1] = host_igrid[i][1]; dview_int[idx+2] = host_igrid[i][2]; } - ucl_copy(_igrid, dview_int, false); - - - + ucl_copy(_igrid, dview_int, false); } // --------------------------------------------------------------------------- @@ -690,12 +687,6 @@ void BaseAmoebaT::compute_fphi_uind(const int inum_full, const int bsorder, for (int iz = nzlo_out; iz <= nzhi_out; iz++) for (int iy = nylo_out; iy <= nyhi_out; iy++) for (int ix = nxlo_out; ix <= nxhi_out; ix++) { -/* - if (iz == nzlo_out && iy == nylo_out && ix == nxlo_out) { - printf("origin = %d %d %d: grid = %f %f %f\n", iz, iy, ix, host_grid_brick[iz][iy][ix][0], host_grid_brick[iz][iy][ix][1]); - } - if (iz == -2 && iy == 4 && ix == 8) printf("ixyz = %d %d %d: grid = %f %f %f; n = %d\n", iz, iy, ix, host_grid_brick[iz][iy][ix][0], host_grid_brick[iz][iy][ix][1], n); -*/ hview_cgrid[n] = host_grid_brick[iz][iy][ix][0]; hview_cgrid[n+1] = host_grid_brick[iz][iy][ix][1]; n += 2; diff --git a/src/GPU/pair_amoeba_gpu.cpp b/src/GPU/pair_amoeba_gpu.cpp index 8d799a82eb..8618317704 100644 --- a/src/GPU/pair_amoeba_gpu.cpp +++ b/src/GPU/pair_amoeba_gpu.cpp @@ -1153,7 +1153,6 @@ void PairAmoebaGPU::fphi_uind(double ****grid, double **fdip_phi1, for (int m = 0; m < 10; m++) { fdip_phi1[i][m] = _fdip_phi1_ptr[idx+m]; } - if (i == 0) printf("gpu fdip phi1 = %f %f %f\n", fdip_phi1[i][0], fdip_phi1[i][1], fdip_phi1[i][2]); } double *_fdip_phi2_ptr = (double *)fdip_phi2_pinned; @@ -1161,7 +1160,6 @@ void PairAmoebaGPU::fphi_uind(double ****grid, double **fdip_phi1, int idx = 10 * i; for (int m = 0; m < 10; m++) fdip_phi2[i][m] = _fdip_phi2_ptr[idx+m]; - if (i == 0) printf("gpu fdip phi2 = %f %f %f\n", fdip_phi2[i][0], fdip_phi2[i][1], fdip_phi2[i][2]); } double *_fdip_sum_phi_ptr = (double *)fdip_sum_phi_pinned; @@ -1169,7 +1167,6 @@ void PairAmoebaGPU::fphi_uind(double ****grid, double **fdip_phi1, int idx = 20 * i; for (int m = 0; m < 20; m++) fdip_sum_phi[i][m] = _fdip_sum_phi_ptr[idx+m]; - if (i == 0) printf("gpu fdip sum phi = %f %f %f\n", fdip_sum_phi[i][0], fdip_sum_phi[i][1], fdip_sum_phi[i][2]); } }