Skip to content

[ENH] Determine the strategies for cluster abstraction #28

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

Closed
zhao-cy opened this issue Feb 19, 2023 Discussed in #27 · 0 comments
Closed

[ENH] Determine the strategies for cluster abstraction #28

zhao-cy opened this issue Feb 19, 2023 Discussed in #27 · 0 comments

Comments

@zhao-cy
Copy link
Collaborator

zhao-cy commented Feb 19, 2023

Discussed in #27

Originally posted by zhao-cy February 19, 2023
Currently BABS is only compatible with SGE clusters; the next step is to make it compatible with Slurm, then probably LSF.

Based on what I've checked so far, there are several ways for cluster abstraction:

  1. Simplest way: if/else. Probably suitable for a short function.

The next two ways require some summary first: summarize the behavior of different clusters (e.g., at least SGE and Slurm, if possible also LSF), define the consistent methods/function names/keywords (e.g., submission), then:

  1. Dictionary-based: a dictionary (e.g., in a YAML file) to look up, with keys consistent across cluster systems.
  • Currently part of BABS uses this way:
    • in YAML file babs/dict_cluster_systems.yaml, we define how SGE clusters would handle different cluster resources request;
    • then in babs/utils.py, in function generate_one_bashhead_resources() we can use dictionaries defined in the YAML file to generate cluster requests.
  1. Class-based: build one class for each cluster system, with (some of) methods’ names consistent across cluster systems
  • Potential advantages over YAML file of dictionary: can directly return a full command with inputs taken in, e.g., return ['scancel', '-Q', native_id]
  • Examples using this way:
@mattcieslak mattcieslak closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2025
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