From 7f4483f19ef8a7c31a0a8d9cc95a6ef876ca217e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Coppens?= Date: Mon, 22 Feb 2021 18:18:00 +0100 Subject: [PATCH] - Made test.cpp use variable dataset. - Started cleanup and restructuring file tree. --- .gitignore | 2 +- QMCChem_dataset_test.f90 | 2 +- dataset.dat => datasets/update_cycle_13.dat | 0 test.dataset.dat | 0 tests/test.cpp | 3 +-- 5 files changed, 3 insertions(+), 4 deletions(-) rename dataset.dat => datasets/update_cycle_13.dat (100%) delete mode 100644 test.dataset.dat diff --git a/.gitignore b/.gitignore index ef210b4..84a179d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ QMCChem_dataset_test Slater* Updates* tests/test -datasets.hdf5 \ No newline at end of file +datasets/datasets.* \ No newline at end of file diff --git a/QMCChem_dataset_test.f90 b/QMCChem_dataset_test.f90 index 5fe549a..ecd01f9 100644 --- a/QMCChem_dataset_test.f90 +++ b/QMCChem_dataset_test.f90 @@ -10,7 +10,7 @@ program QMCChem_dataset_test real(c_double), dimension(:,:), allocatable :: Updates real(c_double), dimension(:,:), allocatable :: S, S_inv, S_inv_trans - call Read_dataset("dataset.dat", & + call Read_dataset("update_cycle_13.dat", & cycle_id, & dim, & n_updates, & diff --git a/dataset.dat b/datasets/update_cycle_13.dat similarity index 100% rename from dataset.dat rename to datasets/update_cycle_13.dat diff --git a/test.dataset.dat b/test.dataset.dat deleted file mode 100644 index e69de29..0000000 diff --git a/tests/test.cpp b/tests/test.cpp index 1653f72..8e31c09 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -23,7 +23,6 @@ void read_double(H5File file, std::string key, double * data) { ds.close(); } - int test_cycle(H5File file, int cycle) { /* Read the data */ @@ -77,7 +76,7 @@ int main(int argc, char **argv) { int cycle = std::stoi(argv[1]); H5File file(FILE_NAME, H5F_ACC_RDONLY); - bool ok = test_cycle(file, 21); + bool ok = test_cycle(file, cycle); if (ok) { std::cerr << "ok -- cycle " << std::to_string(cycle) << std::endl;