48 lines
1.8 KiB
Bash
Executable File
48 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# script to submit interactive job to mcc05 or mcc06 with 64 cores
|
|
[[ -z "$1" ]] && { echo "You have to supply mcc05 or mcc06" ; exit 1; }
|
|
# 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 1;;
|
|
esac
|
|
fi
|
|
|
|
CURRENT_VERSION=`git describe --tags --long`
|
|
NCORES=${2:-64}
|
|
# version to continue, by default this or the previous version
|
|
CONTINUE_VERSION=${3:-$CURRENT_VERSION}
|
|
if [ ! -f "runs/e2-estia_$CONTINUE_VERSION.run" ]; then
|
|
# get describe from previous version
|
|
echo "No run for revision $CONTINUE_VERSION, try to use previous version"
|
|
PREV_ID=`git log -n 2 --oneline --pretty=format:"%h" | tail -1`
|
|
CONTINUE_VERSION=`git describe --tags --long $PREV_ID`
|
|
fi
|
|
|
|
echo "Starting at `date`"
|
|
echo "Running on hosts: $1"
|
|
echo "Running on $NCORES processors."
|
|
echo "Current working directory is `pwd`"
|
|
echo "Estia GIT revision is $CURRENT_VERSION"
|
|
echo "Continue run of revision $CONTINUE_VERSION"
|
|
|
|
mpirun -np $NCORES --host $1 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`"
|