-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global driver_version switch for mapping input to drivers #3897
Merged
Merged
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
07b4b03
add global parameter for driver_epoch, clean ProjectData a bit
PDoakORNL 83e30a8
cleanup and testing
PDoakORNL c34bfd4
support global driver epoch switch
PDoakORNL 99f8579
updating system tests for ecpoch_driver
PDoakORNL 78119d5
fixing linear_batch system tests
PDoakORNL 6dfe6a9
missed test update.
PDoakORNL 95aa7dc
return vmc_batch, dmc_batch, linear_batch to previous functionality
PDoakORNL df8f3e6
better unit test for batched driver creation
PDoakORNL 7a802d9
fixing bad input in test xml
PDoakORNL 01d1f95
Formatting.
ye-luo 541c257
Merge remote-tracking branch 'origin/develop' into pr/origin-3897
ye-luo 855d249
refactored repetive code
PDoakORNL fe02def
remove name from ProjectData use enum for DriverEpoch
PDoakORNL 2cb25fa
fix default constructor
PDoakORNL aa93224
better exception to throw. Fixed test input file.
PDoakORNL e5f199d
Fix warning.
ye-luo 13150b1
Move string local.
ye-luo c043b49
Minor change.
ye-luo 9c913e6
Set ProjectData title via the constructor or xml. No more setTitle().
ye-luo afb43c0
Merge remote-tracking branch 'origin/develop' into pr/origin-3897
ye-luo 17297fb
fixing missing include only detected in some builds
PDoakORNL 3531272
remove unneeded include from ProjectData
PDoakORNL 35fcde1
Merge branch 'develop' into global_batch_switch
ye-luo e6bc85f
Update QMCDriverFactory.h
ye-luo 48ad456
change driver epoch ->> driver version
PDoakORNL 4381ad3
Merge branch 'global_batch_switch' of github.com:PDoakORNL/qmcpack in…
PDoakORNL 5338776
typo
PDoakORNL eae3545
remove final uses of epoch update copyright
PDoakORNL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,12 +48,23 @@ class QMCDriverFactory | |
QMCRunType new_run_type = QMCRunType::DUMMY; | ||
}; | ||
|
||
/** Application uses this constructor | ||
* param[in] project_data this is stored as a reference and this state controls later behavior. | ||
* For both the driver factory i.e. driver epoch. And the drivers it creates | ||
* i.e. the section id and max CPU seconds. | ||
*/ | ||
QMCDriverFactory(const ProjectData& project_data); | ||
|
||
/** default constructor **/ | ||
//QMCDriverFactory() ; | ||
|
||
/** read the current QMC Section */ | ||
/** read the current QMC Section | ||
* In the application context project data can indicate the input be read in the context of | ||
* the batched driver architecture. | ||
* param[in] cur qmc section node | ||
* param[in] force_batch forces input to be evaluated as if project driver type = batched | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There doesn't seem to be force_batch parameter. |
||
* false does not force unbatched! | ||
*/ | ||
DriverAssemblyState readSection(xmlNodePtr cur) const; | ||
|
||
/** create a new QMCDriver | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ namespace qmcplusplus | |
namespace testing | ||
{ | ||
// clang-format: off | ||
constexpr std::array<const char*, 3> valid_vmc_input_sections{ | ||
constexpr std::array<const char*, 4> valid_vmc_input_sections{ | ||
R"( | ||
<qmc method="vmc" move="pbyp"> | ||
<estimator name="LocalEnergy" hdf5="no" /> | ||
|
@@ -38,8 +38,8 @@ constexpr std::array<const char*, 3> valid_vmc_input_sections{ | |
<parameter name="usedrift"> no </parameter> | ||
</qmc> | ||
)", | ||
R"( | ||
<qmc method="vmc_batch" move="pbyp"> | ||
R"( | ||
<qmc method="vmc" move="pbyp"> | ||
<parameter name="crowds"> 8 </parameter> | ||
<estimator name="LocalEnergy" hdf5="no" /> | ||
<parameter name="total_walkers"> 32 </parameter> | ||
|
@@ -51,8 +51,8 @@ constexpr std::array<const char*, 3> valid_vmc_input_sections{ | |
<parameter name="usedrift"> no </parameter> | ||
</qmc> | ||
)", | ||
R"( | ||
<qmc method="vmc_batch" move="pbyp"> | ||
R"( | ||
<qmc method="vmc" move="pbyp"> | ||
<parameter name="crowds"> 1 </parameter> | ||
<estimator name="LocalEnergy" hdf5="no" /> | ||
<parameter name="total_walkers"> 1 </parameter> | ||
|
@@ -63,15 +63,29 @@ constexpr std::array<const char*, 3> valid_vmc_input_sections{ | |
<parameter name="timestep"> 1.0 </parameter> | ||
<parameter name="usedrift"> no </parameter> | ||
</qmc> | ||
)", | ||
R"( | ||
<qmc method="vmc_batch" move="pbyp"> | ||
<parameter name="crowds"> 8 </parameter> | ||
<estimator name="LocalEnergy" hdf5="no" /> | ||
<parameter name="total_walkers"> 32 </parameter> | ||
<parameter name="warmupSteps"> 5 </parameter> | ||
<parameter name="substeps"> 5 </parameter> | ||
<parameter name="steps"> 1 </parameter> | ||
<parameter name="blocks"> 2 </parameter> | ||
<parameter name="timestep"> 1.0 </parameter> | ||
<parameter name="usedrift"> no </parameter> | ||
</qmc> | ||
)"}; | ||
|
||
|
||
// to avoid creating a situation where section test xml is in two places | ||
constexpr int valid_vmc_input_vmc_index = 0; | ||
constexpr int valid_vmc_input_vmc_batch_index = 1; | ||
constexpr int valid_vmc_input_vmc_tiny_index = 2; | ||
constexpr int valid_vmc_input_vmc_index = 0; | ||
constexpr int valid_vmc_input_vmc_batch_index = 1; | ||
constexpr int valid_vmc_input_vmc_tiny_index = 2; | ||
constexpr int valid_vmc_batch_input_vmc_batch_index = 3; | ||
|
||
constexpr std::array<const char*, 2> valid_dmc_input_sections{ | ||
constexpr std::array<const char*, 3> valid_dmc_input_sections{ | ||
R"( | ||
<qmc method="dmc" move="pbyp" gpu="yes"> | ||
<estimator name="LocalEnergy" hdf5="no" /> | ||
|
@@ -84,7 +98,21 @@ constexpr std::array<const char*, 2> valid_dmc_input_sections{ | |
<parameter name="nonlocalmoves"> no </parameter> | ||
</qmc> | ||
)", | ||
R"( | ||
R"( | ||
<qmc method="dmc" move="pbyp"> | ||
<parameter name="crowds"> 4 </parameter> | ||
<estimator name="LocalEnergy" hdf5="no" /> | ||
<parameter name="total_walkers"> 8 </parameter> | ||
<parameter name="reserve"> 1.25 </parameter> | ||
<parameter name="warmupSteps"> 5 </parameter> | ||
<parameter name="substeps"> 5 </parameter> | ||
<parameter name="steps"> 1 </parameter> | ||
<parameter name="blocks"> 2 </parameter> | ||
<parameter name="timestep"> 1.0 </parameter> | ||
<parameter name="usedrift"> no </parameter> | ||
</qmc> | ||
)", | ||
R"( | ||
<qmc method="dmc_batch" move="pbyp"> | ||
<parameter name="crowds"> 4 </parameter> | ||
<estimator name="LocalEnergy" hdf5="no" /> | ||
|
@@ -100,16 +128,18 @@ constexpr std::array<const char*, 2> valid_dmc_input_sections{ | |
)"}; | ||
|
||
// to avoid creating a situation where section test xml is in two places | ||
constexpr int valid_dmc_input_dmc_index = 0; | ||
constexpr int valid_dmc_input_dmc_batch_index = 1; | ||
constexpr int valid_dmc_input_dmc_index = 0; | ||
constexpr int valid_dmc_input_dmc_batch_index = 1; | ||
constexpr int valid_dmc_batch_input_dmc_batch_index = 2; | ||
|
||
/** As far as I can tell these are no longer valid */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to update the WFOptDriverInput class, and I'll change these tests then as well. |
||
constexpr std::array<const char*, 2> valid_opt_input_sections{ | ||
R"( | ||
<qmc method="opt_batch" move="pbyp" gpu="yes"> | ||
<qmc method="opt" move="pbyp" gpu="yes"> | ||
</qmc> | ||
)", | ||
R"( | ||
<qmc method="opt_batch" move="pbyp"> | ||
<qmc method="opt" move="pbyp"> | ||
<optimize method="test" output_param_file="yes"/> | ||
<parameter name="opt_num_crowds"> 4 </parameter> | ||
<parameter name="opt_crowd_size"> 8 </parameter> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover reference to 'driver epoch'