1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-11-19 04:22:46 +01:00
qmckl/tools/qmckl_probes_f.f90

82 lines
2.9 KiB
Fortran
Raw Normal View History

Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
module qmckl_probes_f
interface
2022-09-28 11:29:59 +02:00
logical(c_bool) function qmckl_probe_c &
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
(testName, varName, val) &
2022-09-28 11:29:59 +02:00
bind(C, name="qmckl_probe")
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
use, intrinsic :: iso_c_binding
import
implicit none
character(C_CHAR), dimension(*) :: testName
character(C_CHAR), dimension(*) :: varName
2022-09-28 11:29:59 +02:00
real(C_DOUBLE), value :: val
end function qmckl_probe_c
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
2022-09-28 11:29:59 +02:00
logical(c_bool) function qmckl_probe_check_c &
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
(testName, varName, val, expectedValue, accuracyTarget) &
2022-09-28 11:29:59 +02:00
bind(C, name="qmckl_probe_check")
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
use, intrinsic :: iso_c_binding
import
implicit none
character(C_CHAR), dimension(*) :: testName
character(C_CHAR), dimension(*) :: varName
2022-09-28 11:29:59 +02:00
real(C_DOUBLE), value :: val
real(C_DOUBLE), value :: expectedValue
real(C_DOUBLE), value :: accuracyTarget
end function qmckl_probe_check_c
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
2022-09-28 11:29:59 +02:00
logical(c_bool) function qmckl_probe_check_relative_c &
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
(testName, varName, val, expectedValue, accuracyTarget) &
2022-09-28 11:29:59 +02:00
bind(C, name="qmckl_probe_check_relative")
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
use, intrinsic :: iso_c_binding
import
implicit none
character(C_CHAR), dimension(*) :: testName
character(C_CHAR), dimension(*) :: varName
2022-09-28 11:29:59 +02:00
real(C_DOUBLE), value :: val
real(C_DOUBLE), value :: expectedValue
real(C_DOUBLE), value :: accuracyTarget
end function qmckl_probe_check_relative_c
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
end interface
2022-09-28 11:29:59 +02:00
logical function qmckl_probe (testName, varName, val)
implicit none
character, dimension(*) :: testName
character, dimension(*) :: varName
double precision :: val
return qmckl_probe_c(testName//C_NULL_CHAR, varName//C_NULL_CHAR, val)
end function qmckl_probe
logical function qmckl_probe_check
(testName, varName, val, expectedValue, accuracyTarget)
implicit none
character, dimension(*) :: testName
character, dimension(*) :: varName
double precision :: val
double precision :: expectedValue
double precision :: accuracyTarget
return qmckl_probe_check_c(testName//C_NULL_CHAR, varName//C_NULL_CHAR, &
val, expectedValue, accuracyTarget)
end function qmckl_probe_check
logical function qmckl_probe_check_relative &
(testName, varName, val, expectedValue, accuracyTarget)
implicit none
character, dimension(*) :: testName
character, dimension(*) :: varName
double precision :: val
double precision :: expectedValue
double precision :: accuracyTarget
return qmckl_probe_check_relative_c(testName//C_NULL_CHAR, varName//C_NULL_CHAR, &
val, expectedValue, accuracyTarget)
end function qmckl_probe_check_relative
Add the qmckl_probes interface (#2) * comment * Update distance test code The distance test has been updated to the latest version, with a first attempt at using vfc_probes inside it * Functional implementation of vfc_probes in the distance tests This commit has the first functional vfc_ci tests. Verificarlo tests should be written over the existing tests, and they can be enabled with the following configure command: QMCKL_DEVEL=1 ./configure --prefix=$PWD/_install --enable-maintainer-mode --enable-vfc_ci CC="verificarlo-f -Mpreprocess -D VFC_CI" FC="verificarlo-f -Mpreprocess -D VFC_CI" --host=x86_64 The --enable-vfc_ci flag will trigger the linking of the vfc_ci library. Moreover, as of now, the "-Mpreprocess" and "-D VFC_CI" flags have to be specified directly here. There is probably an appropriate macro to place those flags into but I couldn't find it yet, and could only manage to build the tests this way. When the VFC_CI preprocessor is defined, somme additional code to register and export the test probes can be executed (see qmckl_distance.org). As of now, the tests are built as normal, even though they are expected to fail : make all make check From there, the test_qmckl_distance (and potentially the others) executable can be called at will. This will typically be done automatically by vfc_ci, but one could manually execute the executable by defining the following env variables : VFC_PROBES_OUTPUT="test.csv" VFC_BACKENDS="libinterflop_ieee.so" depending on the export file and the Verificarlo backend to be used. The next steps will be to define more tests such as this one, and to integrate them into a Verificarlo CI workflow (by writing a vfc_tests_config.json file and using the automatic CI setup command). * Error in FOrtran interface fixed * Added missing Fortran interfaces * Modify distance test and install process integration All probes are now ignored using only the preprocessor (instead of checking for a facultative argument) in the distance test. Moreover,preprocessing can now be enabled correctly using FCFLAGS (the issue seemed to come from the order of the arguments passed to gfortran/verificarlo-f with the preprocessor arg having to come first). * Add vfc_probes to AO tests vfc_probes have been added to qmckl_ao.org in the same way as qmckl_distance.org, which means that it can be enabled or disabled at compile time using the --enable-vfc_ci option. qmckl_distance.org has been slightly modified with a better indentation, and configure.ac now adds the "-D VFC_CI" flag to CFLAGS when vfc_ci is enabled. * Start work on the vfc tests config file and on a probes wrapper The goal in the next few commits is to make the integration of vfc_probes even easier by using a wrapper to vfc_probe dedicated to qmckl. This will make it easier to create a call to vfc_probe that can be ignored if VFC_CI is not defined in the preprocessor. Once this is done, the integration will be completed by trying to create an actual workflow to automatically build the library and execute CI tests. * Moved qmckl_probes out of src As of now, qmckl_probes have been moved to tools, and can be built via a bash script. This approach seems to make more sense, as this should not be a part of the library itself, but an additional tool to test it. * Functional Makefile setup to enable qmckl_probes The current setup builds qmck_probes by adding it to the main QMckl libray (by adding it to the libtool sources). The Fortran interface's module still need to be compiled separately. TODO : Clean the build setup, improve integration in qmckl_tests and update tests in qmckl_ao with the new syntax. * New probes syntax in AO tests * Clean the probes/Makefile setup The Fortran module is now built a the same time than the main library. The commit also adds a few fixes in the tests and probes wrapper. Co-authored-by: Anthony Scemama <scemama@irsamc.ups-tlse.fr>
2021-07-23 12:01:14 +02:00
end module qmckl_probes_f