Skip to content

Commit

Permalink
Revert "Add AWS functionality to workflow setup and forecast job (#1667
Browse files Browse the repository at this point in the history
…)" (#1707)

This reverts commit 38cd0bc.
  • Loading branch information
WalterKolczynski-NOAA committed Jun 22, 2023
1 parent 38cd0bc commit cc1bea7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 227 deletions.
137 changes: 0 additions & 137 deletions env/AWSPW.env

This file was deleted.

26 changes: 3 additions & 23 deletions jobs/rocoto/fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/detect_machine.sh"
set +x
source "${HOMEgfs}/ush/module-setup.sh"
if [[ "${MACHINE_ID}" != "noaacloud" ]]; then
module use "${HOMEgfs}/sorc/ufs_model.fd/tests"
fi

module use "${HOMEgfs}/sorc/ufs_model.fd/tests"
module load modules.ufs_model.lua
module load prod_util
if [[ "${MACHINE_ID}" = "wcoss2" ]]; then
module load cray-pals
fi
Expand All @@ -31,25 +30,6 @@ if [[ "${MACHINE_ID}" = "hera" ]]; then
#elif [[ "${MACHINE_ID}" = "wcoss2" ]]; then
# module load "python/3.7.5"
fi
if [[ "${MACHINE_ID}" == "noaacloud" ]]; then
if [[ "${PW_CSP:-}" = "aws" ]]; then

# TODO: This can be cleaned-up; most of this is a hack for now.
module use "/contrib/spack-stack/envs/ufswm/install/modulefiles/Core"
module load "stack-intel"
module load "stack-intel-oneapi-mpi"
module use -a "/contrib/spack-stack/miniconda/modulefiles/miniconda/"
module load "py39_4.12.0"
module load "ufs-weather-model-env/1.0.0"
export NETCDF="/contrib/spack-stack/miniconda/apps/miniconda/py39_4.12.0"
# TODO: Are there plans for EPIC to maintain this package or should GW provide support?
export UTILROOT="/contrib/global-workflow/NCEPLIBS-prod_util"
export PATH="${PATH}:/contrib/global-workflow/bin"
ndate_path="$(command -v ndate)"
export NDATE="${ndate_path}"
fi
fi

module list
unset MACHINE_ID
set_trace
Expand Down
28 changes: 5 additions & 23 deletions sorc/build_ufs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,10 @@ COMPILE_NR=0
CLEAN_BEFORE=YES
CLEAN_AFTER=NO

if [[ "${MACHINE_ID}" != "noaacloud" ]]; then
./tests/compile.sh "${MACHINE_ID}" "${MAKE_OPT}" "${COMPILE_NR}" "intel" "${CLEAN_BEFORE}" "${CLEAN_AFTER}"
mv "./tests/fv3_${COMPILE_NR}.exe" ./tests/ufs_model.x
mv "./tests/modules.fv3_${COMPILE_NR}.lua" ./tests/modules.ufs_model.lua
cp "./modulefiles/ufs_common.lua" ./tests/ufs_common.lua
else

if [[ "${PW_CSP}" == "aws" ]]; then
# TODO: This will need to be addressed further when the EPIC stacks are available/supported.
module use /contrib/spack-stack/envs/ufswm/install/modulefiles/Core
module load stack-intel
module load stack-intel-oneapi-mpi
module load ufs-weather-model-env/1.0.0
# TODO: It is still uncertain why this is the only module that is
# missing; check the spack build as this needed to be added manually.
module load w3emc/2.9.2 # TODO: This has similar issues for the EPIC stack.
module list
fi

export CMAKE_FLAGS="${MAKE_OPT}"
./build.sh
mv "${cwd}/ufs_model.fd/build/ufs_model" "${cwd}/ufs_model.fd/tests/ufs_model.x"
fi
./tests/compile.sh "${MACHINE_ID}" "${MAKE_OPT}" "${COMPILE_NR}" "intel" "${CLEAN_BEFORE}" "${CLEAN_AFTER}"
mv "./tests/fv3_${COMPILE_NR}.exe" ./tests/ufs_model.x
mv "./tests/modules.fv3_${COMPILE_NR}.lua" ./tests/modules.ufs_model.lua
cp "./modulefiles/ufs_common.lua" ./tests/ufs_common.lua
cp "./modulefiles/ufs_common_spack.lua" ./tests/ufs_common_spack.lua

exit 0
7 changes: 0 additions & 7 deletions ush/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ case $(hostname -f) in
*) MACHINE_ID=UNKNOWN ;; # Unknown platform
esac

if [[ ${MACHINE_ID} == "UNKNOWN" ]]; then
case ${PW_CSP:-} in
"aws" | "google" | "azure") MACHINE_ID=noaacloud ;;
*) PW_CSP="UNKNOWN"
esac
fi

# Overwrite auto-detect with MACHINE if set
MACHINE_ID=${MACHINE:-${MACHINE_ID}}

Expand Down
8 changes: 0 additions & 8 deletions ush/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@ elif [[ ${MACHINE_ID} = discover* ]]; then
export PATH=${PATH}:${SPACK_ROOT}/bin
. "${SPACK_ROOT}"/share/spack/setup-env.sh

# TODO: This can likely be made more general once other cloud
# platforms come online.
elif [[ ${MACHINE_ID} = "noaacloud" ]]; then

export SPACK_ROOT=/contrib/global-workflow/spack-stack/spack
export PATH=${PATH}:${SPACK_ROOT}/bin
. "${SPACK_ROOT}"/share/spack/setup-env.sh

else
echo WARNING: UNKNOWN PLATFORM 1>&2
fi
8 changes: 3 additions & 5 deletions workflow/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ class Host:
"""

SUPPORTED_HOSTS = ['HERA', 'ORION', 'JET',
'WCOSS2', 'S4', 'CONTAINER', 'AWSPW']
'WCOSS2', 'S4', 'CONTAINER']

def __init__(self, host=None):

detected_host = self.detect()

if host is not None and host != detected_host:
raise ValueError(
f'detected host: "{detected_host}" does not match host: "{host}"')
raise ValueError(f'detected host: "{detected_host}" does not match host: "{host}"')

self.machine = detected_host
self.info = self._get_info
Expand Down Expand Up @@ -58,8 +57,7 @@ def detect(cls):
@property
def _get_info(self) -> dict:

hostfile = Path(os.path.join(os.path.dirname(__file__),
f'hosts/{self.machine.lower()}.yaml'))
hostfile = Path(os.path.join(os.path.dirname(__file__), f'hosts/{self.machine.lower()}.yaml'))
try:
info = YAMLFile(path=hostfile)
except FileNotFoundError:
Expand Down
24 changes: 0 additions & 24 deletions workflow/hosts/awspw.yaml

This file was deleted.

0 comments on commit cc1bea7

Please sign in to comment.