signac-flow
signac-flow copied to clipboard
More stable/faster environment checking
Feature description
Modifying the environment detection to rely less heavily on the hostname would be helpful for when clusters change hostnames which has happened twice on Delta. @joaander proposed using environmental variables that are set on clusters to indicate identity such as SLURM_CLUSTER_NAME and CLUSTER_NAME.
Proposed solution
Just add an environment variable option to environment detection os.getenv was roughly 3 orders of magnitude faster than socket.getfqdn.
To do this ComputeEnvironment.ispresent can look up an environment variable if given and check for its presence and value.