source: tags/1.0/jobs/job2 @ 5

Last change on this file since 5 was 5, checked in by willem, 9 years ago

willem

File size: 647 bytes
Line 
1#PBS -lnodes=1 -lwalltime=1500
2module load disparm
3root=$HOME/disparm/jobs
4workdir=$root/workdir2
5mkdir -p $workdir
6cd $workdir|| exit
7poolfile=$root/pool2
8ncores=`sara-get-num-cores`
9outdir=$root/outdir2
10mkdir -p $outdir
11for ((i=1; i<=ncores; i++)) ; do
12(
13  while true ; do
14    disparm -n -p $poolfile -m 3
15    if [ "$DISPARM_RC" != "OK" ] ; then
16      break
17    fi
18    outfile=`tempfile`
19    outname=${DISPARM_VALUE// /_}.`basename $outfile`
20    sleep 120
21    eval "echo $DISPARM_VALUE > $outfile"
22    mv $outfile $outdir/$outname
23    date > $outdir/$outname.done
24    disparm -r -p $poolfile
25  done
26  echo DISPARM_RC: $DISPARM_RC
27) &
28done
29wait
30
Note: See TracBrowser for help on using the repository browser.