Skip to content

Commit

Permalink
Merge pull request #73 from cmstas/uf-safety
Browse files Browse the repository at this point in the history
Add check for UF login node
  • Loading branch information
kmohrman authored Nov 18, 2024
2 parents 9774bb8 + 4868879 commit 3f76c05
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions analysis/wwz/run_wwz4l.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3f76c05

Please sign in to comment.