From f10a2fe91e3caeb59e12695476258d4c037aeb7c Mon Sep 17 00:00:00 2001 From: Aurelien Delval Date: Tue, 27 Sep 2022 13:37:06 +0000 Subject: [PATCH 1/3] Modify the vfc_ci wrapper and its config - init and dump have to be called manually - Few config changes to fix CI --- configure.ac | 7 ++----- org/qmckl_distance.org | 2 ++ org/qmckl_verificarlo.org | 16 ++++++---------- vfc_tests_config.json | 7 ------- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 71105e0..b42b1d0 100644 --- a/configure.ac +++ b/configure.ac @@ -273,7 +273,6 @@ AC_ARG_ENABLE([hpc], AS_IF([test "x$enable_hpc" = "yes"], [AC_DEFINE([HAVE_HPC], [1], [Activate HPC routines])]) -echo "XXX VFC" # Enable Verificarlo tests AC_ARG_ENABLE([vfc_ci], [AS_HELP_STRING([--enable-vfc_ci], @@ -281,10 +280,8 @@ AC_ARG_ENABLE([vfc_ci], [enable_vfc_ci=$enableval], [enable_vfc_ci=no]) -vfc_ci="false" -AS_IF([test "x$enable_vfc_ci" = "yes"], - [vfc_ci="true" - FCFLAGS="-D VFC_CI $FCFLAGS" +AS_IF([test "x$enable_vfc_ci" = "xyes"], + [FCFLAGS="-D VFC_CI $FCFLAGS" CFLAGS="-D VFC_CI $CFLAGS"]) AM_CONDITIONAL([VFC_CI], [test "x$vfc_ci" = "xtrue"]) diff --git a/org/qmckl_distance.org b/org/qmckl_distance.org index 2160ed7..1ef16ad 100644 --- a/org/qmckl_distance.org +++ b/org/qmckl_distance.org @@ -19,6 +19,7 @@ Functions for the computation of distances between particles. int main() { qmckl_context context; context = qmckl_context_create(); + qmckl_init_probes(); #+end_src @@ -1517,6 +1518,7 @@ end function qmckl_distance_rescaled_deriv_e_f assert (qmckl_context_destroy(context) == QMCKL_SUCCESS); + qmckl_dump_probes(); return 0; } diff --git a/org/qmckl_verificarlo.org b/org/qmckl_verificarlo.org index fdeccfc..72797f4 100644 --- a/org/qmckl_verificarlo.org +++ b/org/qmckl_verificarlo.org @@ -76,17 +76,15 @@ https://github.com/verificarlo/verificarlo/blob/master/doc/06-Postprocessing.md# ** Automatically initialize the ~vfc_probe~ object if ~VFC_CI~ is defined #+begin_src c :tangle (eval h_private_func) -#ifdef VFC_CI -void qmckl_init_probes() __attribute__((constructor)); -#endif +void qmckl_init_probes(); #+end_src #+begin_src c :tangle (eval c) +void qmckl_init_probes(){ #ifdef VFC_CI -void __attribute__((constructor)) qmckl_init_probes(){ probes = vfc_init_probes(); -} #endif +} #+end_src ** Standard probe, without check @@ -183,17 +181,15 @@ bool qmckl_probe_check_relative ( ** Automatically delete and dump the vfc_probe object if ~VFC_CI~ is defined #+begin_src c :tangle (eval h_private_func) -#ifdef VFC_CI -void qmckl_dump_probes() __attribute__((destructor)); -#endif +void qmckl_dump_probes(); #+end_src #+begin_src c :tangle (eval c) +void qmckl_dump_probes(){ #ifdef VFC_CI -void __attribute__((destructor)) qmckl_dump_probes(){ vfc_dump_probes(&probes); -} #endif +} #+end_src * Fortran wrappers diff --git a/vfc_tests_config.json b/vfc_tests_config.json index 9b8aca1..1279100 100644 --- a/vfc_tests_config.json +++ b/vfc_tests_config.json @@ -7,13 +7,6 @@ "name": "libinterflop_mca.so", "repetitions": 25 }] - }, - { - "executable": "tests/test_qmckl_ao", - "vfc_backends": [{ - "name": "libinterflop_mca.so", - "repetitions": 25 - }] } ] } From eab4e56c18abcfc8a34241dd86091edde4e582b2 Mon Sep 17 00:00:00 2001 From: Aurelien Delval Date: Tue, 27 Sep 2022 14:09:34 +0000 Subject: [PATCH 2/3] Add the Verificarlo probes library to LDFLAG --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b42b1d0..21be7ae 100644 --- a/configure.ac +++ b/configure.ac @@ -282,7 +282,8 @@ AC_ARG_ENABLE([vfc_ci], AS_IF([test "x$enable_vfc_ci" = "xyes"], [FCFLAGS="-D VFC_CI $FCFLAGS" - CFLAGS="-D VFC_CI $CFLAGS"]) + CFLAGS="-D VFC_CI $CFLAGS" + LDFLAGS="-lvfc_probes $LDFLAGS"]) AM_CONDITIONAL([VFC_CI], [test "x$vfc_ci" = "xtrue"]) From 72274cda4eb63b01b8e0fe8ee8b6d56ebaa0a456 Mon Sep 17 00:00:00 2001 From: Aurelien Delval Date: Tue, 27 Sep 2022 14:29:30 +0000 Subject: [PATCH 3/3] Conditional ignore for qmckl_probes calls in distance test --- org/qmckl_distance.org | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org/qmckl_distance.org b/org/qmckl_distance.org index 1ef16ad..a6cf49a 100644 --- a/org/qmckl_distance.org +++ b/org/qmckl_distance.org @@ -19,8 +19,10 @@ Functions for the computation of distances between particles. int main() { qmckl_context context; context = qmckl_context_create(); - qmckl_init_probes(); +#ifdef VFC_CI + qmckl_init_probes(); +#endif #+end_src @@ -1518,7 +1520,9 @@ end function qmckl_distance_rescaled_deriv_e_f assert (qmckl_context_destroy(context) == QMCKL_SUCCESS); +#ifdef VFC_CI qmckl_dump_probes(); +#endif return 0; }