-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqprep_newton
executable file
·40 lines (36 loc) · 995 Bytes
/
qprep_newton
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
#!/bin/bash
################ job newton ################
#
# Usage:
# job_newton file.inp $NPROCS
#
# Where $NPROCS is the number of processors
#
################ job newton ################
#set variables
input="$1"
shift
job=${input%.*}
job_file="${job}".job
cpu="$1"
shift
#script PBS
{
echo "#!/bin/bash" ;
echo "#PBS -S /bin/bash" ;
echo "#PBS -l nodes=1:ppn=$cpu" ;
echo "#PBS -l mem=120GB" ;
echo "#PBS -N $job" ;
echo "#PBS -j oe" ;
echo "#PBS -V" ;
echo "export OMP_NUM_THREADS=$cpu" ;
echo 'LOCAL=$(mktemp -d -p /mnt/scratch)' ;
echo 'cat $''PBS_NODEFILE > ''$PBS_O_WORKDIR/.jobinfo' ;
echo 'echo "$''LOCAL" >> $PBS_O_WORKDIR/.jobinfo' ;
echo 'cp -f $''PBS_O_WORKDIR/*.{xyz,inp,gbw,opt,pot,hess} $LOCAL >& /dev/null' ;
echo 'cd $''LOCAL' ;
echo "/opt/local/orca-5.0.2/orca $input "'>& $'"PBS_O_WORKDIR/$job.out" ;
echo 'cp -f $''(ls | grep -v ".inp\|.tmp") $PBS_O_WORKDIR' ;
echo 'cd $''PBS_O_WORKDIR' ;
echo 'rm -rf $''LOCAL' ;
} > $job_file