1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-22 12:23:56 +01:00

Add openmp and cublas

This commit is contained in:
hoffer 2022-04-06 16:20:29 +02:00
parent 39bcc569e0
commit 3b5221531c

View File

@ -5528,11 +5528,11 @@ qmckl_exit_code qmckl_compute_tmp_c_cuBlas (
const int64_t bf = elec_num*nucl_num*(cord_num+1);
const int64_t cf = bf;
const double* tmp_c_gpu = malloc(sizeof(tmp_c));
#pragma omp target enter data map(alloc:een_rescaled_e[0:elec_num*elec_num*(cord_num+1)*walk_num],een_rescaled_n[0:M*N*K],tmp_c_gpu[0:sizeof(tmp_c_gpu)/sizeof(double)])
#pragma omp target enter data map(alloc:een_rescaled_e[0:elec_num*elec_num*(cord_num+1)*walk_num],een_rescaled_n[0:M*N*walk_num],tmp_c[0:elec_num*nucl_num*(cord_num+1)*cord_num*walk_num])
#pragma omp target data use_device_ptr(een_rescaled_e,een_rescaled_n,tmp_c)
{
for (int nw=0; nw < walk_num; ++nw) {
for (int i=0; i<cord_num; ++i){
@ -5563,7 +5563,7 @@ qmckl_exit_code qmckl_compute_tmp_c_cuBlas (
cublasDestroy(handle);
#pragma omp target exit data map(from:tmp_c_gpu[0:elec_num*nucl_num*(cord_num+1)*cord_num*walk_num])
#pragma omp target exit data map(from:tmp_c[0:elec_num*nucl_num*(cord_num+1)*cord_num*walk_num])
return info;