From 78fdbfca778ba8133054f74c5c99c398e63513f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delval?= Date: Mon, 6 Sep 2021 16:34:48 +0200 Subject: [PATCH] Increase the value of epsilon when vfc_ci is enabled The previous value of epsilon, which was pulled form the qmckl_context and reused fot the qmckl probes, was arout 4.10^-16. It's a good value to use for the tests with IEEE arithmetic, however, MCA introduces some noise which is at this order of magnitude, and caused one probe in particular to fail, while its accuracy was actually satisfying. This value is now multiplied by 16 if VFC_CI is defined (to ask for 4 less significant digits in base 2), which makes more sense for MCA. --- org/qmckl_ao.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/org/qmckl_ao.org b/org/qmckl_ao.org index 8d8ba22..42f7692 100644 --- a/org/qmckl_ao.org +++ b/org/qmckl_ao.org @@ -1755,6 +1755,13 @@ integer(c_int32_t) function test_qmckl_ao_gaussian_vgl(context) bind(C) epsilon = qmckl_get_numprec_epsilon(context) +#ifdef VFC_CI + ! Multplying epsilon by 16 = 2^4 is equivalent to asking 4 significant digits + ! less. This makes sense because we are adding noise with MCA so we can't be + ! as strict on the accuracy target. + epsilon = epsilon * 16 +#endif + X = (/ 1.1 , 2.2 , 3.3 /) R = (/ 0.1 , 1.2 , -2.3 /) Y(:) = X(:) - R(:) @@ -2835,6 +2842,13 @@ integer(c_int32_t) function test_qmckl_ao_power(context) bind(C) epsilon = qmckl_get_numprec_epsilon(context) +#ifdef VFC_CI + ! Multplying epsilon by 16 = 2^4 is equivalent to asking 4 significant digits + ! less. This makes sense because we are adding noise with MCA so we can't be + ! as strict on the accuracy target. + epsilon = epsilon * 16 +#endif + n = 100; LDP = 10;