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

Add accuracy target in distance and AO probes

The target has been set to 1d.-14 (or epsilon), because this was the value already
used in the tests. However this might not be the best choice with the
non-deterministic backend, so it might be necessary to adjust it in the
future.

Also, the expectedValue argument has been set to 0 since it is not used.
(the tests checks have already been written anyway)
This commit is contained in:
Aurélien Delval 2021-07-27 15:50:33 +02:00
parent b57ea3f1a6
commit eb8d75c247
2 changed files with 30 additions and 30 deletions

View File

@ -1772,20 +1772,20 @@ integer(c_int32_t) function test_qmckl_ao_gaussian_vgl(context) bind(C)
test_qmckl_ao_gaussian_vgl = &
qmckl_ao_gaussian_vgl(context, X, R, n, A, VGL, ldv)
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "gaussian_vgl_2_1"//C_NULL_CHAR, &
DBLE(VGL(2,1)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "gaussian_vgl_2_1"//C_NULL_CHAR, &
DBLE(VGL(2,1)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "gaussian_vgl_2_2"//C_NULL_CHAR, &
DBLE(VGL(2,2)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "gaussian_vgl_2_2"//C_NULL_CHAR, &
DBLE(VGL(2,2)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "gaussian_vgl_2_3"//C_NULL_CHAR, &
DBLE(VGL(2,3)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "gaussian_vgl_2_3"//C_NULL_CHAR, &
DBLE(VGL(2,3)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "gaussian_vgl_2_4"//C_NULL_CHAR, &
DBLE(VGL(2,4)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "gaussian_vgl_2_4"//C_NULL_CHAR, &
DBLE(VGL(2,4)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "gaussian_vgl_2_5"//C_NULL_CHAR, &
DBLE(VGL(2,5)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "gaussian_vgl_2_5"//C_NULL_CHAR, &
DBLE(VGL(2,5)), DBLE(0), DBLE(epsilon))
if (test_qmckl_ao_gaussian_vgl /= 0) return
@ -2847,8 +2847,8 @@ integer(c_int32_t) function test_qmckl_ao_power(context) bind(C)
test_qmckl_ao_power = qmckl_ao_power(context, n, X, LMAX, P, LDP)
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "power_2_2"//C_NULL_CHAR, &
DBLE(P(2,2)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "power_2_2"//C_NULL_CHAR, &
DBLE(P(2,2)), DBLE(0), DBLE(epsilon))
if (test_qmckl_ao_power /= QMCKL_SUCCESS) return
@ -3187,20 +3187,20 @@ integer(c_int32_t) function test_qmckl_ao_polynomial_vgl(context) bind(C)
test_qmckl_ao_polynomial_vgl = &
qmckl_ao_polynomial_vgl(context, X, R, lmax, n, L, ldl, VGL, ldv)
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "polynomial_vgl_1_2"//C_NULL_CHAR, &
DBLE(VGL(1,2)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "polynomial_vgl_1_2"//C_NULL_CHAR, &
DBLE(VGL(1,2)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "polynomial_vgl_2_2"//C_NULL_CHAR, &
DBLE(VGL(2,2)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "polynomial_vgl_2_2"//C_NULL_CHAR, &
DBLE(VGL(2,2)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "polynomial_vgl_3_2"//C_NULL_CHAR, &
DBLE(VGL(3,2)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "polynomial_vgl_3_2"//C_NULL_CHAR, &
DBLE(VGL(3,2)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "polynomial_vgl_4_2"//C_NULL_CHAR, &
DBLE(VGL(4,2)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "polynomial_vgl_4_2"//C_NULL_CHAR, &
DBLE(VGL(4,2)), DBLE(0), DBLE(epsilon))
vfc_err = qmckl_probe("ao"//C_NULL_CHAR, "polynomial_vgl_5_2"//C_NULL_CHAR, &
DBLE(VGL(5,2)))
vfc_err = qmckl_probe_check("ao"//C_NULL_CHAR, "polynomial_vgl_5_2"//C_NULL_CHAR, &
DBLE(VGL(5,2)), DBLE(0), DBLE(epsilon))
if (test_qmckl_ao_polynomial_vgl /= QMCKL_SUCCESS) return
if (n /= d) return

View File

@ -339,7 +339,7 @@ integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C)
test_qmckl_distance_sq = &
qmckl_distance_sq(context, 'T', 't', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_sq_Tt_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_sq_Tt_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_distance_sq == 0) return
@ -360,7 +360,7 @@ integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C)
test_qmckl_distance_sq = &
qmckl_distance_sq(context, 'n', 'T', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_sq_nT_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_sq_nT_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_distance_sq == 0) return
@ -381,7 +381,7 @@ integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C)
test_qmckl_distance_sq = &
qmckl_distance_sq(context, 'T', 'n', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_sq_Tn_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_sq_Tn_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_distance_sq == 0) return
@ -402,7 +402,7 @@ integer(qmckl_exit_code) function test_qmckl_distance_sq(context) bind(C)
test_qmckl_distance_sq = &
qmckl_distance_sq(context, 'n', 'N', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_sq_nN_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_sq_nN_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_distance_sq == 0) return
@ -775,7 +775,7 @@ integer(qmckl_exit_code) function test_qmckl_dist(context) bind(C)
test_qmckl_dist = &
qmckl_distance(context, 'T', 't', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_Tt_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_Tt_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_dist == 0) return
@ -796,7 +796,7 @@ integer(qmckl_exit_code) function test_qmckl_dist(context) bind(C)
test_qmckl_dist = &
qmckl_distance(context, 'n', 'T', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_nT_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_nT_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_dist == 0) return
@ -817,7 +817,7 @@ integer(qmckl_exit_code) function test_qmckl_dist(context) bind(C)
test_qmckl_dist = &
qmckl_distance(context, 'T', 'n', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_Tn_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_Tn_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_dist == 0) return
@ -838,7 +838,7 @@ integer(qmckl_exit_code) function test_qmckl_dist(context) bind(C)
test_qmckl_dist = &
qmckl_distance(context, 'n', 'N', m, n, A, LDA, B, LDB, C, LDC)
vfc_err = qmckl_probe("distance"//C_NULL_CHAR, "distance_nN_2_2"//C_NULL_CHAR, DBLE(C(2,2)))
vfc_err = qmckl_probe_check("distance"//C_NULL_CHAR, "distance_nN_2_2"//C_NULL_CHAR, DBLE(C(2,2)), DBLE(0), DBLE(1.d-14))
if (test_qmckl_dist == 0) return