From 05ae6902d21eead9f45b3b01f3873c330587bee4 Mon Sep 17 00:00:00 2001 From: Paul Kent Date: Thu, 16 Jan 2025 13:25:34 -0500 Subject: [PATCH 1/2] Set batched defaults ahead of v4 --- CHANGELOG.md | 5 +++++ nexus/lib/qmcpack_input.py | 2 +- nexus/tests/unit/test_qmcpack_input.py | 2 ++ src/QMCDrivers/tests/test_QMCDriverFactory.cpp | 6 ++++-- src/Utilities/ProjectData.h | 2 +- src/Utilities/tests/test_project_data.cpp | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a57b0f8586..c8c17f9685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Notable changes to QMCPACK are documented in this file. ## [Unreleased] +* IMPORTANT: the default drivers are now the batched versions in both QMCPACK and NEXUS. To recover legacy v3 behavior in QMCPACK, + set the driver_version parameter to legacy https://qmcpack.readthedocs.io/en/develop/input_overview.html#driver-version-parameter + . For NEXUS put driver = 'legacy' within generate_qmcpack sections. + * Support for backflow optimization has been removed as part of refactoring and cleaning the codebase. QMC runs using backflow wavefunctions are still supported. This feature is expected to eventually be reimplemented in v4. Users needing backflow optimization can use previously released versions of QMCPACK or work towards its reimplementation in the modern code. @@ -25,6 +29,7 @@ This minor release is recommended for all users and includes a couple of build f ### NEXUS * NEXUS: Support for spinor inputs. [#4707](https://github.com/QMCPACK/qmcpack/pull/4707) + ## [3.17.0] - 2023-08-18 This is a recommended release for all users. Thanks to everyone who contributed directly, reported an issue, or suggested an diff --git a/nexus/lib/qmcpack_input.py b/nexus/lib/qmcpack_input.py index 8286c9d3f2..abae7e3387 100644 --- a/nexus/lib/qmcpack_input.py +++ b/nexus/lib/qmcpack_input.py @@ -7364,7 +7364,7 @@ def read_jastrows(filepath): J3_rcut = 5.0, J1_rcut_open = 5.0, J2_rcut_open = 10.0, - driver = 'legacy', # legacy,batched + driver = 'batched', # legacy,batched # batched driver inputs orbitals_cpu = None, # place/evaluate orbitals on cpu if on gpu matrix_inv_cpu = None, # evaluate matrix inverse on cpu if on gpu diff --git a/nexus/tests/unit/test_qmcpack_input.py b/nexus/tests/unit/test_qmcpack_input.py index 5dd15de4ae..0da0b6b9b5 100644 --- a/nexus/tests/unit/test_qmcpack_input.py +++ b/nexus/tests/unit/test_qmcpack_input.py @@ -1279,6 +1279,7 @@ def test_generate(): # legacy drivers qi = generate_qmcpack_input( input_type = 'basic', + driver = 'legacy', system = system, randomsrc = False, pseudos = ['V.opt.xml','O.opt.xml'], @@ -1826,6 +1827,7 @@ def test_incorporate_system(): qi = generate_qmcpack_input( input_type = 'basic', + driver = 'legacy', system = system, pseudos = ['V.opt.xml','O.opt.xml'], spin_polarized = True, diff --git a/src/QMCDrivers/tests/test_QMCDriverFactory.cpp b/src/QMCDrivers/tests/test_QMCDriverFactory.cpp index bb00a5ccca..83c52df4c9 100644 --- a/src/QMCDrivers/tests/test_QMCDriverFactory.cpp +++ b/src/QMCDrivers/tests/test_QMCDriverFactory.cpp @@ -71,7 +71,8 @@ TEST_CASE("QMCDriverFactory create VMC Driver", "[qmcapp]") Communicate* comm; comm = OHMMS::Controller; - ProjectData test_project; + using DV = ProjectData::DriverVersion; + ProjectData test_project("testing",DV::LEGACY); QMCDriverFactory driver_factory(test_project); Libxml2Document doc; @@ -141,7 +142,8 @@ TEST_CASE("QMCDriverFactory create DMC driver", "[qmcapp]") Communicate* comm; comm = OHMMS::Controller; - ProjectData test_project; + using DV = ProjectData::DriverVersion; + ProjectData test_project("testing",DV::LEGACY); QMCDriverFactory driver_factory(test_project); Libxml2Document doc; diff --git a/src/Utilities/ProjectData.h b/src/Utilities/ProjectData.h index c7c1e16daf..3c7ba1bbe1 100644 --- a/src/Utilities/ProjectData.h +++ b/src/Utilities/ProjectData.h @@ -58,7 +58,7 @@ class ProjectData public: /// constructor - ProjectData(const std::string& atitle = "", DriverVersion de = DriverVersion::LEGACY); + ProjectData(const std::string& atitle = "", DriverVersion de = DriverVersion::BATCH); bool get(std::ostream& os) const; bool put(std::istream& is); diff --git a/src/Utilities/tests/test_project_data.cpp b/src/Utilities/tests/test_project_data.cpp index 1a576a9327..542cc46170 100644 --- a/src/Utilities/tests/test_project_data.cpp +++ b/src/Utilities/tests/test_project_data.cpp @@ -88,6 +88,7 @@ TEST_CASE("ProjectData::TestDriverVersion", "[ohmmsapp]") SECTION("driver version batch") { ProjectData proj; + REQUIRE(proj.getDriverVersion() == DV::BATCH); const char* xml_input = R"( @@ -109,7 +110,6 @@ TEST_CASE("ProjectData::TestDriverVersion", "[ohmmsapp]") SECTION("driver version legacy") { ProjectData proj; - REQUIRE(proj.getDriverVersion() == DV::LEGACY); const char* xml_input = R"( From ed354aaa3536f89d8924aeed2ea9a38ae2557c4a Mon Sep 17 00:00:00 2001 From: Ye Luo Date: Fri, 17 Jan 2025 12:37:14 -0600 Subject: [PATCH 2/2] Update test_QMCDriverFactory.cpp --- src/QMCDrivers/tests/test_QMCDriverFactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QMCDrivers/tests/test_QMCDriverFactory.cpp b/src/QMCDrivers/tests/test_QMCDriverFactory.cpp index 83c52df4c9..101cf3cb66 100644 --- a/src/QMCDrivers/tests/test_QMCDriverFactory.cpp +++ b/src/QMCDrivers/tests/test_QMCDriverFactory.cpp @@ -72,7 +72,7 @@ TEST_CASE("QMCDriverFactory create VMC Driver", "[qmcapp]") comm = OHMMS::Controller; using DV = ProjectData::DriverVersion; - ProjectData test_project("testing",DV::LEGACY); + ProjectData test_project("testing", DV::LEGACY); QMCDriverFactory driver_factory(test_project); Libxml2Document doc; @@ -143,7 +143,7 @@ TEST_CASE("QMCDriverFactory create DMC driver", "[qmcapp]") comm = OHMMS::Controller; using DV = ProjectData::DriverVersion; - ProjectData test_project("testing",DV::LEGACY); + ProjectData test_project("testing", DV::LEGACY); QMCDriverFactory driver_factory(test_project); Libxml2Document doc;