You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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:
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.
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:
psi-j: each cluster system has a python script in this folder
Unicore: each cluster system has a python file BSS.py in a folder (e.g., this for slurm)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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:
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:
babs/dict_cluster_systems.yaml
, we define how SGE clusters would handle different cluster resources request;babs/utils.py
, in functiongenerate_one_bashhead_resources()
we can use dictionaries defined in the YAML file to generate cluster requests.return ['scancel', '-Q', native_id]
psi-j
: each cluster system has a python script in this folderUnicore
: each cluster system has a python fileBSS.py
in a folder (e.g., this for slurm)ReproMan
: see this python scriptgc3pie
: Python files, e.g., this for SGE, this for SlurmNipype
seems also adopts similar wayBeta Was this translation helpful? Give feedback.
All reactions