Closed martin-ueding closed 7 years ago
Hi Martin, There is no standard list of these tags. At one point I wrote a tutorial on how to write these XML tags and pretty shortly afterwards it rapidly became out of date. Keeping up with all the tags would be a never ending task. I have created for myself a set of Python scripts called HMC Python which use Python to write some of this stuff. I can make that available potentially if it helps. I use it to drive our own gauge generation.
Best, B
On January 14, 2017 3:11:21 PM EST, Martin Ueding notifications@github.com wrote:
Currently when I write an input file, I more or less do these things:
- Look through my list of
std::string name
entities that I parsed from the source code to find some particular gauge action or fermion state. If that does not help, I give some wrong name and lethmc
crash. All the keys in the singleton map are printed, that way one knows which keys are allowed. A case where this is needed is when finding a solver to use with rational monomials where a multi-shift solver is a must.- Do a
git grep LW_TREE_GAUGEACT
to find the file where it is defined.- Go through the C++ source or header file and find the
read
orwrite
calls that interact with the XML. There I can see which parameters are loaded and which are optional.- Look at the header file (or the separate parameters file) to see which types those parameters are to get an idea what values I can supply.
This works, it does not need much knowledge of C++. However, I think it would be very nice to have a definitive list of possible XML tags and values. Is there something like that hidden in the documentation directory?
Other than manually looking through all the code I thought about using the Clang C++ parser to extract all the calls to
read
. I have looked into the Clang API a bit but I think it will take too much time for me to get it implemented properly and then it would have cost a multiple of the time needed to perform the above steps a couple times for the actions I want to simulate.Is that pretty much it or am I missing something?
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/JeffersonLab/chroma/issues/19
-- Balint Joó, Scientific Computing Group, Jefferson Lab Email: bjoo@jlab.org Tel: +1 757 269 5339 Sent form my mobile phone
Thanks for the quick response!
I think I have enough experience with the XML tags and the code base to construct input files in a decent time. In order to save some typing, I use the Jinja 2 template engine to create monomial blocks. This is handy since there are multiple monomials of the same structure with slightly different parameters (light vs. strange; MD residual vs. acceptance residual).
I'll close this issue since there is no canonical documentation, that was my question already :-).
Currently when I write an input file, I more or less do these things:
std::string name
entities that I parsed from the source code to find some particular gauge action or fermion state. If that does not help, I give some wrong name and lethmc
crash. All the keys in the singleton map are printed, that way one knows which keys are allowed. A case where this is needed is when finding a solver to use with rational monomials where a multi-shift solver is a must.git grep LW_TREE_GAUGEACT
to find the file where it is defined.read
orwrite
calls that interact with the XML. There I can see which parameters are loaded and which are optional.This works, it does not need much knowledge of C++. However, I think it would be very nice to have a definitive list of possible XML tags and values. Is there something like that hidden in the documentation directory?
Other than manually looking through all the code I thought about using the Clang C++ parser to extract all the calls to
read
. I have looked into the Clang API a bit but I think it will take too much time for me to get it implemented properly and then it would have cost a multiple of the time needed to perform the above steps a couple times for the actions I want to simulate.Is that pretty much it or am I missing something?