Skip to content

Commit

Permalink
Trying a different tmp/scratch folder
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Feb 27, 2025
1 parent 228c2b0 commit fa80df4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions armi/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,19 @@ def setMode(cls, mode):
# stick with defaults
pass

try:
if sys.platform.startswith("win"):
# trying a Windows approach
APP_DATA = os.path.join(os.environ["APPDATA"], "armi")
APP_DATA = APP_DATA.replace("/", "\\")
except Exception:
else:
# non-Windows
APP_DATA = os.path.expanduser("~/.armi")

if os.access("/mnt/scratch/", os.W_OK):
APP_DATA = "/mnt/scratch/.armi"
elif os.access("/tmp/", os.W_OK):
APP_DATA = "/tmp/.armi"

if MPI_NODENAMES.index(MPI_NODENAME) == MPI_RANK:
if not os.path.isdir(APP_DATA):
try:
Expand Down

0 comments on commit fa80df4

Please sign in to comment.