signac-flow icon indicating copy to clipboard operation
signac-flow copied to clipboard

More stable/faster environment checking

Open b-butler opened this issue 2 years ago • 0 comments

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.

b-butler avatar Apr 20 '23 18:04 b-butler