From 30df1c8b05b1f39a610567b8a04d3d63d0f0e304 Mon Sep 17 00:00:00 2001 From: Denghui Lu Date: Sat, 25 May 2024 21:00:10 +0800 Subject: [PATCH] address the atomicAdd error (#4234) --- .../module_gint/kernels/cuda/vbatch_matrix_mul.cuh | 2 ++ source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu | 1 + source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu | 1 + 3 files changed, 4 insertions(+) diff --git a/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh b/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh index ca2ed5f265..24e8ba91e1 100644 --- a/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh +++ b/source/module_hamilt_lcao/module_gint/kernels/cuda/vbatch_matrix_mul.cuh @@ -10,6 +10,8 @@ #include #include "module_cell/unitcell.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" +#include + #define sA(i, j) sA[(j)*slda + (i)] #define sB(i, j) sB[(j)*sldb + (i)] diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu index 81a0e176c3..5a1cdeecac 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/force_op.cu @@ -7,6 +7,7 @@ #include #include #include +#include #define THREADS_PER_BLOCK 256 diff --git a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu index 01c9f18175..91ac04ebc0 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu +++ b/source/module_hamilt_pw/hamilt_pwdft/kernels/cuda/stress_op.cu @@ -4,6 +4,7 @@ #include #include #include +#include #include