Statistiques
| Révision :

root / examples / Vasp / Serial / run_Path_SGE_home

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

1
#!/bin/bash
2
#$ -S /bin/bash
3
#$ -N Vasp_Serial
4
#$ -cwd 
5
#$ -V
6
#$ -o Vasp_para.batch-log
7
#$ -j y
8
#$ -q dl165adf
9
#$ -pe mpi8 8
10

    
11

    
12
HOMEDIR=$SGE_O_WORKDIR
13
# No need for SCRATCHDIR
14

    
15
RUNNEW=run1
16

    
17
######################################
18
#
19
# you might have to change the following variables
20
#
21
######################################
22
#
23
# Name of the Path Input file
24
#
25
Job=Test_Vasp_Serial
26
#
27
#
28
# Where is Path.exe ??
29
#
30
PathExe=~/Programs/optnpath/src/Path.exe
31
#
32
# Where is VASP ?
33
#
34
export VASPDIR=~/Programs/VASP
35
export VASPEXEC=VASP4635_R410_STD
36
#
37
# Whre is mpirun ?
38
#
39
export MPIDIR=/softs/openmpi-1.4.1-intel/
40
export MPIRUN=$MPIDIR/bin/mpirun
41
#
42
#
43
# Machine where the files are
44
#
45
RUNNINGMACHINE=r410comp1-pub
46

    
47
# Some libraries... 
48
#
49
#For intel 11.1.069
50
source /softs/intel/v11.1.069/bin/intel64/ifortvars_intel64.sh
51
export LD_LIBRARY_PATH=/softs/fftw/2.1.5/ps-gb/lib:$LD_LIBRARY_PATH:/usr/lib
52
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
export LANG=C
54
#
55
#Usually nothing has to be changed after this line
56
#
57
#################################################
58

    
59
#
60
# Machinefile
61
#
62
HOSTFILE=$TMPDIR/machines
63

    
64
#################################
65
#
66
# We go to the Work Directory
67
cd $HOMEDIR
68

    
69

    
70
#################################
71
#
72
#
73
# We check that the INCAR file is not a NEB
74
#
75
NbIm=`grep -i IMAGES INCAR  `
76
if [ "$NbIm" != "" ]; then
77
  mv INCAR INCAR.ori
78
  grep -v IMAGES INCAR.ori > INCAR
79

    
80
 echo "WARNING WARNING WARNING WARNING WARNING WARNING"
81
 echo "IMAGES was in INCAR "
82
 echo "I copied INCAR to INCAR.ori and deleted this line"
83
 echo "Check it !!!"
84
 echo "WARNING WARNING WARNING WARNING WARNING WARNING"
85
fi
86

    
87

    
88
#############################
89
#
90
#  We create the 'VaspExe' file that Path will use to run the
91
# actual VASP calculations of E and forces
92
#
93
#############################
94
cat << EOF > ./RunVasp
95
$MPIRUN -v -prefix $MPIDIR -mca pls_rsh_agent "ssh" -mca btl openib,self -np $NSLOTS ${VASPDIR}/${VASPEXEC} > ${HOMEDIR}/out_${RUNNEW}
96
EOF
97
chmod u+x ./RunVasp
98

    
99
###############################
100
#
101
# We launch PATH
102
#
103
###############################
104
ln -fs ${PathExe} .
105

    
106
./Path.exe ${Job}.path > ${Job}.out 2> ${Job}.err
107