From 0be5e8bc722b43eb3037e68f8fd6a8602f2bedef Mon Sep 17 00:00:00 2001 From: GeorgeGayno-NOAA <52789452+GeorgeGayno-NOAA@users.noreply.github.com> Date: Fri, 16 Apr 2021 11:07:02 -0400 Subject: [PATCH] Removed unused submission scripts. (#437) These scripts are no longer used by NCEP workflows. Fixes #266. --- util/sub_slurm | 144 ------------------------ util/sub_wcoss_c | 277 ----------------------------------------------- util/sub_wcoss_d | 247 ------------------------------------------ 3 files changed, 668 deletions(-) delete mode 100755 util/sub_slurm delete mode 100755 util/sub_wcoss_c delete mode 100755 util/sub_wcoss_d diff --git a/util/sub_slurm b/util/sub_slurm deleted file mode 100755 index 97e70c9e2..000000000 --- a/util/sub_slurm +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/ksh -set -x -usage="\ -Usage: $0 [options] executable [args] - where the options are: - -a account account (default: none) - -b binding run smt binding or not (default:NO) - -d dirin initial directory (default: cwd) - -e envars copy comma-separated environment variables - -g group group name - -i append standard input to command file - -j jobname specify jobname (default: executable basename) - -m machine machine on which to run (default: current) - -n write command file to stdout rather than submitting it - -o output specify output file (default: jobname.out) - -p procs[/nodes[/ppreq] - number of MPI tasks and optional nodes or Bblocking and - ppreq option (N or S) (defaults: serial, Bunlimited, S) - -q queue[/qpreq] queue name and optional requirement, e.g. dev/P - (defaults: 1 if serial or dev if parallel and none) - (queue 3 or 4 is dev or prod with twice tasks over ip) - (options: P=parallel, B=bigmem, b=batch) - -r rmem[/rcpu] resources memory and cpus/task (default: '1024 mb', 1) - -t timew wall time limit in [[hh:]mm:]ss format (default: 900) - -u userid userid to run under (default: self) - -v verbose mode - -w when when to run, in yyyymmddhh[mm], +hh[mm], thh[mm], or - Thh[mm] (full, incremental, today or tomorrow) format - (default: now) -Function: This command submits a job to the batch queue." -subcmd="$*" -stdin=NO -nosub=NO -account="" -binding="NO" -dirin="" -envars="para" -group="" -jobname="" -machine="" -output="" -procs=0 -nodes="" -ppreq="N" -queue="" -qpreq="" -rmem="1200" -rcpu="1" -timew="900" -userid="" -verbose=NO -when="" -while getopts a:b:d:e:g:ij:m:no:p:q:r:t:u:vw: opt;do - case $opt in - a) account="$OPTARG";; - b) binding="$OPTARG";; - d) dirin="$OPTARG";; - e) envars="$OPTARG";; - g) group="$OPTARG";; - i) stdin=YES;; - j) jobname=$OPTARG;; - m) machine="$OPTARG";; - n) nosub=YES;; - o) output=$OPTARG;; - p) procs=$(echo $OPTARG/|cut -d/ -f1);nodes=$(echo $OPTARG/|cut -d/ -f2);ppreq=$(echo $OPTARG/|cut -d/ -f3);; - q) queue=$(echo $OPTARG/|cut -d/ -f1);qpreq=$(echo $OPTARG/|cut -d/ -f2);; - r) rmem=$(echo $OPTARG/|cut -d/ -f1);rcpu=$(echo $OPTARG/|cut -d/ -f2);; - t) timew=$OPTARG;; - u) userid=$OPTARG;; - v) verbose=YES;; - w) when=$OPTARG;; - \?) echo $0: invalid option >&2;echo "$usage" >&2;exit 1;; - esac -done -shift $(($OPTIND-1)) -if [[ $# -eq 0 ]];then - echo $0: missing executable name >&2;echo "$usage" >&2;exit 1 -fi -exec=$1 -if [[ ! -s $exec ]]&&which $exec >/dev/null 2>&1;then - exec=$(which $exec) -fi -shift -args="$*" -bn=$(basename $exec) -jobname=${jobname:-$bn} -output=${output:-$jobname.out} -myuser=$LOGNAME -myhost=$(hostname) - -DATA=${DATA:-/scratch4/NCEPDEV/stmp4/$LOGNAME/sub} -mkdir -p $DATA - -partition=${partition:-service} -queue=${queue:-batch} -timew=${timew:-01:20:00} -task_node=${procs:-12} -ntasks=$((nodes*task_node)) -envars=$envars - -#export TZ=GMT -export TZ="America/New_York" -cfile=$DATA/sub$$ -> $cfile -echo "#!/bin/ksh " >> $cfile -echo "#SBATCH -A $account" >> $cfile -echo "#SBATCH -o $output" >> $cfile -echo "#SBATCH -e $output" >> $cfile -echo "#SBATCH -J $jobname" >> $cfile -echo "#SBATCH -q $queue" >> $cfile -echo "#SBATCH -p $partition" >> $cfile -##echo "#SBATCH -v $envars" >> $cfile -echo "#SBATCH --nodes=$nodes --ntasks=$ntasks" >> $cfile -echo "#SBATCH -t $timew" >> $cfile -echo "/bin/ksh --login -x $exec $args" >> $cfile - -if [[ $stdin = YES ]];then - cat -fi >>$cfile -if [[ $nosub = YES ]];then - cat $cfile - exit -elif [[ $verbose = YES ]];then - set -x - cat $cfile -fi - -sbatch=${sbatch:-/apps/slurm/default/bin/sbatch} - -ofile=$DATA/subout$$ ->$ofile -chmod 777 $ofile -$sbatch $cfile >$ofile -rc=$? -cat $ofile -if [[ -w $SUBLOG ]];then - jobn=$(grep -i submitted $ofile|head -n1|cut -d\" -f2) -# date -u +"%Y%m%d%H%M%S : $subcmd : $jobn" >>$SUBLOG - date +"%Y%m%d%H%M%S : $subcmd : $jobn" >>$SUBLOG -fi -#exit -#rm $cfile $ofile -[[ $MKDATA = YES ]] && rmdir $DATA -exit $rc diff --git a/util/sub_wcoss_c b/util/sub_wcoss_c deleted file mode 100755 index 7bfaeeab7..000000000 --- a/util/sub_wcoss_c +++ /dev/null @@ -1,277 +0,0 @@ -#!/bin/ksh -set -x -# -# May 28, 2013 - Shrinivas Moorthi :now updated for lsf9.1.1 - should handle coupled case also -# -usage="\ -Usage: $0 [options] executable [args] - where the options are: - -a account account (default: none) - -b binding run smt binding or not (default:NO) - -d dirin initial directory (default: cwd) - -e envars copy comma-separated environment variables - -g group group name - -i append standard input to command file - -j jobname specify jobname (default: executable basename) -# -m machine machine on which to run (default: current) - -m mpiver mpi version (poe or intelmpi) (default: poe) - -n write command file to stdout rather than submitting it - -o output specify output file (default: jobname.out) - -p procs[/nodes[/ppreq] - number of MPI tasks and optional nodes or Bblocking and - ppreq option (N or S) (defaults: serial, Bunlimited, S) - -q queue[/qpreq] queue name and optional requirement, e.g. dev/P - (defaults: 1 if serial or dev if parallel and none) - (queue 3 or 4 is dev or prod with twice tasks over ip) - (options: P=parallel, B=bigmem, b=batch) - -r rmem[/rcpu[/pe_node] resources memory and cpus/task and cores per node (default: '1024 mb', 1, and 16) - -t timew wall time limit in [[hh:]mm:]ss format (default: 900) - -u userid userid to run under (default: self) - -v verbose mode - -w when when to run, in yyyymmddhh[mm], +hh[mm], thh[mm], or - Thh[mm] (full, incremental, today or tomorrow) format - (default: now) - - You can also export variables and - \"INHERIT_ENV\" (default:-\"YES\") - Set this variable to \"NO\" and - export it if you do not want the next job to inherit current job - environment. - - Other environmental variables which can be exported from outside are: - - \"KMP_STACKSIZE\" (default:-\"1024m\") - \"MP_EUIDEVELOP\" (default:-\"NULL\") - \"F_UFMTENDIAN\" (default:-\"NULL\") - \"MPICH_ALLTOALL_THROTTLE\" (default:-\"NULL\") - \"MP_SINGLE_THREAD\" (default:-\"NULL\") - \"MP_EAGER_LIMIT\" (default:-\"NULL\") - \"MP_USE_BULK_XFER\" (default:-\"NULL\") - \"MP_COLLECTIVE_OFFLOAD\" (default:-\"NULL\") - \"MP_SHARED_MEMORY\" (default:-\"NULL\") - \"MP_MPILIB\" (default:-\"NULL\") - \"MP_LABELIO\" (default:-\"NULL\") - \"MP_STDOUTMODE\" (default:-\"NULL\") - \"DATA\" (default:-\"/stmp/$LOGNAME/sub\" - - deleted at the end if created) - -Function: This command submits a job to the batch queue." -subcmd="$*" -stdin=NO -nosub=NO -account="" -binding="NO" -dirin="" -envars="" -group="" -jobname="" -#machine="" -mpiver="" -output="" -procs=0 -nodes="" -ppreq="NONE" -queue="" -qpreq="" -rmem="1024" -rcpu="1" -pe_node=${pe_node:-16} -timew="900" -userid="" -verbose=NO -when="" -while getopts a:b:d:e:g:ij:m:no:p:q:r:t:u:vw: opt;do - case $opt in - a) account="$OPTARG";; - b) binding="$OPTARG";; - d) dirin="$OPTARG";; - e) envars="$OPTARG";; - g) group="$OPTARG";; - i) stdin=YES;; - j) jobname=$OPTARG;; -# m) machine="$OPTARG";; - m) mpiver="$OPTARG";; - n) nosub=YES;; - o) output=$OPTARG;; - p) procs=$(echo $OPTARG/|cut -d/ -f1);nodes=$(echo $OPTARG/|cut -d/ -f2);ppreq=$(echo $OPTARG/|cut -d/ -f3);; - q) queue=$(echo $OPTARG/|cut -d/ -f1);qpreq=$(echo $OPTARG/|cut -d/ -f2);; - r) rmem=$(echo $OPTARG/|cut -d/ -f1);rcpu=$(echo $OPTARG/|cut -d/ -f2);pe_node=$(echo $OPTARG/|cut -d/ -f3);; - t) timew=$OPTARG;; - u) userid=$OPTARG;; - v) verbose=YES;; - w) when=$OPTARG;; - \?) echo $0: invalid option >&2;echo "$usage" >&2;exit 1;; - esac -done -shift $(($OPTIND-1)) -if [[ $# -eq 0 ]];then - echo $0: missing executable name >&2;echo "$usage" >&2;exit 1 -fi -exec=$1 -if [[ ! -s $exec ]]&&which $exec >/dev/null 2>&1;then - exec=$(which $exec) -fi -shift -args="$*" -bn=$(basename $exec) -jobname=${jobname:-$bn} -#machine=${machine:-""} -output=${output:-$jobname.out} -myuser=$LOGNAME -myhost=$(hostname) -#mpiver=${mpiver:-poe} -envars=$envars - -#DATA=/lustre/fs/scratch/$LOGNAME/stmp -NDATE=${NDATE:-/gpfs/hps/nco/ops/nwprod/prod_util.v1.0.5/exec/ndate} -pext=${pext:-""} -#PTMP=${PREPTMP:-""}/ptmp${pext:-""} -PTMP=${PTMP:-/gpfs/hps/ptmp} -DATA=${DATA:-$PTMP/$LOGNAME/sub} -if [ -s $DATA ] ; then - MKDATA=NO -else - mkdir -p $DATA - MKDATA=YES -fi -dirin=${dirin:-$(pwd)} - -queue=${queue:-dev} -timew=${timew:-01:20} -timew=$(echo $timew |cut -d: -f1):$(echo $timew |cut -d: -f2) -threads=${rcpu:-1} -nthreads=$threads - - -max_core=${max_core:-24} -task_node=${pe_node:-${task_node:-$max_core}} - -export INHERIT_ENV=${INHERIT_ENV:-YES} -if [ $nodes -eq 1 ] ; then - task_node=$procs -fi -tot_size=$procs -max_tasks=$((max_core*nodes)) -#tot_size=$procs -if [ $((task_node*threads)) -gt $max_core ]; then - core_typ=cpu - nthreads=$threads - threads=$((2*max_core/task_node)) - echo "Hyper-threading is used - setting core_typ=$corei_typ" -fi -export core_typ=${core_typ:-core} - -export OMP_STACKSIZE=${OMP_STACKSIZE:-1024m} -export KMP_AFFINITY=${KMP_AFFINITY:-disabled} - -export TZ=GMT -cfile=$DATA/sub$$ -> $cfile - -if [ $INHERIT_ENV = YES ] ; then - echo "#!/bin/ksh" >> $cfile -else - echo "#!/bin/sh --login" >> $cfile - echo "#BSUB -L /bin/sh" >> $cfile -fi -echo "#BSUB -P $account" >> $cfile -echo "#BSUB -e $output" >> $cfile -echo "#BSUB -o $output" >> $cfile -echo "#BSUB -J $jobname" >> $cfile -#echo "#BSUB -network type=sn_all:mode=US" >> $cfile -echo "#BSUB -q $queue" >> $cfile -echo "#BSUB -W $timew" >> $cfile -##echo "#BSUB -cwd $dirin" >> $cfile -#echo "#BSUB -n $tot_size" >> $cfile -if [ $queue = dev_transfer ] ; then - echo "#BSUB -R rusage[mem=$rmem]" >> $cfile -fi -if [ $queue != dev_transfer ] ; then - echo "#BSUB -M $rmem" >> $cfile - echo "#BSUB -extsched 'CRAYLINUX[]' -R '1*{select[craylinux && !vnode]} + $max_tasks*{select[craylinux && vnode]span[ptile=24] cu[type=cabinet]}'" >> $cfile -fi - -if [[ -n $when ]];then - whena=$when - if [[ $when = +* ]];then - hr=$(echo $when|cut -c2-3) - mn=$(echo $when|cut -c4-5) - [[ -n $mn ]] || mn=00 - now=$(date -u +"%Y%m%d%H%M") - ((mn+=$(echo $now|cut -c11-12))) - [[ $mn -ge 60 ]] && ((hr+=1)) && ((mn-=60)) - [[ $mn -lt 10 ]] && mn=0$mn - whena=$($NDATE +$hr $(echo $now|cut -c1-10))$mn - elif [[ $when = t* ]];then - hr=$(echo $when|cut -c2-3) - mn=$(echo $when|cut -c4-5) - [[ -n $mn ]] || mn=00 - now=$(date -u +"%Y%m%d") - whena=$now$hr$mn - elif [[ $when = T* ]];then - hr=$(echo $when|cut -c2-3) - mn=$(echo $when|cut -c4-5) - [[ -n $mn ]] || mn=00 - now=$(date -u +"%Y%m%d%H") - whena=$($NDATE +24 $now|cut -c1-8)$hr$mn - fi - yr=$(echo $whena|cut -c1-4) - mo=$(echo $whena|cut -c5-6) - dy=$(echo $whena|cut -c7-8) - hr=$(echo $whena|cut -c9-10) - mn=$(echo $whena|cut -c11-12) - [[ -n $mn ]] || mn=00 - echo "#BSUB -b $yr:$mo:$dy:$hr:$mn" >> $cfile -fi - -#echo "source ~${LOGNAME}/.profile" >> $cfile -#echo "ulimit -s unlimited" >> $cfile -#if [ ${MP_EUIDEVICE:-NULL} = sn_all ] ; then -#echo "#BSUB -network \"type=sn_all:mode=US\" " >> $cfile -#fi -#if [ ${MP_EULIB:-NULL} != NULL ] ; then -#echo "export MP_EUILIB=$MP_EUILIB" >> $cfile -#fi - -if [ ${KMP_AFFINITY:-NULL} != NULL ] ; then - echo "export KMP_AFFINITY=$KMP_AFFINITY" >> $cfile -fi - -echo "export OMP_STACKSIZE=$OMP_STACKSIZE" >> $cfile - -if [ ${MP_LABELIO:-NULL} != NULL ] ; then - echo "export MP_LABELIO=$MP_LABELIO" >> $cfile -fi -if [ ${MP_STDOUTMODE:-NULL} != NULL ] ; then - echo "export MP_STDOUTMODE=$MP_STDOUTMODE " >> $cfile -fi -for var in $(eval echo $envars | tr , ' ') ; do - echo "export $var" >> $cfile -done -echo "$exec" >> $cfile -echo "export OMP_NUM_THREADS=$nthreads" >> $cfile - -if [[ $stdin = YES ]];then - cat -fi >>$cfile -if [[ $nosub = YES ]];then - cat $cfile - exit -elif [[ $verbose = YES ]];then - set -x - cat $cfile -fi -bsub=${bsub:-$LSF_BINDIR/bsub} - -ofile=$DATA/subout$$ ->$ofile -chmod 777 $ofile -$bsub < $cfile -rc=$? -cat $ofile -if [[ -w $SUBLOG ]];then - jobn=$(grep -i submitted $ofile|head -n1|cut -d\" -f2) - date +"%Y%m%d%H%M%S : $subcmd : $jobn" >>$SUBLOG -fi -#rm $cfile $ofile -#[[ $MKDATA = YES ]] && rmdir $DATA -exit $rc diff --git a/util/sub_wcoss_d b/util/sub_wcoss_d deleted file mode 100755 index 77f0e4da8..000000000 --- a/util/sub_wcoss_d +++ /dev/null @@ -1,247 +0,0 @@ -#!/bin/ksh -set -x -# -# May 28, 2013 - Shrinivas Moorthi :now updated for lsf9.1.1 - should handle coupled case also -# -usage="\ -Usage: $0 [options] executable [args] - where the options are: - -a account account (default: none) - -b binding run smt binding or not (default:NO) - -d dirin initial directory (default: cwd) - -e envars copy comma-separated environment variables - -g group group name - -i append standard input to command file - -j jobname specify jobname (default: executable basename) -# -m machine machine on which to run (default: current) - -m mpiver mpi version (poe or intelmpi) (default: poe) - -n write command file to stdout rather than submitting it - -o output specify output file (default: jobname.out) - -p procs[/nodes[/ppreq] - number of MPI tasks and optional nodes or Bblocking and - ppreq option (N or S) (defaults: serial, Bunlimited, S) - -q queue[/qpreq] queue name and optional requirement, e.g. dev/P - (defaults: 1 if serial or dev if parallel and none) - (queue 3 or 4 is dev or prod with twice tasks over ip) - (options: P=parallel, B=bigmem, b=batch) - -r rmem[/rcpu[/pe_node] resources memory and cpus/task and cores per node (default: '1024 mb', 1, and 16) - -t timew wall time limit in [[hh:]mm:]ss format (default: 900) - -u userid userid to run under (default: self) - -v verbose mode - -w when when to run, in yyyymmddhh[mm], +hh[mm], thh[mm], or - Thh[mm] (full, incremental, today or tomorrow) format - (default: now) - - You can also export variables and - \"INHERIT_ENV\" (default:-\"YES\") - Set this variable to \"NO\" and - export it if you do not want the next job to inherit current job - environment. - - Other environmental variables which can be exported from outside are: - - \"KMP_STACKSIZE\" (default:-\"1024m\") - \"MP_EUIDEVELOP\" (default:-\"NULL\") - \"F_UFMTENDIAN\" (default:-\"NULL\") - \"MPICH_ALLTOALL_THROTTLE\" (default:-\"NULL\") - \"MP_SINGLE_THREAD\" (default:-\"NULL\") - \"MP_EAGER_LIMIT\" (default:-\"NULL\") - \"MP_USE_BULK_XFER\" (default:-\"NULL\") - \"MP_COLLECTIVE_OFFLOAD\" (default:-\"NULL\") - \"MP_SHARED_MEMORY\" (default:-\"NULL\") - \"MP_MPILIB\" (default:-\"NULL\") - \"MP_LABELIO\" (default:-\"NULL\") - \"MP_STDOUTMODE\" (default:-\"NULL\") - \"DATA\" (default:-\"/stmp/$LOGNAME/sub\" - - deleted at the end if created) - -Function: This command submits a job to the batch queue." -subcmd="$*" -stdin=NO -nosub=NO -account="" -binding="NO" -dirin="" -envars="" -group="" -jobname="" -#machine="" -mpiver="" -output="" -procs=0 -nodes="" -ppreq="NONE" -queue="" -qpreq="" -rmem="1024" -rcpu="1" -pe_node=${pe_node:-16} -timew="900" -userid="" -verbose=NO -when="" -while getopts a:b:d:e:g:ij:m:no:p:q:r:t:u:vw: opt;do - case $opt in - a) account="$OPTARG";; - b) binding="$OPTARG";; - d) dirin="$OPTARG";; - e) envars="$OPTARG";; - g) group="$OPTARG";; - i) stdin=YES;; - j) jobname=$OPTARG;; - m) mpiver="$OPTARG";; - n) nosub=YES;; - o) output=$OPTARG;; - p) procs=$(echo $OPTARG/|cut -d/ -f1);nodes=$(echo $OPTARG/|cut -d/ -f2);ppreq=$(echo $OPTARG/|cut -d/ -f3);; - q) queue=$(echo $OPTARG/|cut -d/ -f1);qpreq=$(echo $OPTARG/|cut -d/ -f2);; - r) rmem=$(echo $OPTARG/|cut -d/ -f1);rcpu=$(echo $OPTARG/|cut -d/ -f2);pe_node=$(echo $OPTARG/|cut -d/ -f3);; - t) timew=$OPTARG;; - u) userid=$OPTARG;; - v) verbose=YES;; - w) when=$OPTARG;; - \?) echo $0: invalid option >&2;echo "$usage" >&2;exit 1;; - esac -done -shift $(($OPTIND-1)) -if [[ $# -eq 0 ]];then - echo $0: missing executable name >&2;echo "$usage" >&2;exit 1 -fi -exec=$1 -if [[ ! -s $exec ]]&&which $exec >/dev/null 2>&1;then - exec=$(which $exec) -fi -shift -args="$*" -bn=$(basename $exec) -jobname=${jobname:-$bn} -#machine=${machine:-""} -output=${output:-$jobname.out} -myuser=$LOGNAME -myhost=$(hostname) -envars=$envars - -#DATA=/lustre/fs/scratch/$LOGNAME/stmp -NDATE=${NDATE:-/gpfs/hps/nco/ops/nwprod/prod_util.v1.0.5/exec/ndate} -pext=${pext:-""} -PTMP=/gpfs/dell2/ptmp -DATA=${DATA:-$PTMP/$LOGNAME/sub} -if [ -s $DATA ] ; then - MKDATA=NO -else - mkdir -p $DATA - MKDATA=YES -fi -dirin=${dirin:-$(pwd)} - -queue=${queue:-dev} -timew=${timew:-01:20} -timew=$(echo $timew |cut -d: -f1):$(echo $timew |cut -d: -f2) -threads=${rcpu:-1} -nthreads=$threads - -max_core=${max_core:-28} -task_node=${pe_node:-${task_node:-$max_core}} - -export INHERIT_ENV=${INHERIT_ENV:-YES} -if [ $nodes -eq 1 ] ; then - task_node=$procs -fi -tot_size=$procs -max_tasks=$((max_core*nodes)) -if [ $((task_node*threads)) -gt $max_core ]; then - core_typ=cpu - nthreads=$threads - threads=$((2*max_core/task_node)) - echo "Hyper-threading is used - setting core_typ=$corei_typ" -fi -core_typ=${core_typ:-core} - -export OMP_STACKSIZE=${OMP_STACKSIZE:-1024m} -export KMP_AFFINITY=${KMP_AFFINITY:-disabled} - -export TZ=GMT -cfile=$DATA/sub$$ -> $cfile - -echo "#!/bin/bash" >> $cfile -echo "#BSUB -P $account" >> $cfile -echo "#BSUB -e $output" >> $cfile -echo "#BSUB -o $output" >> $cfile -echo "#BSUB -J $jobname" >> $cfile -echo "#BSUB -q $queue" >> $cfile -echo "#BSUB -W $timew" >> $cfile -echo "#BSUB -n $tot_size" >> $cfile -echo "#BSUB -R span[ptile=$task_node]" >> $cfile -echo "#BSUB -R affinity[core($nthreads)]" >> $cfile -echo "#BSUB -M $rmem" >> $cfile - - -if [[ -n $when ]];then - whena=$when - if [[ $when = +* ]];then - hr=$(echo $when|cut -c2-3) - mn=$(echo $when|cut -c4-5) - [[ -n $mn ]] || mn=00 - now=$(date -u +"%Y%m%d%H%M") - ((mn+=$(echo $now|cut -c11-12))) - [[ $mn -ge 60 ]] && ((hr+=1)) && ((mn-=60)) - [[ $mn -lt 10 ]] && mn=0$mn - whena=$($NDATE +$hr $(echo $now|cut -c1-10))$mn - elif [[ $when = t* ]];then - hr=$(echo $when|cut -c2-3) - mn=$(echo $when|cut -c4-5) - [[ -n $mn ]] || mn=00 - now=$(date -u +"%Y%m%d") - whena=$now$hr$mn - elif [[ $when = T* ]];then - hr=$(echo $when|cut -c2-3) - mn=$(echo $when|cut -c4-5) - [[ -n $mn ]] || mn=00 - now=$(date -u +"%Y%m%d%H") - whena=$($NDATE +24 $now|cut -c1-8)$hr$mn - fi - yr=$(echo $whena|cut -c1-4) - mo=$(echo $whena|cut -c5-6) - dy=$(echo $whena|cut -c7-8) - hr=$(echo $whena|cut -c9-10) - mn=$(echo $whena|cut -c11-12) - [[ -n $mn ]] || mn=00 - echo "#BSUB -b $yr:$mo:$dy:$hr:$mn" >> $cfile -fi - -if [ ${KMP_AFFINITY:-NULL} != NULL ] ; then - echo "export KMP_AFFINITY=$KMP_AFFINITY" >> $cfile -fi -echo "export OMP_STACKSIZE=$OMP_STACKSIZE" >> $cfile - - -for var in $(eval echo $envars | tr , ' ') ; do - echo "export $var" >> $cfile -done -echo "$exec" >> $cfile -echo "export OMP_NUM_THREADS=$nthreads" >> $cfile - -if [[ $stdin = YES ]];then - cat -fi >>$cfile -if [[ $nosub = YES ]];then - cat $cfile - exit -elif [[ $verbose = YES ]];then - set -x - cat $cfile -fi -bsub=${bsub:-$LSF_BINDIR/bsub} - -ofile=$DATA/subout$$ ->$ofile -chmod 777 $ofile -$bsub < $cfile -rc=$? -cat $ofile -if [[ -w $SUBLOG ]];then - jobn=$(grep -i submitted $ofile|head -n1|cut -d\" -f2) - date +"%Y%m%d%H%M%S : $subcmd : $jobn" >>$SUBLOG -fi -##rm $cfile $ofile -#[[ $MKDATA = YES ]] && rmdir $DATA -exit $rc