Skip to content

Commit

Permalink
remove path specific logic to identify MSU machines (NOAA-EMC#2695)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Jun 20, 2024
1 parent 39e719d commit dd6613b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions ush/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ elif [[ -d /scratch1 ]]; then
MACHINE_ID=hera
elif [[ -d /work ]]; then
# We are on MSU Orion or Hercules
if [[ -d /apps/other ]]; then
# We are on Hercules
if [[ $(findmnt -n -o SOURCE /home) =~ "hercules" ]]; then
MACHINE_ID=hercules
else
MACHINE_ID=orion
Expand Down
6 changes: 2 additions & 4 deletions workflow/hosts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import os
import socket
from pathlib import Path

from wxflow import YAMLFile
Expand Down Expand Up @@ -39,10 +40,7 @@ def detect(cls):
if os.path.exists('/scratch1/NCEPDEV'):
machine = 'HERA'
elif os.path.exists('/work/noaa'):
if os.path.exists('/apps/other'):
machine = 'HERCULES'
else:
machine = 'ORION'
machine = socket.gethostname().split("-",1)[0].upper()
elif os.path.exists('/lfs4/HFIP'):
machine = 'JET'
elif os.path.exists('/lfs/f1'):
Expand Down

0 comments on commit dd6613b

Please sign in to comment.