Statistiques
| Révision :

chimie4psmn / submit / namd / sub_namd_gpu_bash @ 55

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

1 55 tjiang
#!/bin/bash
2 55 tjiang
#$ -S /bin/bash
3 55 tjiang
#$ -N  mutm_ap-oxog
4 55 tjiang
#$ -q  E5-2670gpuK20deb128
5 55 tjiang
#$ -l  h=!c82gpgpu33
6 55 tjiang
#$ -pe mpi_debian 16
7 55 tjiang
#$ -cwd
8 55 tjiang
#$ -V
9 55 tjiang
10 55 tjiang
# Loading modules to set up environment
11 55 tjiang
export MODULEPATH=/home/tjiang/modules/lmod/:${MODULEPATH}
12 55 tjiang
module use ${MODULEPATH}
13 55 tjiang
module load NAMD/multicore+CUDA/2.12
14 55 tjiang
15 55 tjiang
# Setting up home and scratch directories
16 55 tjiang
HOMEDIR=$SGE_O_WORKDIR
17 55 tjiang
cd $HOMEDIR
18 55 tjiang
SCRATCHDIR=/scratch/$USER/$JOB_ID
19 55 tjiang
/bin/mkdir -p $SCRATCHDIR
20 55 tjiang
HOSTFILE=$TMPDIR/machines
21 55 tjiang
cp $HOSTFILE .
22 55 tjiang
sed -i -e 's/^/host\ /' machines
23 55 tjiang
24 55 tjiang
# Please provide the following files for namd
25 55 tjiang
CONFIGFILE=run2.namd
26 55 tjiang
TOPFILE=DDB2_CT_hmr.prmtop
27 55 tjiang
PDBFILE=DDB2_CT_run1_0.coor
28 55 tjiang
FIXFILE=DDB2_CT_new.fix
29 55 tjiang
COLVARSFILE=dihedral_run1.in
30 55 tjiang
LOGFILE=run2.out
31 55 tjiang
#CONFIGFILE=run1.namd
32 55 tjiang
#TOPFILE=ap-oxog3go8.prmtop
33 55 tjiang
#PDBFILE=mutm_ap-oxog.coor
34 55 tjiang
#COLVARSFILE=dihedral_run1.in
35 55 tjiang
#LOGFILE=run1.out
36 55 tjiang
37 55 tjiang
# Copying files to scratchdir
38 55 tjiang
rsync -c $CONFIGFILE $TOPFILE $PDBFILE $FIXFILE $COLVARSFILE machines runscript $SCRATCHDIR
39 55 tjiang
40 55 tjiang
# The executables for mpirun and namd2
41 55 tjiang
MPIRUN=mpirun
42 55 tjiang
COMMAND=`which namd2`
43 55 tjiang
44 55 tjiang
# Go to scratch directory and run calculation there
45 55 tjiang
cd $SCRATCHDIR
46 55 tjiang
echo 'group main ++shell ssh' > nodelist
47 55 tjiang
cat machines>>nodelist
48 55 tjiang
49 55 tjiang
#/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 55 tjiang
#/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 55 tjiang
#charmrun +p$NSLOTS  $MPIRUN  $COMMAND $CONFIGFILE> $LOGFILE
52 55 tjiang
#namd2 +p 16  $CONFIGFILE> $LOGFILE
53 55 tjiang
namd2 +idlepoll +p $NSLOTS +devices 0,1 $CONFIGFILE> ${LOGFILE}_${NSLOTS}cpu_2gpu_node31
54 55 tjiang
55 55 tjiang
# Copy back data
56 55 tjiang
rsync -c --exclude '$CONFIGFILE $TOPFILE $PDBFILE $COLVARSFILE' * $HOMEDIR
57 55 tjiang
cd $HOMEDIR
58 55 tjiang
59 55 tjiang
# Cleaning up scratch directory and hostfile
60 55 tjiang
rm -fr $SCRATCHDIR