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

Fixed dimensions in call to DGEMM. #32

This commit is contained in:
v1j4y 2021-09-27 23:36:11 +02:00
parent 97749325b1
commit 25bb2fd97e
2 changed files with 17 additions and 15 deletions

View File

@ -252,7 +252,7 @@ integer(qmckl_exit_code) function test_qmckl_dgemm(context) bind(C)
TransA = .False.
TransB = .False.
m = 5_8
m = 1_8
k = 4_8
n = 6_8
LDA = m

View File

@ -489,41 +489,44 @@ integer function qmckl_compute_mo_basis_gaussian_vgl_f(context, &
! TODO : Use numerical precision here
cutoff = -dlog(1.d-15)
M = 1_8
N = 1_8
K = mo_num * 1_8
N = mo_num * 1_8
K = ao_num * 1_8
LDA = M
LDB = K
LDC = M
do iwalk = 1, walk_num
do ielec = 1, elec_num
! Value
info_qmckl_dgemm_value = qmckl_dgemm(context,TransA, TransB, M, N, K, alpha, &
ao_vgl(:, ielec, iwalk, 1), size(ao_vgl,1) * 1_8, &
ao_vgl(:, ielec, iwalk, 1), LDA, &
coef_normalized(1:mo_num,1:ao_num),size(coef_normalized,1) * 1_8, &
beta, &
mo_vgl(:,ielec,iwalk,1),1_8)
mo_vgl(:,ielec,iwalk,1),LDC)
! Grad_x
info_qmckl_dgemm_Gx = qmckl_dgemm(context,TransA, TransB, M, N, K, alpha, &
ao_vgl(:, ielec, iwalk, 2), size(ao_vgl,1) * 1_8, &
ao_vgl(:, ielec, iwalk, 2), LDA, &
coef_normalized(1:mo_num,1:ao_num),size(coef_normalized,1) * 1_8, &
beta, &
mo_vgl(:,ielec,iwalk,2),1_8)
mo_vgl(:,ielec,iwalk,2),LDC)
! Grad_y
info_qmckl_dgemm_Gy = qmckl_dgemm(context,TransA, TransB, M, N, K, alpha, &
ao_vgl(:, ielec, iwalk, 3), size(ao_vgl,1) * 1_8, &
ao_vgl(:, ielec, iwalk, 3), LDA, &
coef_normalized(1:mo_num,1:ao_num),size(coef_normalized,1) * 1_8, &
beta, &
mo_vgl(:,ielec,iwalk,3),1_8)
mo_vgl(:,ielec,iwalk,3),LDC)
! Grad_z
info_qmckl_dgemm_Gz = qmckl_dgemm(context,TransA, TransB, M, N, K, alpha, &
ao_vgl(:, ielec, iwalk, 4), size(ao_vgl,1) * 1_8, &
ao_vgl(:, ielec, iwalk, 4), LDA, &
coef_normalized(1:mo_num,1:ao_num),size(coef_normalized,1) * 1_8, &
beta, &
mo_vgl(:,ielec,iwalk,4),1_8)
mo_vgl(:,ielec,iwalk,4),LDC)
! Lapl_z
info_qmckl_dgemm_lap = qmckl_dgemm(context, TransA, TransB, M, N, K, alpha, &
ao_vgl(:, ielec, iwalk, 5), size(ao_vgl,1) * 1_8, &
ao_vgl(:, ielec, iwalk, 5), LDA, &
coef_normalized(1:mo_num,1:ao_num),size(coef_normalized,1) * 1_8, &
beta, &
mo_vgl(:,ielec,iwalk,5),1_8)
mo_vgl(:,ielec,iwalk,5),LDC)
end do
end do
@ -782,8 +785,7 @@ assert(qmckl_mo_basis_provided(context));
double mo_vgl[5][walk_num][elec_num][chbrclf_ao_num];
rc = qmckl_get_mo_basis_vgl(context, &(mo_vgl[0][0][0][0]));
//assert (rc == QMCKL_SUCCESS);
assert (rc == QMCKL_SUCCESS);
printf("\n");
printf(" mo_vgl mo_vgl[0][0][26][219] %25.15e\n", mo_vgl[0][0][2][3]);