Statistiques
| Révision :

root / examples / Vasp / Serial / run_Path_SGE_home

Historique | Voir | Annoter | Télécharger (2,13 ko)

1 1 pfleura2
#!/bin/bash
2 1 pfleura2
#$ -S /bin/bash
3 1 pfleura2
#$ -N Vasp_Serial
4 1 pfleura2
#$ -cwd
5 1 pfleura2
#$ -V
6 1 pfleura2
#$ -o Vasp_para.batch-log
7 1 pfleura2
#$ -j y
8 1 pfleura2
#$ -q dl165adf
9 1 pfleura2
#$ -pe mpi8 8
10 1 pfleura2
11 1 pfleura2
12 1 pfleura2
HOMEDIR=$SGE_O_WORKDIR
13 1 pfleura2
# No need for SCRATCHDIR
14 1 pfleura2
15 1 pfleura2
RUNNEW=run1
16 1 pfleura2
17 1 pfleura2
######################################
18 1 pfleura2
#
19 1 pfleura2
# you might have to change the following variables
20 1 pfleura2
#
21 1 pfleura2
######################################
22 1 pfleura2
#
23 1 pfleura2
# Name of the Path Input file
24 1 pfleura2
#
25 1 pfleura2
Job=Test_Vasp_Serial
26 1 pfleura2
#
27 1 pfleura2
#
28 1 pfleura2
# Where is Path.exe ??
29 1 pfleura2
#
30 12 pfleura2
PathExe=~/Programs/optnpath/src/Path.exe
31 1 pfleura2
#
32 1 pfleura2
# Where is VASP ?
33 1 pfleura2
#
34 1 pfleura2
export VASPDIR=~/Programs/VASP
35 1 pfleura2
export VASPEXEC=VASP4635_R410_STD
36 1 pfleura2
#
37 1 pfleura2
# Whre is mpirun ?
38 1 pfleura2
#
39 1 pfleura2
export MPIDIR=/softs/openmpi-1.4.1-intel/
40 1 pfleura2
export MPIRUN=$MPIDIR/bin/mpirun
41 1 pfleura2
#
42 1 pfleura2
#
43 1 pfleura2
# Machine where the files are
44 1 pfleura2
#
45 1 pfleura2
RUNNINGMACHINE=r410comp1-pub
46 1 pfleura2
47 1 pfleura2
# Some libraries...
48 1 pfleura2
#
49 1 pfleura2
#For intel 11.1.069
50 1 pfleura2
source /softs/intel/v11.1.069/bin/intel64/ifortvars_intel64.sh
51 1 pfleura2
export LD_LIBRARY_PATH=/softs/fftw/2.1.5/ps-gb/lib:$LD_LIBRARY_PATH:/usr/lib
52 1 pfleura2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/softs/intel/v11.1.069/mkl/lib/em64t/:$MPIDIR/lib/:/softs/intel/v11.1.069/lib/intel64
53 1 pfleura2
export LANG=C
54 1 pfleura2
#
55 1 pfleura2
#Usually nothing has to be changed after this line
56 1 pfleura2
#
57 1 pfleura2
#################################################
58 1 pfleura2
59 1 pfleura2
#
60 1 pfleura2
# Machinefile
61 1 pfleura2
#
62 1 pfleura2
HOSTFILE=$TMPDIR/machines
63 1 pfleura2
64 1 pfleura2
#################################
65 1 pfleura2
#
66 1 pfleura2
# We go to the Work Directory
67 1 pfleura2
cd $HOMEDIR
68 1 pfleura2
69 1 pfleura2
70 1 pfleura2
#################################
71 1 pfleura2
#
72 1 pfleura2
#
73 1 pfleura2
# We check that the INCAR file is not a NEB
74 1 pfleura2
#
75 1 pfleura2
NbIm=`grep -i IMAGES INCAR  `
76 1 pfleura2
if [ "$NbIm" != "" ]; then
77 1 pfleura2
  mv INCAR INCAR.ori
78 1 pfleura2
  grep -v IMAGES INCAR.ori > INCAR
79 1 pfleura2
80 1 pfleura2
 echo "WARNING WARNING WARNING WARNING WARNING WARNING"
81 1 pfleura2
 echo "IMAGES was in INCAR "
82 1 pfleura2
 echo "I copied INCAR to INCAR.ori and deleted this line"
83 1 pfleura2
 echo "Check it !!!"
84 1 pfleura2
 echo "WARNING WARNING WARNING WARNING WARNING WARNING"
85 1 pfleura2
fi
86 1 pfleura2
87 1 pfleura2
88 1 pfleura2
#############################
89 1 pfleura2
#
90 1 pfleura2
#  We create the 'VaspExe' file that Path will use to run the
91 1 pfleura2
# actual VASP calculations of E and forces
92 1 pfleura2
#
93 1 pfleura2
#############################
94 1 pfleura2
cat << EOF > ./RunVasp
95 1 pfleura2
$MPIRUN -v -prefix $MPIDIR -mca pls_rsh_agent "ssh" -mca btl openib,self -np $NSLOTS ${VASPDIR}/${VASPEXEC} > ${HOMEDIR}/out_${RUNNEW}
96 1 pfleura2
EOF
97 1 pfleura2
chmod u+x ./RunVasp
98 1 pfleura2
99 1 pfleura2
###############################
100 1 pfleura2
#
101 1 pfleura2
# We launch PATH
102 1 pfleura2
#
103 1 pfleura2
###############################
104 1 pfleura2
ln -fs ${PathExe} .
105 1 pfleura2
106 1 pfleura2
./Path.exe ${Job}.path > ${Job}.out 2> ${Job}.err