📄️ cluster()
cluster() removes the need from teams to maintain custom logic to identify the cluster when operating accross many clusters. This API retrieves the Slurm cluster name from scontrol show config if on a Slurm cluster, otherwise it returns:
📄️ job_gen_task_slurm()
Python LIB version of cscope job-gen command
📄️ get_job()
get_job() gives data about the current running Job:
📄️ cpus()
cpus() shows information about how many cpu cores are available in the System. If its in a Slurm cluster it shows information per partition, if not, it defaults to the local node.
📄️ mem()
mem() shows information about how many cpu cores are available in the System. If its in a Slurm cluster it shows information per partition, if not, it defaults to the local node.
📄️ local_node_gpu_generation_and_count()
localnodegpugenerationand_count() returns a single or a list of GPUInfo instances:
📄️ get_tmp_dir()
gettmpdir() returns /scratch/slurmtmpdir/{os.environ['SLURMJOB_ID']}/.
📄️ slurm_version()
slurm_version() returns a tuple of integers with the Slurm Version. Returns (0, ) if not on a Slurm Cluster.