QuantumEspresso: Parsing of additional compilation parameters#1760
QuantumEspresso: Parsing of additional compilation parameters#1760Danzelot wants to merge 9 commits intoeasybuilders:developfrom
Conversation
boegel
left a comment
There was a problem hiding this comment.
Thank you very much for your contribution, really appreciate your effort!
Let's try and get rid of the code style issues first?
boegel
left a comment
There was a problem hiding this comment.
This can be cleaned up a bit by only doing a single call to apply_regex_substitutions, since for each of these the same file is being patched.
Something like:
regex_subs = []
if self.cfg['ntypx']:
regex_subs.append((r"ntypx\s*=\s*\d+", r"ntypx = %s" % self.cfg['ntypx']))
if self.cfg['nsx']:
regex_subs.append(...)
...
apply_regex_substitutions(os.path.join('Modules', 'parameters.f90'), regex_subs)|
Thank you for the suggestions. |
|
I noticed that I get a compilation error when I try to change nsx to 30. q-e_building.log SOLVED: I noticed that ntypx should be equal or higher than nsx. So I set both to 30 and the compilation run without problems. |
…build-easyblocks into quantumespresso_parameters
|
|
||
| # patch Modules/parameter.f90 file to set compilation parameters | ||
| regex_para = [] | ||
| for key in ['lmaxx', 'lqmax', 'npk', 'nsx', 'ntypx']: |
There was a problem hiding this comment.
Since we have to have ntypx >= nsx it might be worth the effort to check that it is indeed the case.
I.e., start by picking up both from parameters.f90 then verify the requirement using cfg[key].
And you need to pick up the values from parameters in case someone sets only one of them in the easyconfig file.
|
@Danzelot Any progress on this? |
|
Since we're moving to a whole new CMake-based easyblock for QE in #3257, this PR is being closed |
Adds the ability to specify compilation parameters in the easyconfig file which so far had to be changed laboriously in the source files.
These compilation parameters are specified in the QuantumEspresso user manual in section 2.5
To test it you have to specify one or multiple of the parameters in the easyconfig. Is there a way to write a test case?
PS: This is my first trail in modifying a easyblock but I think it might be useful for other users.