Continue run

This commit is contained in:
2018-09-09 01:51:33 +02:00
parent e630bd319a
commit 7a786236c6
6 changed files with 56 additions and 0 deletions

32
cbatch.tsh Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env tcsh
#SBATCH -J mcnpEstia
#SBATCH -N 2
#SBATCH --ntasks-per-node=24
#SBATCH --time=48:00:00
#SBATCH --mail-type=fail
#SBATCH --mail-user=artur.glavic@psi.ch
#SBATCH -o tmp/stdout.log
#SBATCH -e tmp/stderr.log
#SBATCH --partition=ll_verylong
setenv CURRENT_VERSION $1
setenv CONTINUE_VERSION $2
#"`/usr/bin/git describe --tags --long`"
echo "Starting continue of run $CONTINUE_VERSION at `date`"
echo "Running on hosts: $SLURM_NODELIST"
echo "Running on $SLURM_NNODES nodes."
echo "Running on $SLURM_NPROCS processors."
echo "Current working directory is `pwd`"
echo "Estia GIT revision is $CURRENT_VERSION"
mpirun -np $SLURM_NPROCS mcnp6.mpi c \
inp=crun.i outp=results/e2-estia_$CURRENT_VERSION.out \
runtpe=runs/e2-estia_$CONTINUE_VERSION.run \
mctal=results/e2-estia_$CURRENT_VERSION.mct \
mdata=results/e2-estia_$CURRENT_VERSION.mdt \
wwout=weight_windows/e2-estia_$CURRENT_VERSION.wwg \
wwone=weight_windows/e2-estia_$CURRENT_VERSION.wwo \
wwinp=weight_windows/current.wwg
echo "Program finished with exit code $? at: `date`"

2
crun.i Normal file
View File

@@ -0,0 +1,2 @@
CONTINUE
nps 1e7

22
csubmit Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# make sure the tag for the generated files is correct
# by checking that all changes have been commited to GIT
# (this does not include newly created files)
if ( ! git diff-index --quiet --cached HEAD -- ) || ( ! git diff-files --quiet )
then
echo "Uncommitted changes in the GIT repository:"
git status --untracked-files=no
read -p "Add changes and commit, amend last commit or exit [c/a/e]: " res
case $res in
[Cc]* ) git commit -a;;
[Aa]* ) git commit -a --amend;;
* ) exit;;
esac
fi
sbatch cbatch.tsh "`/usr/bin/git describe --tags --long`" $1
# waiting for batch job to start and send all output directly to terminal
sleep 2
tail -qf tmp/stdout.log tmp/stderr.log

Binary file not shown.

Binary file not shown.

Binary file not shown.