#PBS -N runtime_stat_pdym1_%ECF_ENVIR%_%TIME%
#PBS -j oe
#PBS -S /bin/bash
#PBS -q %QUEUE%
#PBS -l walltime=12:00:00
#PBS -A %PROJ%-%PROJENVIR%
#PBS -l select=1:ncpus=14:mem=2500MB 

model=runtime
%include <head.h>
%include <envir-p1.h>

set -x

module load PrgEnv-intel/${PrgEnv_intel_ver}
module load craype/${craype_ver}
module load intel/${intel_ver}
module load python/${python_ver}
module load cray-mpich/${cray_mpich_ver}
module load cray-pals/${cray_pals_ver}
module load cfp/${cfp_ver}    ###   2.0.1
module list

# EXPORT list here
set -x
if [ -n "%PDY:%" ]; then 
  export PDY=%PDY:%;
else
  export PDY=`$NDATE -24 |cut -c 1-8`;
fi
export cyc=`date -u +%%H`
export job=runtime_stat_pdym1
export SENDEMAIL=%SENDEMAIL:%
export time_tag=`date -u +%%H%%M`
export ecf_envir=%ECF_ENVIR:%

if [ -n "%TIME_THRESHOLD:%" ]; then export TIME_THRESHOLD=%TIME_THRESHOLD:% ; fi
if [ -n "%PCNT_THRESHOLD:%" ]; then export PCNT_THRESHOLD=%PCNT_THRESHOLD:% ; fi
if [ -n "%PCNT_THRESHOLD2:%" ]; then export PCNT_THRESHOLD2=%PCNT_THRESHOLD2:% ; fi

${HOMEruntime}/jobs/JRUNTIME_STAT_POE

%include <tail.h>
%manual
######################################################################
# Purpose: This job gathers tracker statistics for all jobs submitted
#          from the production ECFLOW.  The processing runs on the IBM-SP.
######################################################################

######################################################################
# Job specific troubleshooting instructions:
#  see generic troubleshoot manual page
#
######################################################################

# incluse manual page below
%end