diff --git a/org/qmckl_jastrow.org b/org/qmckl_jastrow.org index b3ec515..adf66d1 100644 --- a/org/qmckl_jastrow.org +++ b/org/qmckl_jastrow.org @@ -2351,6 +2351,7 @@ integer(c_int32_t) function qmckl_compute_factor_ee_deriv_e_doc & const double* ee_distance_rescaled, const double* ee_distance_rescaled_deriv_e, double* const factor_ee_deriv_e ); + #+end_src #+begin_src c :tangle (eval h_private_func) :comments org @@ -2366,6 +2367,7 @@ integer(c_int32_t) function qmckl_compute_factor_ee_deriv_e_doc & double* const factor_ee_deriv_e ); #+end_src + #+begin_src c :comments org :tangle (eval c) :noweb yes qmckl_exit_code qmckl_compute_factor_ee_deriv_e ( const qmckl_context context, @@ -6225,6 +6227,18 @@ qmckl_compute_tmp_c_cublas_offload (const qmckl_context context, const double* een_rescaled_n, double* const tmp_c ) { + qmckl_exit_code info; + + //Initialisation of cublas + + cublasHandle_t handle; + if (cublasCreate(&handle) != CUBLAS_STATUS_SUCCESS) + { + fprintf(stdout, "CUBLAS initialization failed!\n"); + exit(EXIT_FAILURE); + } + + qmckl_exit_code info; @@ -6270,40 +6284,35 @@ qmckl_compute_tmp_c_cublas_offload (const qmckl_context context, const int64_t bf = elec_num*nucl_num*(cord_num+1); const int64_t cf = bf; - info = QMCKL_SUCCESS; - #pragma omp target enter data map(to: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) { - -#pragma omp target teams distribute parallel for collapse(2) for (int nw=0; nw < walk_num; ++nw) { - for (int i=0; i