Skip to content
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

Use existing properties to set the max memory, don't add them to the resources #7

Open
giovannipizzi opened this issue Dec 16, 2021 · 1 comment

Comments

@giovannipizzi
Copy link
Member

Instead of defining a new memory_Mb in the resources (very specific to this scheduler), we should reuse concepts already into AiiDA and independent of the scheduler.

E.g. we have metadata.options.max_memory_kb in CalcJobs:

https://github.com/aiidateam/aiida-core/blob/ff1318b485a8b803e115b78946cc4593fc661153/aiida/engine/processes/calcjobs/calcjob.py#L249

and this is passed to the scheduler in the JobTemplate:

https://github.com/aiidateam/aiida-core/blob/ff1318b485a8b803e115b78946cc4593fc661153/aiida/schedulers/datastructures.py#L284

See e.g. how it's used in SLURM:

https://github.com/aiidateam/aiida-core/blob/develop/aiida/schedulers/plugins/slurm.py#L383-L396

@sphuber
Copy link

sphuber commented Dec 16, 2021

Just as a note that we just merged aiidateam/aiida-core#5260 which adds the property default_memory_per_machine, which allows to define the default memory (in kB) to use for a particular Computer. We explicitly chose for kB (instead of MB) to be consistent with the already existing max_memory_kb option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants