Skip to content

Commit 169da63

Browse files
committed
add checkcudalasterror
1 parent 18cc800 commit 169da63

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/module_hamilt_lcao/module_gint/temp_gint/kernel/phi_operator_gpu.cu

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ void PhiOperatorGpu::set_phi(double* phi_d) const
112112
atoms_phi_start_.get_device_ptr(),
113113
bgrids_phi_len_.get_device_ptr(),
114114
phi_d);
115+
checkCudaLastError();
115116
}
116117

117118
void PhiOperatorGpu::set_phi_dphi(double* phi_d, double* dphi_x_d, double* dphi_y_d, double* dphi_z_d) const
@@ -143,6 +144,7 @@ void PhiOperatorGpu::set_phi_dphi(double* phi_d, double* dphi_x_d, double* dphi_
143144
dphi_x_d,
144145
dphi_y_d,
145146
dphi_z_d);
147+
checkCudaLastError();
146148
}
147149

148150
void PhiOperatorGpu::set_ddphi(double* ddphi_xx_d, double* ddphi_xy_d, double* ddphi_xz_d,
@@ -185,6 +187,7 @@ void PhiOperatorGpu::set_ddphi(double* ddphi_xx_d, double* ddphi_xy_d, double* d
185187
ddphi_yy_d,
186188
ddphi_yz_d,
187189
ddphi_zz_d);
190+
checkCudaLastError();
188191
}
189192

190193
void PhiOperatorGpu::phi_mul_vldr3(
@@ -204,6 +207,7 @@ void PhiOperatorGpu::phi_mul_vldr3(
204207
bgrids_phi_len_.get_device_ptr(),
205208
bgrids_phi_start_.get_device_ptr(),
206209
result_d);
210+
checkCudaLastError();
207211
}
208212

209213
void PhiOperatorGpu::phi_mul_phi(
@@ -402,6 +406,7 @@ void PhiOperatorGpu::phi_dot_phi(
402406
bgrids_phi_len_.get_device_ptr(),
403407
bgrids_phi_start_.get_device_ptr(),
404408
rho_d);
409+
checkCudaLastError();
405410
}
406411

407412
void PhiOperatorGpu::phi_dot_dphi(
@@ -427,6 +432,7 @@ void PhiOperatorGpu::phi_dot_dphi(
427432
gint_gpu_vars_->iat2it_d,
428433
gint_gpu_vars_->atom_nw_d,
429434
fvl_d);
435+
checkCudaLastError();
430436
}
431437

432438
void PhiOperatorGpu::phi_dot_dphi_r(
@@ -454,6 +460,7 @@ void PhiOperatorGpu::phi_dot_dphi_r(
454460
gint_gpu_vars_->iat2it_d,
455461
gint_gpu_vars_->atom_nw_d,
456462
svl_d);
463+
checkCudaLastError();
457464
}
458465

459466
}

0 commit comments

Comments
 (0)