-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathruntest
executable file
·51 lines (45 loc) · 1.09 KB
/
runtest
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
#!/bin/bash
if [ $1 == "clean" ]
then
for i in *.inp
do
if [ -e ${i%.inp}.dat ]; then rm ${i%.inp}.dat ;fi
if [ -e ${i%.inp}.gamess ];then rm ${i%.inp}.gamess;fi
if [ -e ${i%.inp}.trj ]; then rm ${i%.inp}.trj ;fi
if [ -e ${i%.inp}.ccrest ];then rm ${i%.inp}.ccrest;fi
if [ -e ${i%.inp}.*vec* ]; then rm ${i%.inp}.*vec* ;fi
if [ -e ${i%.inp}.rst ]; then rm ${i%.inp}.rst ;fi
done
exit
fi
if [ -z $2 ]
then
echo "Usage: runtest /path/to/rungms version [ncpu] [ppn]"
echo " Caution: some of these examples are serial only!"
exit
fi
RUNGMS=$1
version=$2
if [ -z $3 ]
then
cpu=1
else
cpu=$3
if [ -z $4 ]
then
ppn=$3
else
ppn=$4
fi
fi
for i in *.inp
do
if [ -e ${i%.inp}.dat ]; then rm ${i%.inp}.dat ;fi
if [ -e ${i%.inp}.gamess ];then rm ${i%.inp}.gamess;fi
if [ -e ${i%.inp}.trj ]; then rm ${i%.inp}.trj ;fi
if [ -e ${i%.inp}.ccrest ];then rm ${i%.inp}.ccrest;fi
if [ -e ${i%.inp}.*vec* ]; then rm ${i%.inp}.*vec* ;fi
if [ -e ${i%.inp}.rst ]; then rm ${i%.inp}.rst ;fi
echo "--- $i ---"
$RUNGMS ${i%.inp} $version $cpu $ppn > ${i%.inp}.gamess 2>&1
done