Skip to content

Commit

Permalink
if on a backend, check SLURM_CLUSTER_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdempsey90 committed Nov 26, 2024
1 parent 5c03839 commit b7f826a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tst/launch_ci_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,13 @@ def run_tests_in_temp_dir(pr_number, head_repo, head_ref, commit_sha):
else:
# Check that we are on the right system
hostname = socket.gethostname()
cluster = os.getenv("SLURM_CLUSTER_NAME")

if not fnmatch.fnmatch(hostname, "darwin-fe*"):
print("ERROR script must be run from Darwin frontend node!")
sys.exit(1)
# if we are on a backend
if cluster.lower() != "darwin":
print("ERROR script must be run from Darwin!")
sys.exit(1)

# Execute the sbatch command
try:
Expand Down

0 comments on commit b7f826a

Please sign in to comment.