-
Notifications
You must be signed in to change notification settings - Fork 11
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
add code registry tools #61
Conversation
This adds a registry that allows users to place a set of yaml files describing computers and codes installed on them in a folder of their choice (AIIDA_CODE_REGISTRY). When using the `load_code` or `load_computer` functions from aiida_azq.registry, these codes are set up automatically on demand.
Some choices made here:
I think the top-level grouping we've converged to here in the registry (to group at the "HPC site" level) is a natural one. Here, I'm adapting this type of grouping by going to one yaml file per site of the form computers:
- label: ...
setup:
configure:
core.ssh:
...
codes:
- label:
...
The registry folder can contain multiple such yaml files, whose contents will simply be merged together. The name of these files is irrelevant. The current script also allows a top-level This yaml format could become how we store computer/code configurations here on the registry |
This is to support cases like: if template variable 1 has value x, then template variable 2 should have value y, which would be hard to express statically. In practice, passing the template variables to the |
Still to do:
|
Just adding my 5 cents. As we discussed earlier, it probably makes sense to keep computers and code setup detached. So the yaml file would look something like: computers:
- label: ...
setup:
configure:
core.ssh:
...
codes:
- label:
... It would probably then make sense to merge |
Few comments:
Note that I am not sure we should hijack the current
I tried to read the thread to determine your argument for decoupling a code from a computer, but couldn't find it. A |
Thanks for the feedback @yakutovicha !
I agree. As mentioned in the text below my yaml example, your layout is actually already supported by the example script as well.
I reused the names from aiida-core since this makes it a drop-in replacement, but if we feel strongly about it we could also call the function differently (note that for your proposition this function would return instances of different classes... to think about). In case you were wondering: if you |
Thanks @sphuber as well!
Yes, the use case is a bit different and the templating mechanism would require the introduction of a new argument.
I think one can make a case for both scenarios (which is why the script I added supports both). |
The file structure we came up with so far is this: daint
.
├── codes
│ ├── cp2k-8.1-cpu.yaml
│ ├── cp2k-8.1-gpu.yaml
│ ├── pp-6.5.yaml
│ ├── projwfc-6.5.yaml
│ └── pw-6.5.yaml
├── hybrid
│ ├── computer-configure.yaml
│ └── computer-setup.yaml
├── hybrid-s1005
│ ├── computer-configure.yaml
│ └── computer-setup.yaml
├── hybrid-s904
│ ├── computer-configure.yaml
│ └── computer-setup.yaml
... or, in other words:
So I am repeating myself here, but to be clear: by construction |
superseded by #62 |
This adds a registry that allows users to place a set of yaml
files describing computers and codes installed on them in a
folder of their choice (AIIDA_CODE_REGISTRY).
When using the
load_code
orload_computer
functions fromaiida_azq.registry, these codes are set up automatically on
demand.
Related to #60 @unkcpz