Skip to content

ezpzbz/aiida-metavo-scheduler

Repository files navigation

GitHub license

Compatible with:

aiida-core

aiida-scheduler-bundle

Custom AiiDA scheduler/transport plugins.

Why do we need it?

AiiDA nicely comes with a handful of scheduler plugins that we can use for running our calculations. However, configuration or type of schedulers may differ slightly or significantly in different HPCs that consequently would require minor or major changes in the shipped plugins with AiiDA to make them work for particular HPC. The hard way to do it (which I was doing for few month) is as follows:

  • forking aiida-core GitHub repository
  • add your version of scheduler/transport plugin to your fork
  • adding them with different names to the entry points
  • go cherry-picking whenever you need to upgrade AiiDA

Thanks to Leopold Talirz for the idea, now the easier way is using aiida-scheduler-bundle.

How does it work?

It can be used to add custom plugins under the aiida-scheduler entry point. So, once you have it installed, you will have extra scheduler plugins in addition to ones shipped with AiiDA. Once you need to configure the computer, you simply provide the entry point for the custom scheduler plugin.

How to add your custome schduler/transport plugin?

  • Fork this repository.
  • Create a folder with your desired name. For example, metavo which will contain modified PBSPro and Transport plugins modified for my case.
  • Copy your files inside this folder. NOTE We can either put all the code in __init__.py or having them in different files as they are in case of metavo
  • add the proper entry points to the setup.json. For the metavo exmaple, we have:
"entry_points": {
    "aiida.cmdline.computer.configure": [
      "sshmetavo = aiida_scheduler_bundle.metavo.ssh_metavo:CONFIGURE_SSH_CMD"
    ],
    "aiida.schedulers": [
      "pbsprometavo = aiida_scheduler_bundle.metavo.pbspro_metavo:PbsproSchedulerMetaVO"
    ],
    "aiida.transports": [
      "sshmetavo = aiida_scheduler_bundle.metavo.ssh_metavo:SshTransport"
    ]

Herein, a modified version of PBSPro will be added under aiida.schedulers entry point. In this case, pbsprometavo can be used during the computer setup.

  • This approach also let us have modified transport plugins too. In the above-mentioned case of metavo, a light change is required to make transport plugin work with a certain HPC which with this approach, we again avoid direct modification in aiida-core.

Installation

Once all files are in place and entry points are defined accordingly:

pip install -e .

Contribution

You may kindly open and PR and add your collection to the package so it can contain all possible combinations and plugins to be used by others as well.

Contact

pzarabadip@gmail.com

About

Custom AiiDA scheduler plugin for MetaCentrum HPC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages