Resolve "implement Hamiltonian variables check"#564
Resolve "implement Hamiltonian variables check"#564ALF-Import-Bot wants to merge 19 commits intomasterfrom
Conversation
This reverts commit 9941d91
…k.uni-wuerzburg.de:ALF/ALF into 316-implement-hamiltonian-variables-check
|
In GitLab by @lstocker on Jul 23, 2025, 08:53 UTC: requested review from @johanneshofmann87 |
|
In GitLab by @lstocker on Aug 4, 2025, 12:25 UTC: added 3 commits
|
|
In GitLab by @lstocker on Aug 4, 2025, 13:50 UTC: I created a separate file QMC_runtime_var, which is used by main and can also be accessed by Hamiltonian_##NAME##_smod (or any other file) to read QMC variables. As of now, if, for example, a Hamiltonian does not support the sequential update scheme, yet "Sequential": true is set (using pyalf notation), one should add the following lines to Hamiltonian_##NAME##_smod.F90: This is not the most elegant solution, as it raises an error only when calling .run(), but I do not think we can overcome this (as the filename suggest, we are dealing with runtime variables and, even if in this case one could stop the code at compile time already, this would imply a mix of the two types). |
|
In GitLab by @Jonas_schwab on Aug 5, 2025, 08:59 UTC: I would move the reading and MPI broadcast of the variables to the module. This will clean up For added cleanliness, one could even make most of the variables private and access them via getters, e.g. functions like |
|
Discussion in GitLab: In GitLab by @Jonas_schwab on Aug 5, 2025, 09:08 UTC: Should we move all these variable in there? Giving the Hamiltonian access to so many variables opens avenues for breaking backwards compatibility and additional ways for user to shoot themselves in the foot. Especially things like There are also a few things that don't belong in such a big scope, like In GitLab by @johanneshofmann87 on Aug 5, 2025, 09:28 UTC: Yes, this is a very early stage of the draft. |
|
In GitLab by @johanneshofmann87 on Aug 5, 2025, 09:26 UTC: @Jonas_schwab and @lstocker , |
|
|
||
|
|
||
| ! Space for reading in Langevin & HMC parameters | ||
| Logical :: Langevin, HMC |
There was a problem hiding this comment.
In GitLab by @johanneshofmann87 on Aug 5, 2025, 09:37 UTC:
Primarily, these variables of this namelist (and potential dependencies) are settings in the parameter file and should be in this new module
Prog/QMC_runtime_var_mod.F90
Outdated
|
|
||
| NAMELIST /VAR_HAM_NAME/ ham_name | ||
|
|
||
| ! General |
There was a problem hiding this comment.
In GitLab by @johanneshofmann87 on Aug 5, 2025, 09:37 UTC:
these general variables can likely remain in main and don't need to become "global" variables. The only variable that could be kept in this new module is Mc_step_weight, but I'm not sure yet.
There was a problem hiding this comment.
In GitLab by @lstocker on Aug 6, 2025, 15:07 UTC:
changed this line in version 5 of the diff
There was a problem hiding this comment.
In GitLab by @lstocker on Aug 6, 2025, 15:08 UTC:
See latest commit.
|
In GitLab by @johanneshofmann87 on Aug 5, 2025, 09:37 UTC: left review comments |
|
In GitLab by @johanneshofmann87 on Sep 12, 2025, 14:03 UTC: added 2 commits |
|
In GitLab by @johanneshofmann87 on Sep 12, 2025, 14:05 UTC: @lstocker I have slightly modified your version. Let me know what you think, otherwise I would be ready to start the integration process by asking Jonas for his input :) |
|
In GitLab by @lstocker on Sep 12, 2025, 14:24 UTC: Looks good to me, go ahead! |
|
In GitLab by @johanneshofmann87 on Sep 12, 2025, 14:42 UTC: marked this merge request as ready |
|
In GitLab by @johanneshofmann87 on Sep 12, 2025, 14:42 UTC: approved this merge request |
|
In GitLab by @johanneshofmann87 on Sep 12, 2025, 14:43 UTC: requested review from @johanneshofmann87 and removed approval |
|
In GitLab by @johanneshofmann87 on Sep 12, 2025, 14:43 UTC: requested review from @Jonas_schwab and removed review request for @johanneshofmann87 |
|
Discussion in GitLab: In GitLab by @Jonas_schwab on Sep 23, 2025, 11:28 UTC: Looks good to me. Though, I would also move the reading of In GitLab by @johanneshofmann87 on Sep 23, 2025, 11:32 UTC: Sure, please feel free to go ahead. I was considering it at some point as well. In GitLab by @Jonas_schwab on Sep 23, 2025, 12:45 UTC: Done. I've also moved In GitLab by @lstocker on Sep 23, 2025, 13:11 UTC: I initially did the same. But after discussing with Johannes, we concluded that keeping them in the main is the better option. |
|
In GitLab by @Jonas_schwab on Sep 23, 2025, 12:31 UTC: added 1 commit
|
|
In GitLab by @Jonas_schwab on Sep 23, 2025, 12:35 UTC: added 1 commit
|
|
In GitLab by @Jonas_schwab on Sep 23, 2025, 13:26 UTC: added 1 commit
|
|
In GitLab by @Jonas_schwab on Sep 23, 2025, 14:42 UTC: approved this merge request |
|
In GitLab by @johanneshofmann87 on Sep 29, 2025, 12:52 UTC: resolved all threads |
|
In GitLab by @fassaad on Sep 29, 2025, 13:01 UTC: This is of course much cleaner. Have we really checked all the environment variables? |
|
In GitLab by @fassaad on Oct 28, 2025, 15:56 UTC: Put a lock on the variables. You can only change the variable once. Setters and getters. Variables have to be private, and write routines to update them. These routines can issue warnings! |
|
In GitLab by @Jonas_schwab on Oct 28, 2025, 18:33 UTC: added 1 commit
|
|
In GitLab by @Jonas_schwab on Oct 28, 2025, 18:41 UTC: added 1 commit
|
|
In GitLab by @Jonas_schwab on Oct 28, 2025, 18:42 UTC: I took the liberty to add setters and getters (with a little help from ChatGPT). We could now add something like a bool |
|
In GitLab by @Jonas_schwab on Oct 28, 2025, 18:45 UTC: added 76 commits
|
In GitLab by @lstocker on Jul 23, 2025, 08:53 UTC:
Closes #316
Closes #276
Assignees: lstocker
Reviewers: Jonas_schwab
Approved by: Jonas_schwab
Migrated from GitLab: https://git.physik.uni-wuerzburg.de/ALF/ALF/-/merge_requests/236