-
Notifications
You must be signed in to change notification settings - Fork 0
/
qlogin
executable file
·63 lines (60 loc) · 1.25 KB
/
qlogin
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
#!/bin/bash
mem=1gb
user=`whoami`
cpus=1
verbose=0
matlab=""
time='72:00:00'
queue='active'
name='QLOGIN'
x11forward=""
while [ $# != "0" ];
do
if [ "${1:0:6}" == "--mem=" ]
then
mem=${1:6}
elif [ "$1" == "-t" ]
then
shift
time=$1
elif [ "$1" == "-m" ]
then
shift
mem=$1
elif [ "$1" == "-q" ]
then
shift
queue=$1
elif [ "$1" == "-M" ]
then
matlab=":matlab"
elif [ "$1" == "-N" ]
then
shift
name=$1
elif [ "$1" == "-X" ]
then
shift
x11forward="-X"
elif [ "$1" == "-n" ]
then
shift
cpus=$1
elif [ "$1" == "-v" ]
then
verbose=1
elif [ "$1" == "-h" -o "$1" == "--help" ]
then
echo -e "\nThis script is a wrapper for the submission of an interactive login job.\n"
echo "Usage: $0 [-X] [-t <time> ] [-m <mem>] [--mem=<mem>] [-M for matlab] [-n <ncpus>] [-N name] [-q queue] [<additional params in torque format>]"
exit
else
args="$args $1"
fi
shift
done
if [ "$verbose" == "1" ];
then
echo "qsub -I $x11forward -l nodes=1:ppn=$cpus$matlab,walltime=$time,mem=$mem,vmem=$mem,pmem=$mem -N QLOGIN -q $queue $args $@"
fi
qsub -I $x11forward -l nodes=1:ppn=$cpus$matlab,walltime=$time,mem=$mem,vmem=$mem,pmem=$mem -N QLOGIN -q $queue $args $@