[Swift-commit] r5884 - trunk/bin

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Aug 1 14:42:05 CDT 2012


Author: davidk
Date: 2012-08-01 14:42:05 -0500 (Wed, 01 Aug 2012)
New Revision: 5884

Added:
   trunk/bin/slurm-qdel
   trunk/bin/slurm-qstat
   trunk/bin/slurm-qsub
Log:
Adding slurm scripts


Added: trunk/bin/slurm-qdel
===================================================================
--- trunk/bin/slurm-qdel	                        (rev 0)
+++ trunk/bin/slurm-qdel	2012-08-01 19:42:05 UTC (rev 5884)
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+now=$(date "+%Y.%m%d.%H:%M:%S")
+echo $now $0: $* >> $HOME/pbslog
+
+qdel $*
+
+


Property changes on: trunk/bin/slurm-qdel
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/bin/slurm-qstat
===================================================================
--- trunk/bin/slurm-qstat	                        (rev 0)
+++ trunk/bin/slurm-qstat	2012-08-01 19:42:05 UTC (rev 5884)
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+now=$(date "+%Y.%m%d.%H:%M:%S")
+echo $now $0: $* >> $HOME/pbslog
+
+#echo 'Job id              Name             User            Time Use S Queue'
+#echo '------------------- ---------------- --------------- -------- - -----'
+
+#/software/slurm-2.4-el6-x86_64/bin/qstat $* | tail -n +2
+qstat $* | sed -e 's/\t/    /' -e 's/:  */: /'
+
+
+


Property changes on: trunk/bin/slurm-qstat
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/bin/slurm-qsub
===================================================================
--- trunk/bin/slurm-qsub	                        (rev 0)
+++ trunk/bin/slurm-qsub	2012-08-01 19:42:05 UTC (rev 5884)
@@ -0,0 +1,76 @@
+#! /bin/sh
+
+now=$(date "+%Y.%m%d.%H:%M:%S")
+echo $now $0: $* >> $HOME/pbslog
+
+slurmqsub=$( which qsub )
+script=$1.slurm
+echo '#! /bin/sh' >$script
+# echo 'export PBS_NODELIST=SLURM_NODELIST'' >>$script  # FIXME: convert SLURM_NODELIST to PBS_NODEFILE here...
+cat $1 >>$script
+chmod +x $script
+
+srunargs=$(awk <$1 '
+/#PBS -S/ { shell=$3 }
+/#PBS -N/ { jobname=$3 }
+/#PBS -m/ { m = $3 }
+/#PBS -l nodes/ { nodes = $3; ppn=$3;
+                  sub(/nodes=/,"",nodes); sub(/:.*/,"",nodes);
+                  sub(/^.*ppn=/,"",ppn);  }
+/#PBS -l walltime/ { walltime = $3; sub(/walltime=/,"",walltime);}
+/#PBS -q/ { queue = $3 }
+/#PBS -o/ { sofile = $3 }
+/#PBS -e/ { sefile = $3 }
+
+END {
+   #printf("shell=%s jobname=%s m=%s nodespec=%s nodes=%s ppn=%s walltime=%s queue=%s sofile=%s sefile=%s\n",
+   #        shell, jobname, m, nodespec, nodes, ppn, walltime, queue, sofile, sefile);
+   #printf("-p %s -t %s -N %s -D %s -J %s -e %s -o %s", queue, walltime, nodes, "/tmp", jobname, sefile, sofile);
+
+#   printf("-S %s -N %s -m %s -l nodes=%s:ppn=%s -l walltime=%s -q %s -o %s -e %s",
+#            shell, jobname, m, nodes, ppn, walltime, queue, sofile, sefile);
+   printf("-N %s -m %s -l nodes=%s:ppn=%s -l walltime=%s -q %s -o %s -e %s",
+             jobname, m, nodes, ppn, walltime, queue, sofile, sefile);
+
+}')
+
+echo "  " qsub args: $slurmqsub $srunargs $script >>$HOME/pbslog
+job=$($slurmqsub $srunargs $script)
+echo "  " qsub output: $job >>$HOME/pbslog
+
+jid=$(echo $job | sed -e 's/^.* //')
+echo "  " qsub job id: $jid >>$HOME/pbslog
+echo $jid
+
+# srun $srunargs $script
+
+#   cqsub -q ${QUEUE}   \
+#         -k zeptoos    \
+#         -t ${MAXTIME} \ # minutes
+#         -n ${NODES}   \
+#         --cwd ${LOGDIR} \
+#         -E ${LOGDIR}/cobalt.${$}.stderr \
+#         -o ${LOGDIR}/cobalt.${$}.stdout \
+#         -e "WORKER_LOGGING_LEVEL=DEBUG:ZOID_ENABLE_NAT=true" \
+#         $WORKER $EXECUTION_URL $ID $LOG_DIR
+
+# LOGDIR=/tmp/swiftlog
+# 
+#        WORKER_LOGGING_LEVEL=DEBUG srun \
+#          -p ${QUEUE} \
+#          -t ${MAXTIME} \
+#          -N ${NODES}   \
+#          -D ${LOGDIR} \
+#          -J swift-worker \
+#          -e ${LOGDIR}/cobalt.${$}.stderr \
+#          -o ${LOGDIR}/cobalt.${$}.stdout \
+#             $SWIFT_BIN/$WORKER $EXECUTION_URL $ID $LOG_DIR
+
+#PBS -S /bin/bash
+#PBS -N cog-000000
+#PBS -m n
+#PBS -l nodes=1:ppn=1
+#PBS -l walltime=00:05:00
+#PBS -q sandyb
+#PBS -o /home/wilde/.globus/scripts/PBS4051523028032512638.submit.stdout
+#PBS -e /home/wilde/.globus/scripts/PBS4051523028032512638.submit.stderr


Property changes on: trunk/bin/slurm-qsub
___________________________________________________________________
Added: svn:executable
   + *




More information about the Swift-commit mailing list