Skip to content

Commit

Permalink
Refs #1 appeding runs in Titan
Browse files Browse the repository at this point in the history
  • Loading branch information
jmborr committed Jul 5, 2017
1 parent 1b82e87 commit e8cd153
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
17 changes: 15 additions & 2 deletions confinedBSA.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"metadata": {
"name": "",
"signature": "sha256:ef7345964cc06b385cc7928593141d314816b906ac38ec526f8c5b4e6c052ab0"
"signature": "sha256:7efccddce4926f586126358e699b2fb57192002e42928bc6941c7d22a455cecf"
},
"nbformat": 3,
"nbformat_minor": 0,
Expand Down Expand Up @@ -528,7 +528,20 @@
"gmx mdrun -ntmpi 16 -ntomp 1 -pin on -deffnm equil_1\n",
"</code>\n",
"\n",
"<center><a href=\"files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/wholesystem/minimize.gif\"><img src=\"files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/wholesystem/minimize.gif\" width=\"250\"></a> [minimize.vmd](files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/onlysilica/minimize.vmd) </center> "
"<center><a href=\"files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/wholesystem/minimize.gif\"><img src=\"files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/wholesystem/minimize.gif\" width=\"250\"></a> [minimize.vmd](files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/onlysilica/minimize.vmd) </center> \n",
"\n",
"The 2ns relaxation at NPT (<code>relax_2</code>) proved insufficiently long since the pressure became negative in the <code>equil_1</code> run. Thus, we extend the simulation for 10ns in Titan by appending 1ns jobs. For this we need to transfer to Titan all files <code>relax_2.*</code> and the following \n",
"\n",
"- create soft link <code>ln -s relax_2.tpr relax_2.0.tpr</code>\n",
"- template submission script [relax_2.extend.tpl](files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/wholesystem/relax_2.extend.tpl)\n",
"- substitution script: [relax_2.submitnext.sh](files/simulation/silica/cristobalite/confineBSA/poretop/yesbonds/wholesystem/relax_2.submitnext.sh)\n",
"\n",
"In Titan, we just run the substitution script by passing as argument the number of the firs run: \n",
"<code>./relax_2.submitnext.sh 0</code> \n",
"Will trigger submission of the first nanosecond, followed by 9 more runs up to a total of 10ns\n",
"\n",
"\n",
"\n"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
#PBS -q batch
#PBS -A MAT049
#PBS -N q0.90_ovl1.5
#PBS -j oe
#PBS -l nodes=4
#PBS -l walltime=02:00:00
#PBS -l gres=atlas1%atlas2

export CRAY_CUDA_MPS=1
source $MODULESHOME/init/bash
module load gromacs/5.1.0

# iteration control
extratime=1000 # extend simulations by this much (in picoseconds)
last=10 # no more than these simulations
prev=_PREV_
curr=$(($prev + 1))

cd $PBS_O_WORKDIR
# Extend the run
aprun -n 1 gmx_mpi convert-tpr -s relax_2.${prev}.tpr -extend $extratime -o relax_2.${curr}.tpr
# 8 MPI ranks per node, each one tied to 2 openMP threads
aprun -n 32 -N 8 -d 2 gmx_mpi mdrun -ntomp 2 -gpu_id 00000000 -s relax_2.${curr}.tpr -cpi relax_2.cpt -deffnm relax_2 -append

# submit next job
if [ $curr -eq $last ];
then
echo "last simulation done"
exit
fi
./relax_2.submitnext.sh $curr # submit next job

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
if [ -z "$1" ];
then
echo "need to pass a number as argument"
exit 1
fi
sed -e "s/_PREV_/$1/g" relax_2.extend.tpl > relax_2.extend.pbs
qsub relax_2.extend.pbs

0 comments on commit e8cd153

Please sign in to comment.