Skip to content

Commit

Permalink
add openmp in force compute
Browse files Browse the repository at this point in the history
  • Loading branch information
A-006 committed May 30, 2024
1 parent 58c5e92 commit b2abbb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/module_hamilt_lcao/module_gint/gint_force_gpu.cu
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ void gint_fvl_gamma_gpu(hamilt::HContainer<double>* dm,
const int cuda_block
= std::min(64, (gridt.psir_size + cuda_threads - 1) / cuda_threads);
int iter_num = 0;
int pipeline_index = 0;
DensityMat denstiy_mat;
frc_strs_iat_gbl f_s_iat_dev;
grid_para para;
Expand All @@ -98,6 +97,7 @@ void gint_fvl_gamma_gpu(hamilt::HContainer<double>* dm,
}

/*compute the psi*/
#pragma omp parallel for num_threads(gridt.nstreams) private(para,f_s_iat) collapse(2)
for (int i = 0; i < gridt.nbx; i++)
{
for (int j = 0; j < gridt.nby; j++)
Expand All @@ -113,7 +113,7 @@ void gint_fvl_gamma_gpu(hamilt::HContainer<double>* dm,
dim3 grid_dot(cuda_block);
dim3 block_dot(cuda_threads);

pipeline_index = iter_num % gridt.nstreams;
int pipeline_index = omp_get_thread_num();
para_init(para, iter_num, nbz, pipeline_index,gridt);
cal_init(f_s_iat,
pipeline_index,
Expand Down

0 comments on commit b2abbb5

Please sign in to comment.