1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-07-03 09:56:10 +02:00

Merge pull request #89 from PurplePachyderm/TREX-CoE-master

Change vfc_ci wrapper library and config
This commit is contained in:
Anthony Scemama 2022-09-28 09:36:26 +02:00 committed by GitHub
commit f2875ed133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 23 deletions

View File

@ -273,7 +273,6 @@ AC_ARG_ENABLE([hpc],
AS_IF([test "x$enable_hpc" = "yes"], AS_IF([test "x$enable_hpc" = "yes"],
[AC_DEFINE([HAVE_HPC], [1], [Activate HPC routines])]) [AC_DEFINE([HAVE_HPC], [1], [Activate HPC routines])])
echo "XXX VFC"
# Enable Verificarlo tests # Enable Verificarlo tests
AC_ARG_ENABLE([vfc_ci], AC_ARG_ENABLE([vfc_ci],
[AS_HELP_STRING([--enable-vfc_ci], [AS_HELP_STRING([--enable-vfc_ci],
@ -281,11 +280,10 @@ AC_ARG_ENABLE([vfc_ci],
[enable_vfc_ci=$enableval], [enable_vfc_ci=$enableval],
[enable_vfc_ci=no]) [enable_vfc_ci=no])
vfc_ci="false" AS_IF([test "x$enable_vfc_ci" = "xyes"],
AS_IF([test "x$enable_vfc_ci" = "yes"], [FCFLAGS="-D VFC_CI $FCFLAGS"
[vfc_ci="true" CFLAGS="-D VFC_CI $CFLAGS"
FCFLAGS="-D VFC_CI $FCFLAGS" LDFLAGS="-lvfc_probes $LDFLAGS"])
CFLAGS="-D VFC_CI $CFLAGS"])
AM_CONDITIONAL([VFC_CI], [test "x$vfc_ci" = "xtrue"]) AM_CONDITIONAL([VFC_CI], [test "x$vfc_ci" = "xtrue"])

View File

@ -20,6 +20,9 @@ int main() {
qmckl_context context; qmckl_context context;
context = qmckl_context_create(); context = qmckl_context_create();
#ifdef VFC_CI
qmckl_init_probes();
#endif
#+end_src #+end_src
@ -1517,6 +1520,9 @@ end function qmckl_distance_rescaled_deriv_e_f
assert (qmckl_context_destroy(context) == QMCKL_SUCCESS); assert (qmckl_context_destroy(context) == QMCKL_SUCCESS);
#ifdef VFC_CI
qmckl_dump_probes();
#endif
return 0; return 0;
} }

View File

@ -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 ** Automatically initialize the ~vfc_probe~ object if ~VFC_CI~ is defined
#+begin_src c :tangle (eval h_private_func) #+begin_src c :tangle (eval h_private_func)
#ifdef VFC_CI void qmckl_init_probes();
void qmckl_init_probes() __attribute__((constructor));
#endif
#+end_src #+end_src
#+begin_src c :tangle (eval c) #+begin_src c :tangle (eval c)
void qmckl_init_probes(){
#ifdef VFC_CI #ifdef VFC_CI
void __attribute__((constructor)) qmckl_init_probes(){
probes = vfc_init_probes(); probes = vfc_init_probes();
}
#endif #endif
}
#+end_src #+end_src
** Standard probe, without check ** 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 ** Automatically delete and dump the vfc_probe object if ~VFC_CI~ is defined
#+begin_src c :tangle (eval h_private_func) #+begin_src c :tangle (eval h_private_func)
#ifdef VFC_CI void qmckl_dump_probes();
void qmckl_dump_probes() __attribute__((destructor));
#endif
#+end_src #+end_src
#+begin_src c :tangle (eval c) #+begin_src c :tangle (eval c)
void qmckl_dump_probes(){
#ifdef VFC_CI #ifdef VFC_CI
void __attribute__((destructor)) qmckl_dump_probes(){
vfc_dump_probes(&probes); vfc_dump_probes(&probes);
}
#endif #endif
}
#+end_src #+end_src
* Fortran wrappers * Fortran wrappers

View File

@ -7,13 +7,6 @@
"name": "libinterflop_mca.so", "name": "libinterflop_mca.so",
"repetitions": 25 "repetitions": 25
}] }]
},
{
"executable": "tests/test_qmckl_ao",
"vfc_backends": [{
"name": "libinterflop_mca.so",
"repetitions": 25
}]
} }
] ]
} }