From b1951d154f02389fb6d9f1d1a38cf637b2a6e76d Mon Sep 17 00:00:00 2001 From: George Gayno Date: Wed, 11 Sep 2019 13:13:11 +0000 Subject: [PATCH] feature/hera_port This commit references #1. Remove unused "module-setup.csh.inc" Update "ush/fv3gfs_chgres.sh" to point to new location for 'sub_wcoss' scripts. Remove some commented out code. Update "module-setup.sh.inc" for Hera. --- modulefiles/module-setup.csh.inc | 89 -------------------------------- modulefiles/module-setup.sh.inc | 4 +- ush/fv3gfs_chgres.sh | 73 +++++++++----------------- 3 files changed, 25 insertions(+), 141 deletions(-) delete mode 100644 modulefiles/module-setup.csh.inc diff --git a/modulefiles/module-setup.csh.inc b/modulefiles/module-setup.csh.inc deleted file mode 100644 index a93b21a3c..000000000 --- a/modulefiles/module-setup.csh.inc +++ /dev/null @@ -1,89 +0,0 @@ -set __ms_shell=csh - -eval "if ( -d / ) set __ms_shell=tcsh" - -if ( { test -d /lfs3 } ) then - if ( ! { module help >& /dev/null } ) then - source /apps/lmod/lmod/init/$__ms_shell - endif - module purge -else if ( { test -d /scratch3 } ) then - # We are on NOAA Theia - if ( ! { module help >& /dev/null } ) then - source /apps/lmod/lmod/init/$__ms_shell - endif - module purge -else if ( { test -d /gpfs/hps -a -e /etc/SuSE-release } ) then - # We are on NOAA Luna or Surge - if ( ! { module help >& /dev/null } ) then - source /opt/modules/default/init/$__ms_shell - endif - module purge - module purge - unset _LMFILES_ - unset LOADEDMODULES - module use /opt/modulefiles - module use /opt/cray/ari/modulefiles - module use /opt/cray/craype/default/alt-modulefiles - module use /opt/cray/alt-modulefiles - module use /gpfs/hps/nco/ops/nwprod/modulefiles - module use /gpfs/hps/nco/ops/nwprod/lib/modulefiles - module use /usrx/local/prod/modulefiles -else if ( { test -d /dcom -a -d /hwrf } ) then - # We are on NOAA Tide or Gyre - if ( ! { module help >& /dev/null } ) then - source /usrx/local/Modules/default/init/$__ms_shell - endif - module purge -else if ( { test -L /usrx && sh -c "readlink /usrx 2> /dev/null | grep dell" } ) then - # We are on WCOSS Mars or Venus - if ( ! { module help >& /dev/null } ) then - source /usrx/local/prod/lmod/lmod/init/$__ms_shell - endif - module purge -else if ( { test -d /glade } ) then - # We are on NCAR Yellowstone - if ( ! { module help >& /dev/null } ) then - source /usr/share/Modules/init/$__ms_shell - endif - module purge -else if ( { test -d /lustre -a -d /ncrc } ) then - # We are on GAEA. - if ( ! { module help >& /dev/null } ) then - # We cannot simply load the module command. The GAEA - # /etc/csh.login modifies a number of module-related variables - # before loading the module command. Without those variables, - # the module command fails. Hence we actually have to source - # /etc/csh.login here. - source /etc/csh.login - set __ms_source_etc_csh_login=yes - else - set __ms_source_etc_csh_login=no - endif - module purge - unsetenv _LMFILES_ - unsetenv _LMFILES_000 - unsetenv _LMFILES_001 - unsetenv LOADEDMODULES - module load modules - if ( { test -d /opt/cray/ari/modulefiles } ) then - module use -a /opt/cray/ari/modulefiles - endif - if ( { test -d /opt/cray/pe/ari/modulefiles } ) then - module use -a /opt/cray/pe/ari/modulefiles - endif - if ( { test -d /opt/cray/pe/craype/default/modulefiles } ) then - module use -a /opt/cray/pe/craype/default/modulefiles - endif - setenv NCEPLIBS /lustre/f1/pdata/ncep_shared/NCEPLIBS/lib - if ( { test -d /lustre/f1/pdata/ncep_shared/NCEPLIBS/lib } ) then - module use $NCEPLIBS/modulefiles - endif - if ( "$__ms_source_etc_csh_login" == yes ) then - source /etc/csh.login - unset __ms_source_etc_csh_login - endif -else - # Workaround for csh limitation. Use sh to print to stderr. - sh -c 'echo WARNING: UNKNOWN PLATFORM 1>&2' -endif diff --git a/modulefiles/module-setup.sh.inc b/modulefiles/module-setup.sh.inc index 6815b1a46..bb9c1f0a1 100644 --- a/modulefiles/module-setup.sh.inc +++ b/modulefiles/module-setup.sh.inc @@ -22,8 +22,8 @@ if [[ -d /lfs3 ]] ; then source /apps/lmod/lmod/init/$__ms_shell fi module purge -elif [[ -d /scratch3 ]] ; then - # We are on NOAA Theia +elif [[ `hostname -a` == *"hera.fairmont.rdhpcs.noaa.gov"* ]] ; then + # We are on NOAA Hera if ( ! eval module help > /dev/null 2>&1 ) ; then source /apps/lmod/lmod/init/$__ms_shell fi diff --git a/ush/fv3gfs_chgres.sh b/ush/fv3gfs_chgres.sh index 188af291c..0f795d0b5 100755 --- a/ush/fv3gfs_chgres.sh +++ b/ush/fv3gfs_chgres.sh @@ -12,7 +12,7 @@ # - Uncomment the job cards for your machine. Ensure the # 'machine' variable is uncommented. Ensure job cards for # the other machines are prefixed by "##". -# - Check the job card account. On Theia, this is +# - Check the job card account. On Hera, this is # "#SBATCH -q $account". On WCOSS, this is "#BSUB -P $account". # You may not have permissions to run under the default account. # - Make sure you have linked the 'fixed' directories using @@ -30,22 +30,22 @@ # CDATE - year/month/day/hour of your experiment. # HOMEgfs - Path to your checkout repository. # - Start the script as follows: -# Theia: "sbatch fv3gfs_chgres.sh" +# Hera: "sbatch fv3gfs_chgres.sh" # WCOSS Dell and Cray: "cat fv3gfs_chgres.sh | bsub" # #------------------------------------------------------------------------ #----WCOSS_DELL JOBCARD -##BSUB -P FV3GFS-T2O -##BSUB -o log.chgres.%J -##BSUB -e log.chgres.%J -##BSUB -J fv3_chgres -##BSUB -q dev -##BSUB -M 6000 -##BSUB -W 10:00 -##BSUB -R span[ptile=14] -##BSUB -n 14 -#export machine=WCOSS_DELL_P3 +#BSUB -P FV3GFS-T2O +#BSUB -o log.chgres.%J +#BSUB -e log.chgres.%J +#BSUB -J fv3_chgres +#BSUB -q dev +#BSUB -M 6000 +#BSUB -W 10:00 +#BSUB -R span[ptile=14] +#BSUB -n 14 +export machine=WCOSS_DELL_P3 #----WCOSS_CRAY JOBCARD ##BSUB -L /bin/sh @@ -61,15 +61,15 @@ #---- Hera JOBCARD #---- Submit as: sbatch $script -#SBATCH -J fv3_chgres_driver -#SBATCH -A fv3-cpu -#SBATCH --open-mode=truncate -#SBATCH -o log.chgres -#SBATCH -e log.chgres -#SBATCH --nodes=1 -#SBATCH -q batch -#SBATCH -t 02:00:00 -export machine=HERA +##SBATCH -J fv3_chgres_driver +##SBATCH -A fv3-cpu +##SBATCH --open-mode=truncate +##SBATCH -o log.chgres +##SBATCH -e log.chgres +##SBATCH --nodes=1 +##SBATCH -q batch +##SBATCH -t 02:00:00 +#export machine=HERA set -x @@ -132,34 +132,20 @@ status=$? [[ $status -ne 0 ]] && exit $status if [ $machine = WCOSS_C ]; then - # . $MODULESHOME/init/sh 2>>/dev/null - # module load prod_util prod_envir hpss 2>>/dev/null - # module load PrgEnv-intel 2>>/dev/null export KMP_AFFINITY=disabled export OMP_NUM_THREADS_CH=24 export APRUNC="aprun -n 1 -N 1 -j 1 -d $OMP_NUM_THREADS_CH -cc depth" export APRUNTF='aprun -q -j1 -n1 -N1 -d1 -cc depth' - export SUB=/u/emc.glopara/bin/sub_wcoss_c + export SUB=$LS_SUBCWD/../util/sub_wcoss_c export ACCOUNT=FV3GFS-T2O export QUEUE=dev export QUEUE_TRANS=dev_transfer elif [ $machine = WCOSS_DELL_P3 ]; then - # . /usrx/local/prod/lmod/lmod/init/sh 2>>/dev/null - # module purge 2>>/dev/null - # module load EnvVars/1.0.2 2>>/dev/null - # module load lsf/10.1 2>>/dev/null - # module load ips/18.0.1.163 2>>/dev/null - # module load impi/18.0.1 2>>/dev/null - # module load prod_util/1.1.0 2>>/dev/null - # module load prod_envir/1.0.2 2>>/dev/null - # module load HPSS/5.0.2.5 2>>/dev/null - # module load NetCDF/4.5.0 2>>/dev/null - # module load HDF5-serial/1.10.1 2>>/dev/null export OMP_NUM_THREADS_CH=14 export KMP_AFFINITY=disabled export APRUNC="time" export APRUNTF="time" - export SUB=/u/emc.glopara/bin/sub_wcoss_d + export SUB=$LS_SUBCWD/../util/sub_wcoss_d export ACCOUNT=FV3GFS-T2O export QUEUE=dev export QUEUE_TRANS=dev_transfer @@ -418,19 +404,6 @@ cat > read_hpss.sh <>/dev/null - #export machine=$machine - #if [ $machine = WCOSS_C ]; then - # . $MODULESHOME/init/sh 2>>/dev/null - # module load hpss 2>>/dev/null - #elif [ $machine = WCOSS_DELL_P3 ]; then - # . /usrx/local/prod/lmod/lmod/init/sh 2>>/dev/null - # module load HPSS/5.0.2.5 2>>/dev/null - #elif [ $machine = THEIA ]; then - # source $HOMEgfs/sorc/machine-setup.sh 2>>/dev/null - # module use -a /scratch3/NCEPDEV/nwprod/lib/modulefiles 2>>/dev/null - # module load hpss 2>>/dev/null - #fi - cd $INIDIR htar -xvf $HPSSPATH/$tarball_enkf_atm if [ $CDATE -le 2017072000 ] && [ $CDATE -gt 2014050100 ]; then