From c7c48a340212827b31dafd8f3154befe51fb4bd9 Mon Sep 17 00:00:00 2001 From: JeffBeck-NOAA <55201531+JeffBeck-NOAA@users.noreply.github.com> Date: Fri, 23 Jul 2021 13:24:45 -0600 Subject: [PATCH] Revert "Modifications to allow workflow to run to completion with GNU build on Hera (#526)" (#559) This reverts commit 19a872b36f40ce2d3f14e110b458d6e08f1bd102. --- scripts/exregional_make_ics.sh | 7 --- scripts/exregional_make_lbcs.sh | 7 --- scripts/exregional_run_fcst.sh | 7 --- ush/bash_utils/unload_python.sh | 97 --------------------------------- ush/source_util_funcs.sh | 6 -- 5 files changed, 124 deletions(-) delete mode 100644 ush/bash_utils/unload_python.sh diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 98a82d815e..41b00ac637 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -608,13 +608,6 @@ $settings" # of chgres_cube is nonzero. # A similar thing happens in the forecast task. # -#----------------------------------------------------------------------- -# Deactivate the conda environment to avoid conflicts between the -# environment used by the regional workflow (prepended to your $PATH) -# and that used in the run environment. -#----------------------------------------------------------------------- -unload_python - ${APRUN} ${exec_fp} || \ print_err_msg_exit "\ Call to executable (exec_fp) to generate surface and initial conditions diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 1ec989c88d..3865f092a1 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -523,13 +523,6 @@ $settings" # of chgres_cube is nonzero. # A similar thing happens in the forecast task. # -#----------------------------------------------------------------------- -# Deactivate the conda environment to avoid conflicts between the -# environment used by the regional workflow (prepended to your $PATH) -# and that used in the run environment. -#----------------------------------------------------------------------- - unload_python - ${APRUN} ${exec_fp} || \ print_err_msg_exit "\ Call to executable (exec_fp) to generate lateral boundary conditions (LBCs) diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 9750dee701..842926891b 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -523,13 +523,6 @@ Call to function to create a diag table file for the current cycle's # #----------------------------------------------------------------------- # -#----------------------------------------------------------------------- -# Deactivate the conda environment to avoid conflicts between the -# environment used by the regional workflow (prepended to your $PATH) -# and that used in the run environment. -#----------------------------------------------------------------------- -unload_python - $APRUN ${FV3_EXEC_FP} || print_err_msg_exit "\ Call to executable to run FV3-LAM forecast returned with nonzero exit code." diff --git a/ush/bash_utils/unload_python.sh b/ush/bash_utils/unload_python.sh deleted file mode 100644 index f5879de0c0..0000000000 --- a/ush/bash_utils/unload_python.sh +++ /dev/null @@ -1,97 +0,0 @@ -# -#----------------------------------------------------------------------- -# -# This file defines a function that detects if a python or miniconds3 -# module is loaded, and if so, unloads that module. This may be -# necessary on machines where the loaded python environment isn't -# compatible with environment set for the compiler. -# -#----------------------------------------------------------------------- -# -function unload_python() { -# -#----------------------------------------------------------------------- -# -# Save current shell options (in a global array). Then set new options -# for this script/function. -# -#----------------------------------------------------------------------- -# - { save_shell_opts; set -u +x; } > /dev/null 2>&1 -# -#----------------------------------------------------------------------- -# -# Get the full path to the file in which this script/function is located -# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in -# which the file is located (scrfunc_dir). -# -#----------------------------------------------------------------------- -# - local scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" ) - local scrfunc_fn=$( basename "${scrfunc_fp}" ) - local scrfunc_dir=$( dirname "${scrfunc_fp}" ) -# -#----------------------------------------------------------------------- -# -# Get the name of this function. -# -#----------------------------------------------------------------------- -# - local func_name="${FUNCNAME[0]}" -# -#----------------------------------------------------------------------- -# -# Check arguments. -# -#----------------------------------------------------------------------- -# - if [ "$#" -ne 0 ]; then - - print_err_msg_exit " -Incorrect number of arguments specified: - - Function name: \"${func_name}\" - Number of arguments specified: $# - -Usage: - - ${func_name} - -" - - fi -# -#----------------------------------------------------------------------- -# -# If the miniconda or python modules are loaded, unload them -# -#----------------------------------------------------------------------- -# - - modules_to_unload=( python miniconda3 ) - loaded_modules=$(module list 2>&1) - - for module_to_unload in ${modules_to_unload[@]}; do - if [[ "${loaded_modules}" =~ "${module_to_unload}" ]]; then - print_info_msg "\ -Unloading module ${module_to_unload} libraries needed for workflow generation but not for running the workflow... " - module unload ${module_to_unload} - fi - done - - loaded_modules=$(module list 2>&1) - print_info_msg "\ -Loaded modules are: $loaded_modules " - -# -#----------------------------------------------------------------------- -# -# Restore the shell options saved at the beginning of this script/func- -# tion. -# -#----------------------------------------------------------------------- -# - { restore_shell_opts; } > /dev/null 2>&1 - -} - diff --git a/ush/source_util_funcs.sh b/ush/source_util_funcs.sh index d8b866b69d..bc6a2f0832 100644 --- a/ush/source_util_funcs.sh +++ b/ush/source_util_funcs.sh @@ -183,12 +183,6 @@ function source_util_funcs() { # #----------------------------------------------------------------------- # -# Unload python or miniconda3 if loaded -# -#----------------------------------------------------------------------- -# - . ${bashutils_dir}/unload_python.sh -# # Source the file containing the function that creates a symlink to a # file (including performing checks). #