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