-
Notifications
You must be signed in to change notification settings - Fork 3
/
b_diag.sh
75 lines (48 loc) · 1.46 KB
/
b_diag.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash -l
#
# Check if our working directory is on the central file server
#
#export verbose
#cd /shared/scratch/ucapsyu/production/
export exec="diag_pdsyev_darwin.x"
export pwd=`pwd`
echo $pwd
export name=`echo $1 | sed -e 's/\.inp//'`
echo $name
export JOB=$3
echo $JOB
export dir1=`pwd | awk -F/ '{print $2}'`
if [ -e "$name.o" ]; then
/bin/rm $name.o
fi
if [ -e "$name.e" ]; then
/bin/rm $name.e
fi
if [ -e "$name.out" ]; then
if [ -e "$name.tmp" ]; then
/bin/rm $name.tmp
fi
/bin/mv $name.out $name.tmp
fi
export PARNODES=$2
export dmem=`expr $2 \* 63900`
export ntasks=`expr $PARNODES \* 16`
export nprocs=$ntasks
echo "Nnodes=" $PARNODES, "Nprocs=" $nprocs
export MEM=`echo $nprocs $dmem | awk '{printf( "%8.0f\n", $2*$1 )}'`
export jobtype="small2"
export wclim=12
if [ $nprocs -lt "8" ]; then
export jobtype=""
fi
export wclim=$3
#wclim=1
echo "Nnodes=" $PARNODES, "Nprocs=" $nprocs, " Memory = " $dmem, "jobtype = sandybridge", "wclimit = " $wclim
echo "Working dir is " $pwd
#msub -N $name -j oe -e $name.e -q $jobtype -l "walltime=$wclim:00:00,pmem=${dmem}mb,nodes=$PARNODES:ppn=8" \
# -v "setenv name $name,setenv pwd $pwd" \
# -v "setenv nprocs $nprocs" \
# $pwd/run_pdiag.sh
sbatch -A DIRAC-dp060 --nodes=$PARNODES --ntasks=$nprocs --time=$wclim:00:00 -J $name -o $name.o -e $name.e \
--workdir=$pwd --hint=compute_bound --no-requeue -p sandybridge \
$pwd/sub_script.csh $nprocs $name $exec $pwd