mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-31 16:46:03 +01:00
Cleaning
This commit is contained in:
parent
858ea62a0a
commit
6da1b73442
@ -7348,7 +7348,7 @@ qmckl_exit_code qmckl_provide_tmp_c(qmckl_context context)
|
|||||||
ctx->jastrow.tmp_c_date = ctx->date;
|
ctx->jastrow.tmp_c_date = ctx->date;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QMCKL_SUCCESS;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
qmckl_exit_code qmckl_provide_dtmp_c(qmckl_context context)
|
qmckl_exit_code qmckl_provide_dtmp_c(qmckl_context context)
|
||||||
@ -7366,7 +7366,7 @@ qmckl_exit_code qmckl_provide_dtmp_c(qmckl_context context)
|
|||||||
|
|
||||||
if (ctx->electron.walker.num > ctx->electron.walker_old.num) {
|
if (ctx->electron.walker.num > ctx->electron.walker_old.num) {
|
||||||
if (ctx->jastrow.dtmp_c != NULL) {
|
if (ctx->jastrow.dtmp_c != NULL) {
|
||||||
qmckl_exit_code rc = qmckl_free(context, ctx->jastrow.dtmp_c);
|
rc = qmckl_free(context, ctx->jastrow.dtmp_c);
|
||||||
if (rc != QMCKL_SUCCESS) {
|
if (rc != QMCKL_SUCCESS) {
|
||||||
return qmckl_failwith( context, rc,
|
return qmckl_failwith( context, rc,
|
||||||
"qmckl_provide_dtmp_c",
|
"qmckl_provide_dtmp_c",
|
||||||
@ -8345,7 +8345,6 @@ qmckl_compute_tmp_c_cublas_offload (const qmckl_context context,
|
|||||||
const double* een_rescaled_n,
|
const double* een_rescaled_n,
|
||||||
double* const tmp_c )
|
double* const tmp_c )
|
||||||
{
|
{
|
||||||
qmckl_exit_code info;
|
|
||||||
|
|
||||||
if (context == QMCKL_NULL_CONTEXT) {
|
if (context == QMCKL_NULL_CONTEXT) {
|
||||||
return QMCKL_INVALID_CONTEXT;
|
return QMCKL_INVALID_CONTEXT;
|
||||||
@ -8391,6 +8390,7 @@ qmckl_compute_tmp_c_cublas_offload (const qmckl_context context,
|
|||||||
{
|
{
|
||||||
for (int nw=0; nw < walk_num; ++nw) {
|
for (int nw=0; nw < walk_num; ++nw) {
|
||||||
|
|
||||||
|
// /!\ cublasError needs to be checked and return QMCKL_FAILURE if it fails
|
||||||
int cublasError = cublasDgemmStridedBatched(handle, CUBLAS_OP_N, CUBLAS_OP_N, M, N, K, &alpha,
|
int cublasError = cublasDgemmStridedBatched(handle, CUBLAS_OP_N, CUBLAS_OP_N, M, N, K, &alpha,
|
||||||
&(een_rescaled_e[nw*(cord_num+1)]),
|
&(een_rescaled_e[nw*(cord_num+1)]),
|
||||||
LDA, af,
|
LDA, af,
|
||||||
@ -8404,7 +8404,7 @@ qmckl_compute_tmp_c_cublas_offload (const qmckl_context context,
|
|||||||
#pragma omp target exit data map(from:tmp_c[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])
|
||||||
|
|
||||||
cublasDestroy(handle);
|
cublasDestroy(handle);
|
||||||
return info;
|
return QMCKL_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -198,9 +198,9 @@ bool qmckl_local_energy_provided(const qmckl_context context) {
|
|||||||
|
|
||||||
qmckl_exit_code rc;
|
qmckl_exit_code rc;
|
||||||
|
|
||||||
if(!qmckl_electron_provided(context)) return QMCKL_NOT_PROVIDED;
|
if(!qmckl_electron_provided(context)) return false;
|
||||||
|
|
||||||
if(!qmckl_nucleus_provided(context)) return QMCKL_NOT_PROVIDED;
|
if(!qmckl_nucleus_provided(context)) return false;
|
||||||
|
|
||||||
rc = qmckl_provide_ao_basis_ao_vgl(context);
|
rc = qmckl_provide_ao_basis_ao_vgl(context);
|
||||||
if (rc != QMCKL_SUCCESS) return rc;
|
if (rc != QMCKL_SUCCESS) return rc;
|
||||||
|
Loading…
Reference in New Issue
Block a user