root / examples / Vasp / Serial / run_Path_PBS @ 12
Historique | Voir | Annoter | Télécharger (1,98 ko)
1 | 1 | pfleura2 | #PBS -S /bin/sh |
---|---|---|---|
2 | 1 | pfleura2 | #PBS -N PathSer0.02 |
3 | 1 | pfleura2 | #PBS -l nodes=1:Other |
4 | 1 | pfleura2 | #PBS -q OneL |
5 | 1 | pfleura2 | #PBS -o PathSer0.02.batch-log |
6 | 1 | pfleura2 | #PBS -j oe |
7 | 1 | pfleura2 | #PBS -M Paul.Fleurat-Lessard@ens-lyon.fr |
8 | 1 | pfleura2 | #PBS -m aeb |
9 | 1 | pfleura2 | |
10 | 1 | pfleura2 | |
11 | 1 | pfleura2 | #!/bin/bash |
12 | 1 | pfleura2 | |
13 | 1 | pfleura2 | home_dir=$PBS_O_WORKDIR |
14 | 1 | pfleura2 | work_dir=$PBS_O_WORKDIR |
15 | 1 | pfleura2 | Job=Test_Vasp_Serial |
16 | 1 | pfleura2 | numb=run1 |
17 | 1 | pfleura2 | |
18 | 1 | pfleura2 | ###################################### |
19 | 1 | pfleura2 | # |
20 | 1 | pfleura2 | # you might have to change the following variables |
21 | 1 | pfleura2 | # |
22 | 1 | pfleura2 | ###################################### |
23 | 1 | pfleura2 | # |
24 | 1 | pfleura2 | # Where is Path.exe ?? |
25 | 1 | pfleura2 | # |
26 | 12 | pfleura2 | PathExe=~/Programs/optnpath/src/Path.exe |
27 | 1 | pfleura2 | # |
28 | 1 | pfleura2 | # Where is VASP ? |
29 | 1 | pfleura2 | # |
30 | 1 | pfleura2 | export VASP=/home/dloffred/VASP_SOURCES/Intel_P4/VASP46_CINEB |
31 | 1 | pfleura2 | # |
32 | 1 | pfleura2 | # Whre is mpirun ? |
33 | 1 | pfleura2 | # |
34 | 1 | pfleura2 | export MPIRUN=/usr/local/mpich-intel-090404/bin/mpirun |
35 | 1 | pfleura2 | # |
36 | 1 | pfleura2 | # Some libraries... |
37 | 1 | pfleura2 | # |
38 | 1 | pfleura2 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/fc/9.1.037/lib/:/opt/intel/cc/9.1.045/lib:/usr/lib:/opt/intel/mkl/8.1/lib/32 |
39 | 1 | pfleura2 | export PATH=/opt/intel/fc/9.1.037/bin/:/opt/intel/cc/9.1.045/bin/:$PATH:$HOME/bin:/usr/local/mpich-intel9/bin |
40 | 1 | pfleura2 | export LD_RUN_PATH=$LD_RUN_PATH:/opt/intel/fc/9.1.037/lib/:/opt/intel/cc/9.1.045/lib |
41 | 1 | pfleura2 | export MANPATH=$MANPATH:/opt/intel/fc/9.1.037/man/:/opt/intel/cc/9.1.045/man |
42 | 1 | pfleura2 | export LANG=C |
43 | 1 | pfleura2 | # |
44 | 1 | pfleura2 | #Usually nothing has to be changed after this line |
45 | 1 | pfleura2 | # |
46 | 1 | pfleura2 | ################################################# |
47 | 1 | pfleura2 | |
48 | 1 | pfleura2 | |
49 | 1 | pfleura2 | |
50 | 1 | pfleura2 | |
51 | 1 | pfleura2 | ################################# |
52 | 1 | pfleura2 | # |
53 | 1 | pfleura2 | # We create the machinefile |
54 | 1 | pfleura2 | # |
55 | 1 | pfleura2 | # even if it is not really needed for SERIAL calculations |
56 | 1 | pfleura2 | # |
57 | 1 | pfleura2 | ################################# |
58 | 1 | pfleura2 | nodes=`cat $PBS_NODEFILE` |
59 | 1 | pfleura2 | nnodes=`wc $PBS_NODEFILE | awk '{print $1}'` |
60 | 1 | pfleura2 | |
61 | 1 | pfleura2 | confile=$home_dir/ip.$PBS_JOBID.conf |
62 | 1 | pfleura2 | touch $confile |
63 | 1 | pfleura2 | j="init" |
64 | 1 | pfleura2 | for i in $nodes |
65 | 1 | pfleura2 | do |
66 | 1 | pfleura2 | if [ $j != $i ] |
67 | 1 | pfleura2 | then echo "$i:1" >> $confile |
68 | 1 | pfleura2 | else |
69 | 1 | pfleura2 | echo "vous calculez sur des noeuds smp" |
70 | 1 | pfleura2 | fi |
71 | 1 | pfleura2 | j=$i |
72 | 1 | pfleura2 | done |
73 | 1 | pfleura2 | |
74 | 1 | pfleura2 | ############################# |
75 | 1 | pfleura2 | # |
76 | 1 | pfleura2 | # We create the 'VaspExe' file that Path will use to run the |
77 | 1 | pfleura2 | # actual VASP calculations of E and forces |
78 | 1 | pfleura2 | # |
79 | 1 | pfleura2 | ############################# |
80 | 1 | pfleura2 | cd $work_dir |
81 | 1 | pfleura2 | echo "$MPIRUN -nolocal -machinefile $confile -np $nnodes $VASP > out_$numb" > ./RunVasp |
82 | 1 | pfleura2 | chmod u+x ./RunVasp |
83 | 1 | pfleura2 | |
84 | 1 | pfleura2 | ############################### |
85 | 1 | pfleura2 | # |
86 | 1 | pfleura2 | # We launch PATH |
87 | 1 | pfleura2 | # |
88 | 1 | pfleura2 | ############################### |
89 | 1 | pfleura2 | ln -s ${PathExe} . |
90 | 1 | pfleura2 | |
91 | 1 | pfleura2 | ./Path.exe ${Job}.path &> ${Job}.out |