-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrungms
executable file
·384 lines (362 loc) · 11.3 KB
/
rungms
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
#!/bin/bash
# Modified by T.Y. to make it more usable.
# Usage : "rungms <jobname.inp> [jobname2.inp, jobname3.inp...] "
# Does not allow for $GDDI input group to be used.
# Set some variables
GMSPATH=/home/tris/src/gamess
SCR=/home/tris/scratch
NCPUS=1
TARGET=sockets
# Parse options
while getopts "n:" options
do
case $options in
n ) NCPUS=$OPTARG
shift $((OPTIND-1))
echo "Number of processors to use : $NCPUS";;
\? ) echo "Error: Unrecognised switch '$options'"
exit 1;;
esac
done
if [ $# -lt "1" ]
then
echo "No input file(s) specified!"
exit 1
fi
#echo "$# filenames have been supplied."
# Set some default 'Linux' values
# limit stacksize 131072
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH":/opt/intel/mkl/10.0.1.014/lib/em64t:/opt/intel/fce/10.1.011/lib"
export MKL_SERIAL=YES
export DDI_RSH=ssh
# Create a hostfile and get NCPUS and NNODES from the queue hostfile
# On Torque/Maui the node list is given in $PBS_NODEFILE, with hosts given
# individually one per line. Dual CPU nodes appear twice!
# We will assume that only an even number of processors (or one) has been
# requested.
HOSTLIST=""
NNODES=0
#elif [ ${HOSTNAME:0:1} == 'n' ]; then
# for node in `echo $LSB_HOSTS | sed "s/ /\n/g" | sort -u`;
# do XCPUS=`echo $LSB_HOSTS | sed "s/ /\n/g" | grep -c $node`;
# #XCPUS=1
# HOSTLIST=$node:cpus=$XCPUS" "$HOSTLIST;
# # Increase node and cpu count
# let NNODES=NNODES+1
# let NCPUS=NCPUS+$XCPUS
# done
#else
#for node in `sort -u $PBS_NODEFILE`;
# do XCPUS=`grep -c $node $PBS_NODEFILE`;
# HOSTLIST=$node:cpus=$XCPUS" "$HOSTLIST;
# # Increase node and cpu count
# let NNODES=NNODES+1
# let NCPUS=NCPUS+$XCPUS
# done
#fi
NNODES=1
HOSTLIST="axolotl:cpus=$NCPUS"
echo "Job requested "$NCPUS" cpus over "$NNODES" nodes."
echo "Host list: "$HOSTLIST
echo "Job started at `date`"
echo "Scratch dir is : "$SCR
echo "Available scratch disk space (Kbyte units) at beginning of the job is:"
df -k $SCR
#
# MAIN LOOP TO RUN JOBS BEGINS HERE
#
echo $#
while (( "$#" ))
do
JOB=$1
echo "Moving to job..."$JOB
JOB=${JOB%.inp}
cp $JOB.inp $SCR/$JOB.F05
# Set environment locations to GAMESS files. Not archaic at *all*.
# three ASCII input files (see explanation above)
export AUXDATA=$GMSPATH/auxdata
export EXTBAS=/dev/null
export NUCBAS=/dev/null
export POSBAS=/dev/null
#
export ERICFMT=$AUXDATA/ericfmt.dat
export MCPPATH=$AUXDATA/MCP
export BASPATH=$AUXDATA/BASES
export QUANPOL=$AUXDATA/QUANPOL
export MAKEFP=$SCR/$JOB.efp
export GAMMA=$SCR/$JOB.gamma
export TRAJECT=$SCR/$JOB.trj
export RESTART=$SCR/$JOB.rst
export INPUT=$SCR/$JOB.F05
export PUNCH=$SCR/$JOB.dat
export AOINTS=$SCR/$JOB.F08
export MOINTS=$SCR/$JOB.F09
export DICTNRY=$SCR/$JOB.F10
export DRTFILE=$SCR/$JOB.F11
export CIVECTR=$SCR/$JOB.F12
export CASINTS=$SCR/$JOB.F13
export CIINTS=$SCR/$JOB.F14
export WORK15=$SCR/$JOB.F15
export WORK16=$SCR/$JOB.F16
export CSFSAVE=$SCR/$JOB.F17
export FOCKDER=$SCR/$JOB.F18
export WORK19=$SCR/$JOB.F19
export DASORT=$SCR/$JOB.F20
export DFTINTS=$SCR/$JOB.F21
export DFTGRID=$SCR/$JOB.F22
export JKFILE=$SCR/$JOB.F23
export ORDINT=$SCR/$JOB.F24
export EFPIND=$SCR/$JOB.F25
export PCMDATA=$SCR/$JOB.F26
export PCMINTS=$SCR/$JOB.F27
export SVPWRK1=$SCR/$JOB.F26
export SVPWRK2=$SCR/$JOB.F27
export COSCAV=$SCR/$JOB.F26
export COSDATA=$SCR/$JOB.cosmo
export COSPOT=$SCR/$JOB.pot
export MLTPL=$SCR/$JOB.F28
export MLTPLT=$SCR/$JOB.F29
export DAFL30=$SCR/$JOB.F30
export SOINTX=$SCR/$JOB.F31
export SOINTY=$SCR/$JOB.F32
export SOINTZ=$SCR/$JOB.F33
export SORESC=$SCR/$JOB.F34
# 35 is used by RESTART, see above
export GCILIST=$SCR/$JOB.F37
export HESSIAN=$SCR/$JOB.F38
export QMMMTEI=$SCR/$JOB.F39
export SOCCDAT=$SCR/$JOB.F40
export AABB41=$SCR/$JOB.F41
export BBAA42=$SCR/$JOB.F42
export BBBB43=$SCR/$JOB.F43
export MCQD50=$SCR/$JOB.F50
export MCQD51=$SCR/$JOB.F51
export MCQD52=$SCR/$JOB.F52
export MCQD53=$SCR/$JOB.F53
export MCQD54=$SCR/$JOB.F54
export MCQD55=$SCR/$JOB.F55
export MCQD56=$SCR/$JOB.F56
export MCQD57=$SCR/$JOB.F57
export MCQD58=$SCR/$JOB.F58
export MCQD59=$SCR/$JOB.F59
export MCQD60=$SCR/$JOB.F60
export MCQD61=$SCR/$JOB.F61
export MCQD62=$SCR/$JOB.F62
export MCQD63=$SCR/$JOB.F63
export MCQD64=$SCR/$JOB.F64
export NMRINT1=$SCR/$JOB.F61
export NMRINT2=$SCR/$JOB.F62
export NMRINT3=$SCR/$JOB.F63
export NMRINT4=$SCR/$JOB.F64
export NMRINT5=$SCR/$JOB.F65
export NMRINT6=$SCR/$JOB.F66
export DCPHFH2=$SCR/$JOB.F67
export DCPHF21=$SCR/$JOB.F68
export ELNUINT=$SCR/$JOB.F67
export NUNUINT=$SCR/$JOB.F68
export GVVPT=$SCR/$JOB.F69
export NUMOIN=$SCR/$JOB.F69
export NUMOCAS=$SCR/$JOB.F70
export NUELMO=$SCR/$JOB.F71
export NUELCAS=$SCR/$JOB.F72
# next files are for RI-MP2
export RIVMAT=$SCR/$JOB.F51
export RIT2A=$SCR/$JOB.F52
export RIT3A=$SCR/$JOB.F53
export RIT2B=$SCR/$JOB.F54
export RIT3B=$SCR/$JOB.F55
# Next files are for GMCQDPT
export GMCREF=$SCR/$JOB.F70
export GMCO2R=$SCR/$JOB.F71
export GMCROC=$SCR/$JOB.F72
export GMCOOC=$SCR/$JOB.F73
export GMCCC0=$SCR/$JOB.F74
export GMCHMA=$SCR/$JOB.F75
export GMCEI1=$SCR/$JOB.F76
export GMCEI2=$SCR/$JOB.F77
export GMCEOB=$SCR/$JOB.F78
export GMCEDT=$SCR/$JOB.F79
export GMCERF=$SCR/$JOB.F80
export GMCHCR=$SCR/$JOB.F81
export GMCGJK=$SCR/$JOB.F82
export GMCGAI=$SCR/$JOB.F83
export GMCGEO=$SCR/$JOB.F84
export GMCTE1=$SCR/$JOB.F85
export GMCTE2=$SCR/$JOB.F86
export GMCHEF=$SCR/$JOB.F87
export GMCMOL=$SCR/$JOB.F88
export GMCMOS=$SCR/$JOB.F89
export GMCWGT=$SCR/$JOB.F90
export GMCRM2=$SCR/$JOB.F91
export GMCRM1=$SCR/$JOB.F92
export GMCR00=$SCR/$JOB.F93
export GMCRP1=$SCR/$JOB.F94
export GMCRP2=$SCR/$JOB.F95
export GMCVEF=$SCR/$JOB.F96
export GMCDIN=$SCR/$JOB.F97
export GMC2SZ=$SCR/$JOB.F98
export GMCCCS=$SCR/$JOB.F99
# Next files are used only during closed shell coupled cluster runs.
# Display the numerous definitions iff they are going to be used.
export cctyp=`grep -i 'CCTYP[(=]' $SCR/$JOB.F05 | wc -l`
export CCREST=$SCR/$JOB.F70
export CCDIIS=$SCR/$JOB.F71
export CCINTS=$SCR/$JOB.F72
export CCT1AMP=$SCR/$JOB.F73
export CCT2AMP=$SCR/$JOB.F74
export CCT3AMP=$SCR/$JOB.F75
export CCVM=$SCR/$JOB.F76
export CCVE=$SCR/$JOB.F77
export CCQUADS=$SCR/$JOB.F78
export QUADSVO=$SCR/$JOB.F79
export EOMSTAR=$SCR/$JOB.F80
export EOMVEC1=$SCR/$JOB.F81
export EOMVEC2=$SCR/$JOB.F82
export EOMHC1=$SCR/$JOB.F83
export EOMHC2=$SCR/$JOB.F84
export EOMHHHH=$SCR/$JOB.F85
export EOMPPPP=$SCR/$JOB.F86
export EOMRAMP=$SCR/$JOB.F87
export EOMRTMP=$SCR/$JOB.F88
export EOMDG12=$SCR/$JOB.F89
export MMPP=$SCR/$JOB.F90
export MMHPP=$SCR/$JOB.F91
export MMCIVEC=$SCR/$JOB.F92
export MMCIVC1=$SCR/$JOB.F93
export MMCIITR=$SCR/$JOB.F94
export EOMVL1=$SCR/$JOB.F95
export EOMVL2=$SCR/$JOB.F96
export EOMLVEC=$SCR/$JOB.F97
export EOMHL1=$SCR/$JOB.F98
export EOMHL2=$SCR/$JOB.F99
export CCVVVV=$SCR/$JOB.F80
#
# Next files are used only during open shell coupled cluster runs.
#
export AMPROCC=$SCR/$JOB.F70
export ITOPNCC=$SCR/$JOB.F71
export FOCKMTX=$SCR/$JOB.F72
export LAMB23=$SCR/$JOB.F73
export VHHAA=$SCR/$JOB.F74
export VHHBB=$SCR/$JOB.F75
export VHHAB=$SCR/$JOB.F76
export VMAA=$SCR/$JOB.F77
export VMBB=$SCR/$JOB.F78
export VMAB=$SCR/$JOB.F79
export VMBA=$SCR/$JOB.F80
export VHPRAA=$SCR/$JOB.F81
export VHPRBB=$SCR/$JOB.F82
export VHPRAB=$SCR/$JOB.F83
export VHPLAA=$SCR/$JOB.F84
export VHPLBB=$SCR/$JOB.F85
export VHPLAB=$SCR/$JOB.F86
export VHPLBA=$SCR/$JOB.F87
export VEAA=$SCR/$JOB.F88
export VEBB=$SCR/$JOB.F89
export VEAB=$SCR/$JOB.F90
export VEBA=$SCR/$JOB.F91
export VPPPP=$SCR/$JOB.F92
export INTERM1=$SCR/$JOB.F93
export INTERM2=$SCR/$JOB.F94
export INTERM3=$SCR/$JOB.F95
export ITSPACE=$SCR/$JOB.F96
export INSTART=$SCR/$JOB.F97
export ITSPC3=$SCR/$JOB.F98
#
# Next files are used only during elongation method runs.
# Display the numerous definitions iff they are going to be used.
elgtyp=`grep -i NELONG= $SCR/$JOB.F05 | wc -l`
if (( $elgtyp > 0 )); then
export ELGNAME=$4
if [ "null$4" == "null" ]; then
export ELGNAME=$ELGFILE
fi
export AOINTS=$SCR/$ELGNAME.F08
export ELGDOS=$SCR/$JOB.ldos
export ELGDAT=$SCR/$ELGNAME.F71
export ELGPAR=$SCR/$ELGNAME.F72
export ELGCUT=$SCR/$ELGNAME.F74
export ELGVEC=$SCR/$ELGNAME.F75
export EGINTA=$SCR/$ELGNAME.F77
export EGINTB=$SCR/$ELGNAME.F78
export EGTDHF=$SCR/$ELGNAME.F79
export EGTEST=$SCR/$ELGNAME.F80
fi
#
# Next files are used only during extended TDHF package runs.
# Display the numerous definitions iff they are going to be used.
export txtyp=`grep -i RUNTYP=TDHFX $SCR/$JOB.F05 | wc -l`
export OLI201=$SCR/$JOB.F201
export OLI202=$SCR/$JOB.F202
export OLI203=$SCR/$JOB.F203
export OLI204=$SCR/$JOB.F204
export OLI205=$SCR/$JOB.F205
export OLI206=$SCR/$JOB.F206
export OLI207=$SCR/$JOB.F207
export OLI208=$SCR/$JOB.F208
export OLI209=$SCR/$JOB.F209
export OLI210=$SCR/$JOB.F210
export OLI211=$SCR/$JOB.F211
export OLI212=$SCR/$JOB.F212
export OLI213=$SCR/$JOB.F213
export OLI214=$SCR/$JOB.F214
export OLI215=$SCR/$JOB.F215
export OLI216=$SCR/$JOB.F216
export OLI217=$SCR/$JOB.F217
export OLI218=$SCR/$JOB.F218
export OLI219=$SCR/$JOB.F219
export OLI220=$SCR/$JOB.F220
export OLI221=$SCR/$JOB.F221
export OLI222=$SCR/$JOB.F222
export OLI223=$SCR/$JOB.F223
export OLI224=$SCR/$JOB.F224
export OLI225=$SCR/$JOB.F225
export OLI226=$SCR/$JOB.F226
export OLI227=$SCR/$JOB.F227
export OLI228=$SCR/$JOB.F228
export OLI229=$SCR/$JOB.F229
export OLI230=$SCR/$JOB.F230
export OLI231=$SCR/$JOB.F231
export OLI232=$SCR/$JOB.F232
export OLI233=$SCR/$JOB.F233
export OLI234=$SCR/$JOB.F234
export OLI235=$SCR/$JOB.F235
export OLI236=$SCR/$JOB.F236
export OLI237=$SCR/$JOB.F237
export OLI238=$SCR/$JOB.F238
export OLI239=$SCR/$JOB.F239
# Next files are used only during divide-and-conquer runs
export DCSUB=$SCR/$JOB.F250
export DCVEC=$SCR/$JOB.F251
export DCEIG=$SCR/$JOB.F252
export DCDM=$SCR/$JOB.F253
export DCDMO=$SCR/$JOB.F254
export DCQ=$SCR/$JOB.F255
export DCW=$SCR/$JOB.F256
export DCEDM=$SCR/$JOB.F257
# Next files are used only during LMO hyperpolarizability analysis
export LHYPWRK=$SCR/$JOB.F297
export LHYPWK2=$SCR/$JOB.F298
export BONDDPF=$SCR/$JOB.F299
# Next value is used only within the VB2000 add-on code
export GMSJOBNAME=$JOB
# Don't ask - just remove the old files if they still exist.
if [ -e $PUNCH ]; then
/bin/rm $PUNCH
fi
# Execute Gamess.
echo "$GMSPATH/ddikick.x $GMSPATH/gamess.00.x $JOB -ddi $NNODES $NCPUS $HOSTLIST -scr $SCR > $JOB.log"
$GMSPATH/ddikick.x $GMSPATH/gamess.00.x $JOB -ddi $NNODES $NCPUS $HOSTLIST -scr $SCR > $JOB.log
# Copy the punch file containing coordinates, Hessian etc.
if [ -e $PUNCH ]
then mv $PUNCH ./
fi
# Clean up the master's scratch directory.
echo "Files used on the master node "$master" were:"
ls -lF $SCR/$JOB.*
rm -f $SCR/$JOB.F*
# Step to the next supplied input file
shift
done
echo "GAMESS finished at `date`"
exit