Skip to main content

AiiDA scheduler plugins that allow for `conda run`.

Project description

Build Status Coverage Status Docs status PyPI version

aiida_conda_scheduler

AiiDA scheduler plugins that allow for conda run.

Currently, as of aiida-core v2.0.1, it is impossible to set up a Computer + Code which can run, for example:

conda run --name myenv mpirun -np 4 pw.x -i input.in

since, (a) a code can only specify a remote_abs_path and (b) only a computer can specify the mpirun_command.

This is really the only way to run a code which is not in the Conda base environment, since conda activate myenv (which could perhaps be added to prepend_text) fails when run in a script.

These scheduler plugins subclass the built-in scheduler subclasses, and overrides the _get_run_line method and:

  1. Raises a NotImplementedError if len(codes_info) != 1 or codes_run_mode != CodeRunMode.SERIAL (i.e. only one code is supported).
  2. Loads the code from codes_info[0].code_uuid and retrieves its description
  3. Uses this description to determine the environment name, by finding env=myenv
  4. Appends conda run --name myenv to the run line.

Installation

pip install aiida_conda_scheduler
reentry scan  # aiida v1.x only

Then the plugins should show in:

verdi plugin list aiida.schedulers

Development

Use pipx to install the tox and pre-commit command tools.

git clone https://github.com/chrisjsewell/aiida-conda-scheduler .
cd aiida-conda-scheduler
pre-commit run --all
tox

For aiida-core v1, use e.g.

tox -e py38-v1

License

MIT

Contact

chrisj_sewell@hotmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiida_conda_scheduler-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

aiida_conda_scheduler-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file aiida_conda_scheduler-0.1.0.tar.gz.

File metadata

File hashes

Hashes for aiida_conda_scheduler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b558537d4cc151711940adef8d1a70826a7aee8460ec66439701faf5dc48db79
MD5 f50d16c02902fffd239f1fd720e394be
BLAKE2b-256 d8b1e3c71b466b9866b70554d4e7a66719b8c5a076acb289c3a370b98258c19e

See more details on using hashes here.

File details

Details for the file aiida_conda_scheduler-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aiida_conda_scheduler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 936eda0729aa6818fcd7467a63afe79c117ecb848e7fee44e76d35d81ea1bd49
MD5 fa43f45986d04da3d7e60c162e44fddd
BLAKE2b-256 d15cd4840e515ff93ec5e491a8db4001aabcdd1fc29340b56ea9357fb2f12170

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page