#!/bin/ksh -x ########## config.resources ########## # Set resource information for job tasks # e.g. walltime, node, cores per node, memory etc. if [ $# -ne 1 ]; then echo "Must specify an input task argument to set resource variables!" echo "argument can be any one of the following:" echo "anal fcst post vrfy arch" echo "eobs eomg eupd ecen efcs epos earc" echo "postsnd awips gempak" exit 1 fi step=$1 echo "BEGIN: config.resources" if [ $step = "prep" -o $step = "prepbufr" ]; then eval "export wtime_$step='00:45:00'" eval "export npe_$step=4" eval "export npe_node_$step=4" eval "export nth_$step=1" elif [ $step = "anal" ]; then export wtime_anal="02:30:00" export npe_anal=160 export npe_node_anal=2 export nth_anal=12 export nth_cycle=24 if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export nth_anal=14 export nth_cycle=28 fi if [[ "$machine" == "WCOSS_C" ]]; then export memory_anal="3072M" fi elif [ $step = "fcst" ]; then export wtime_fcst="01:00:00" export wtime_fcst_gfs="06:00:00" export npe_fcst=$(echo "$layout_x * $layout_y * 6" | bc) export npe_fcst_gfs=$(echo "$layout_x_gfs * $layout_y_gfs * 6" | bc) export npe_node_fcst=${npe_node_fcst:-12} export nth_fcst=${nth_fv3:-2} if [[ "$machine" == "WCOSS_C" ]]; then export memory_fcst="1024M" fi elif [ $step = "post" ]; then export wtime_post="02:00:00" export wtime_post_gfs="06:00:00" export npe_post=84 export nth_post=1 export npe_node_post=12 export npe_node_dwn=24 if [[ "$machine" == "WCOSS_DELL_P3" ]]; then export npe_node_post=14 export npe_node_dwn=28 fi if [[ "$machine" == "WCOSS_C" ]]; then export memory_post="3072M" fi elif [ $step = "vrfy" ]; then export wtime_vrfy="03:00:00" if [[ "$machine" == "HERA" ]]; then export wtime_vrfy_gfs="08:00:00" else export wtime_vrfy_gfs="06:00:00" fi export npe_vrfy=1 export nth_vrfy=1 export npe_node_vrfy=1 export npe_vrfy_gfs=1 export npe_node_vrfy_gfs=1 if [[ "$machine" == "WCOSS_C" ]]; then export memory_vrfy="3072M" elif [[ "$machine" == "THEIA" ]]; then export memory_vrfy="16384M" fi elif [ $step = "arch" -o $step = "earc" -o $step = "getic" ]; then eval "export wtime_$step='06:00:00'" eval "export npe_$step=1" eval "export npe_node_$step=1" eval "export nth_$step=1" eval "export memory_$step=2048M" elif [ $step = "eobs" -o $step = "eomg" ]; then export wtime_eobs="00:30:00" export wtime_eomg="01:00:00" export npe_eobs=140 export nth_eobs=2 export npe_node_eobs=12 if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export npe_node_eobs=14 fi if [[ "$machine" == "WCOSS_C" ]]; then export memory_eobs="3072M" fi elif [ $step = "eupd" ]; then export wtime_eupd="00:30:00" export npe_eupd=240 export npe_node_eupd=4 export nth_eupd=6 if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export nth_eupd=7 fi if [[ "$machine" == "WCOSS_C" ]]; then export memory_eupd="3072M" fi elif [ $step = "ecen" ]; then export wtime_ecen="01:00:00" export npe_ecen=80 export npe_node_ecen=4 export nth_ecen=6 if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export nth_ecen=7 fi export nth_cycle=$nth_ecen if [[ "$machine" == "WCOSS_C" ]]; then export memory_ecen="3072M" fi elif [ $step = "efcs" ]; then export wtime_efcs="03:00:00" export npe_efcs=$(echo "$layout_x * $layout_y * 6" | bc) export npe_node_efcs=${npe_node_fcst:-12} export nth_efcs=${nth_fv3:-2} if [[ "$machine" == "WCOSS_C" ]]; then export memory_efcs="254M" fi elif [ $step = "epos" ]; then export wtime_epos="02:00:00" export npe_epos=80 export npe_node_epos=4 export nth_epos=6 if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export nth_epos=7 fi if [[ "$machine" == "WCOSS_C" ]]; then export memory_epos="254M" fi elif [ $step = "postsnd" ]; then export wtime_postsnd="02:00:00" export npe_postsnd=12 export nth_postsnd=1 export npe_node_postsnd=3 export npe_postsndcfp=10 export npe_node_postsndcfp=3 if [[ "$machine" == "WCOSS_DELL_P3" ]]; then export npe_node_postsnd=4 export npe_postsndcfp=9 fi if [[ "$machine" == "WCOSS_C" ]]; then export memory_postsnd="254M" fi elif [ $step = "awips" ]; then export wtime_awips="03:30:00" export npe_awips=4 export npe_node_awips=4 export nth_awips=2 if [[ "$machine" == "WCOSS_DELL_P3" ]]; then export npe_awips=2 export npe_node_awips=2 export nth_awips=1 fi if [[ "$machine" == "WCOSS_C" ]]; then export memory_awips="2048M" fi elif [ $step = "gempak" ]; then export wtime_gempak="02:00:00" export npe_gempak=17 export npe_node_gempak=4 export nth_gempak=3 if [[ "$machine" == "WCOSS_C" ]]; then export memory_gempak="254M" fi else echo "Invalid step = $step, ABORT!" exit 2 fi echo "END: config.resources"