Statistics
| Revision:

chimie4psmn / submit / amber / sub_amber17.sh @ 55

History | View | Annotate | Download (2.1 kB)

1
#!/bin/bash
2
#$ -S /bin/bash
3
#$ -N amber17
4
#$ -cwd
5
#$ -V
6
#$ -o npt4.out
7
#$ -j y
8
##=====================
9
##Choose between cpu queues and gpu queues, default gpu queues
10
##cpu queues
11
##$ -q M6*,E5-2667*,E5-2697*,E5-2670deb*
12
##$ -pe mpi16_debian 16
13
##gpu queues
14
#$ -q E5-2670gpu*
15
#$ -pe mpi_debian 1
16
##=====================
17

    
18
# PSMN: $Id$
19
#
20

    
21
export MODULEPATH=/home/tjiang/modules/lmod/:${MODULEPATH}
22
module use ${MODULEPATH}
23

    
24
#module file for gpu version of amber
25
module load amber/17_gcc5.4.0_cuda8.0ga2_openmpi1.6.4
26

    
27
#module file for cpu only version of amber
28
#module load amber/17_intel15.0.2_openmpi1.6.4
29

    
30
ambermod=$(basename $AMBERHOME)
31
echo $ambermod
32
if [ $ambermod = "gcc5.4.0_cuda8.0ga2_openmpi1.6.4" ]; then
33
    amberexe="pmemd.cuda"
34
else
35
    amberexe="pmemd"
36
fi
37
echo $amberexe
38

    
39
ulimit -v unlimited
40
ulimit -s unlimited
41

    
42
######################"
43
HOMEDIR=$SGE_O_WORKDIR
44
HOSTFILE=$TMPDIR/machines
45

    
46
cd $SGE_O_WORKDIR
47

    
48
echo NSLOTS=$NSLOTS
49

    
50
SCRATCHDIR=/scratch/$USER/$JOB_ID/
51
echo $SCRATCHDIR
52
/bin/mkdir -p $SCRATCHDIR
53
###################
54
Mac=`hostname | awk '{print substr($1,1,2)}' `
55

    
56
NbMac=`wc $PE_HOSTFILE | awk '{print $1}' `
57
rm ./machines
58
for i in `seq 1 $NbMac`
59
    do
60
        Mac=` head -n $i $PE_HOSTFILE | tail -1 | awk '{print $1}' `
61
        Nb=` head -n $i $PE_HOSTFILE | tail -1 | awk '{print $2}' `
62
        for j in `seq 1 $Nb`
63
             do
64
                 echo $Mac >> ./machines
65
                  done
66
                  done
67

    
68
                  cp $PE_HOSTFILE ./PE_HOSTFILE
69

    
70
                  cd $SCRATCHDIR
71

    
72
                  echo "start at" 
73
                  date
74

    
75
                  echo -n "Starting Script at: "
76
                  date
77
                  $amberexe -O -i $HOMEDIR/min.in \
78
                                -o $HOMEDIR/min.out \
79
                                -p $HOMEDIR/dna_TT.prmtop \
80
                                -c $HOMEDIR/dna3_TT.inpcrd \
81
                                -r $HOMEDIR/dna_TT_min.rst \
82
                            	-x $HOMEDIR/dna_TT_min.mdcrd 
83

    
84
                  echo "done at" 
85
                  date
86
                  cp -rf * $HOMEDIR
87

    
88