File size: 302 Bytes
864ec44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Author: Bingxin Ke
# Last modified: 2024-02-22

import os


def is_on_slurm():
    cluster_name = os.getenv("SLURM_CLUSTER_NAME")
    is_on_slurm = cluster_name is not None
    return is_on_slurm


def get_local_scratch_dir():
    local_scratch_dir = os.getenv("TMPDIR")
    return local_scratch_dir