From 72b91acd8671967dbf9d2105c67cc881366b7fd6 Mon Sep 17 00:00:00 2001 From: psakievich Date: Thu, 15 Jun 2023 16:50:43 -0600 Subject: [PATCH] Better find_machine option for cee (#543) * Better find_machine option for cee Hopefully this fixes the break in our CI container creation process. The container is building the snapshot for me locally in docker now. * Update create-exawind-snapshot.sh forgot flag to use machine name for the snapshot --- scripts/create-exawind-snapshot.sh | 6 +++--- spack-scripting/scripting/cmd/manager_cmds/find_machine.py | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/create-exawind-snapshot.sh b/scripts/create-exawind-snapshot.sh index c5ed5532..fc60efdf 100755 --- a/scripts/create-exawind-snapshot.sh +++ b/scripts/create-exawind-snapshot.sh @@ -42,13 +42,13 @@ if [[ "${SPACK_MANAGER_MACHINE}" == 'eagle' ]]; then cmd "nice -n19 spack manager snapshot -m -s exawind%gcc+hypre+openfast~cuda exawind%intel+hypre+openfast exawind%clang+hypre+openfast exawind%gcc+hypre+openfast+cuda+amr_wind_gpu+nalu_wind_gpu" elif [[ "${SPACK_MANAGER_MACHINE}" == "e4s" ]]; then NUM_CORES=8 - cmd "nice -n19 spack manager snapshot -s exawind+hypre+openfast amr-wind+hypre+openfast+masa" + cmd "nice -n19 spack manager snapshot -m -s exawind+hypre+openfast amr-wind+hypre+openfast+masa" elif [[ "${SPACK_MANAGER_MACHINE}" == "rhodes" ]]; then NUM_CORES=16 - cmd "nice -n19 spack manager snapshot -s exawind%gcc+hypre+openfast exawind%intel+hypre+openfast exawind%clang+hypre+openfast" + cmd "nice -n19 spack manager snapshot -m -s exawind%gcc+hypre+openfast exawind%intel+hypre+openfast exawind%clang+hypre+openfast" elif [[ "${SPACK_MANAGER_MACHINE}" == "summit" ]]; then NUM_CORES=8 - cmd "nice -n19 spack manager snapshot -s exawind%gcc+hypre+cuda+amr_wind_gpu+nalu_wind_gpu exawind%gcc+hypre~cuda" + cmd "nice -n19 spack manager snapshot -m -s exawind%gcc+hypre+cuda+amr_wind_gpu+nalu_wind_gpu exawind%gcc+hypre~cuda" elif [[ "${SPACK_MANAGER_MACHINE}" == "snl-hpc" ]]; then # TODO we should probably launch the install through slurm and exit on this one cmd "nice -n19 spack manager snapshot -s exawind+hypre+openfast amr-wind+hypre+openfast" diff --git a/spack-scripting/scripting/cmd/manager_cmds/find_machine.py b/spack-scripting/scripting/cmd/manager_cmds/find_machine.py index 97fc26d0..9ccf4d28 100644 --- a/spack-scripting/scripting/cmd/manager_cmds/find_machine.py +++ b/spack-scripting/scripting/cmd/manager_cmds/find_machine.py @@ -17,10 +17,8 @@ def __init__(self, test, full_machine_name): def is_cee(hostname): - known_hosts = ("cee", "ews", "ecw", "ecs", "hpws", "ascic") - for k in known_hosts: - if k in hostname: - return True + if "SNLSITE" in os.environ: + return os.environ["SNLSITE"] == "cee" return False