From 4868879e5b26bb3438313ad41d4cfda5d8fd6d0e Mon Sep 17 00:00:00 2001 From: Kelci Date: Thu, 14 Nov 2024 15:48:27 -0500 Subject: [PATCH] Add check for UF login node --- analysis/wwz/run_wwz4l.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/analysis/wwz/run_wwz4l.py b/analysis/wwz/run_wwz4l.py index 2ea32bc..b2cee58 100644 --- a/analysis/wwz/run_wwz4l.py +++ b/analysis/wwz/run_wwz4l.py @@ -6,6 +6,7 @@ import cloudpickle import gzip import os +import socket from coffea import processor from coffea.nanoevents import NanoAODSchema NanoAODSchema.warn_missing_crossrefs = False @@ -116,6 +117,14 @@ else: raise Exception(f"The \"test\" option is not set up to work with the {executor} executor. Exiting.") + # Check that if on UF login node, we're using WQ + hostname = socket.gethostname() + if "login" in hostname: + # We are on a UF login node, better be using WQ + # Note if this ends up catching more than UF, can also check for "login"&"ufhpc" in name + if (executor != "work_queue"): + raise Exception(f"\nError: We seem to be on a UF login node ({hostname}). If running from here, need to run with WQ.") + # Set the threshold for the ecut (if not applying a cut, should be None) ecut_threshold = args.ecut