Statistics
| Revision:

chimie4psmn / submit / namd / sub_namd_gpu_bash @ 55

History | View | Annotate | Download (2 kB)

1
#!/bin/bash
2
#$ -S /bin/bash
3
#$ -N  mutm_ap-oxog
4
#$ -q  E5-2670gpuK20deb128
5
#$ -l  h=!c82gpgpu33
6
#$ -pe mpi_debian 16
7
#$ -cwd
8
#$ -V
9

    
10
# Loading modules to set up environment
11
export MODULEPATH=/home/tjiang/modules/lmod/:${MODULEPATH}
12
module use ${MODULEPATH}
13
module load NAMD/multicore+CUDA/2.12
14

    
15
# Setting up home and scratch directories
16
HOMEDIR=$SGE_O_WORKDIR
17
cd $HOMEDIR
18
SCRATCHDIR=/scratch/$USER/$JOB_ID
19
/bin/mkdir -p $SCRATCHDIR
20
HOSTFILE=$TMPDIR/machines
21
cp $HOSTFILE .
22
sed -i -e 's/^/host\ /' machines
23

    
24
# Please provide the following files for namd
25
CONFIGFILE=run2.namd
26
TOPFILE=DDB2_CT_hmr.prmtop
27
PDBFILE=DDB2_CT_run1_0.coor
28
FIXFILE=DDB2_CT_new.fix
29
COLVARSFILE=dihedral_run1.in
30
LOGFILE=run2.out
31
#CONFIGFILE=run1.namd
32
#TOPFILE=ap-oxog3go8.prmtop
33
#PDBFILE=mutm_ap-oxog.coor
34
#COLVARSFILE=dihedral_run1.in
35
#LOGFILE=run1.out
36

    
37
# Copying files to scratchdir
38
rsync -c $CONFIGFILE $TOPFILE $PDBFILE $FIXFILE $COLVARSFILE machines runscript $SCRATCHDIR
39

    
40
# The executables for mpirun and namd2
41
MPIRUN=mpirun
42
COMMAND=`which namd2`
43

    
44
# Go to scratch directory and run calculation there
45
cd $SCRATCHDIR
46
echo 'group main ++shell ssh' > nodelist 
47
cat machines>>nodelist
48

    
49
#/applis/PSMN/generic/NAMD/2.12/NAMD_2.12_Linux-x86_64-ibverbs-smp-CUDA/charmrun ++p $NSLOTS ++ppn 8 ++nodelist nodelist ++remote-shell ssh /applis/PSMN/generic/NAMD/2.12/NAMD_2.12_Linux-x86_64-ibverbs-smp-CUDA/namd2 +setcpuaffinity +idlepoll $CONFIGFILE> ${LOGFILE}_2nodes
50
#/applis/PSMN/generic/NAMD/2.12/NAMD_2.12_Linux-x86_64-ibverbs-smp-CUDA/charmrun +p${NSLOTS} ++ppn 8 ++nodelist nodelist ++remote-shell ssh /applis/PSMN/generic/NAMD/2.12/NAMD_2.12_Linux-x86_64-ibverbs-smp-CUDA/namd2 +setcpuaffinity +idlepoll $CONFIGFILE> ${LOGFILE}_2nodes
51
#charmrun +p$NSLOTS  $MPIRUN  $COMMAND $CONFIGFILE> $LOGFILE
52
#namd2 +p 16  $CONFIGFILE> $LOGFILE
53
namd2 +idlepoll +p $NSLOTS +devices 0,1 $CONFIGFILE> ${LOGFILE}_${NSLOTS}cpu_2gpu_node31
54

    
55
# Copy back data
56
rsync -c --exclude '$CONFIGFILE $TOPFILE $PDBFILE $COLVARSFILE' * $HOMEDIR
57
cd $HOMEDIR
58

    
59
# Cleaning up scratch directory and hostfile
60
rm -fr $SCRATCHDIR