From 018e3517458773099690ea26b5e71a2b621dc46f Mon Sep 17 00:00:00 2001 From: Krishna Chilleri Date: Thu, 10 Oct 2024 14:39:13 -0600 Subject: [PATCH] do not allow beeflow to be run on a compute node (#941) --- beeflow/client/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/beeflow/client/core.py b/beeflow/client/core.py index 2ea24d912..49fd7cddd 100644 --- a/beeflow/client/core.py +++ b/beeflow/client/core.py @@ -299,6 +299,11 @@ def load_check_charliecloud(): def check_dependencies(): """Check for various dependencies in the environment.""" print('Checking dependencies...') + # Check if running on compute node under Slurm scheduler + if os.environ.get('SLURM_JOB_NODELIST') is not None: + warn('Slurm job node detected! Beeflow should not be run on a compute node.') + warn(f'SLURM_JOB_NODELIST = {os.environ.get("SLURM_JOB_NODELIST")}') + sys.exit(1) # Check for Charliecloud and its version load_check_charliecloud() # Check for the flux API