Statistiques
| Révision :

chimie4psmn / submit / namd / sub_namd_bash @ 55

Historique | Voir | Annoter | Télécharger (1,04 ko)

1 23 tjiang
# $Id$
2 23 tjiang
#!/bin/bash
3 23 tjiang
#$ -S /bin/bash
4 23 tjiang
#$ -N  NameOfYourJob
5 23 tjiang
#$ -q  E5*
6 23 tjiang
#$ -pe mpi4_debian 4
7 23 tjiang
#$ -cwd
8 23 tjiang
9 23 tjiang
# Loading modules to set up environment
10 23 tjiang
source /usr/share/modules/init/bash
11 23 tjiang
module use /applis/PSMN/Modules
12 23 tjiang
module load Base/psmn
13 23 tjiang
module load NAMD/2.12-multicore
14 23 tjiang
15 23 tjiang
HOMEDIR=$SGE_O_WORKDIR
16 23 tjiang
cd $HOMEDIR
17 23 tjiang
SCRATCHDIR=/scratch/$USER/$JOB_ID
18 23 tjiang
/bin/mkdir -p $SCRATCHDIR
19 23 tjiang
20 23 tjiang
# Please provide the following files for namd
21 23 tjiang
CONFIGFILE=ubq_wb_eq.conf
22 23 tjiang
INPFILE=par_all27_prot_lipid.inp
23 23 tjiang
PDBFILE=ubq_wb.pdb
24 23 tjiang
PSFFILE=ubq_wb.psf
25 23 tjiang
LOGFILE=ubq_wb_eq.log
26 23 tjiang
27 23 tjiang
# Copying files to scratchdir
28 23 tjiang
rsync -c $CONFIGFILE $INPFILE $PDBFILE $PSFFILE $SCRATCHDIR
29 23 tjiang
30 23 tjiang
# The executables for mpirun and namd2
31 23 tjiang
MPIRUN=mpirun
32 23 tjiang
COMMAND=`which namd2`
33 23 tjiang
34 23 tjiang
# Go to scratch directory and run calculation there
35 23 tjiang
cd $SCRATCHDIR
36 23 tjiang
#charmrun namd2 +p$NSLOTS ++mpiexec ++remote-shell $MPIRUN  $COMMAND $CONFIGFILE
37 23 tjiang
charmrun +p$NSLOTS  $MPIRUN  $COMMAND $CONFIGFILE> $LOGFILE
38 23 tjiang
39 23 tjiang
# Copy back data
40 23 tjiang
rsync -c --exclude '$CONFIGFILE $INPFILE $PDBFILE $PSFFILE' * $HOMEDIR
41 23 tjiang
cd $HOMEDIR
42 23 tjiang
43 23 tjiang
# Cleaning up scratch directory and hostfile
44 23 tjiang
rm -fr $SCRATCHDIR