Commit 9549d2c6 authored by Christian Meesters's avatar Christian Meesters
Browse files

Merge branch 'devel' of gitlab.rlp.net:hpc-jgu-physics-simulations/ab-initio-simulations into devel

parents 92a89bcd cf80109c
......@@ -236,15 +236,15 @@ fi
if [ -z "$SLURM_JOB_ID" ]; then
for sample in "${_arg_inputdir}"*.gjf; do
### infer job tag
if [ -z "$_arg_tag" ]; then
# if [ -z "$_arg_tag" ]; then
# remove the suffix from the sample name
samplename=$(basename ${sample})
_arg_tag="ORCA_sim_on_${samplename/.gjf/}_%j"
fi
# fi
_arg_outdir="$(pwd)/${_arg_tag/_\%j/}"
### check if output directory already exists
if [[ ! -d "${_arg_outdir// }" ]]; then
_arg_outdir="$(pwd)/${_arg_tag/_\%j/}"
mkdir -p "${_arg_outdir}"
else
error "${_arg_outdir// } exists already! Possibly over overwrite of results. Cowardly giving up."
......@@ -253,7 +253,19 @@ if [ -z "$SLURM_JOB_ID" ]; then
# TODO check scalability and time constraints
if [ "$cluster" = "mogon2" ]; then
queue="parallel"
tasks=40
cpus=40
autoscaler=2
atoms=$(sed -n '/\*/,/\*/p' $sample | egrep -v '\*' | wc -l)
# cpus=$(( autoscaler* atoms / cpus * cpus))
cpuspertask=2 # don't use threads as mpi-rank
# tasks=$(( autoscaler* atoms / cpus * cpus / cpuspertask ))
tasks=$(( autoscaler* atoms /cpus * cpus/cpuspertask))
pernode=$(( cpus/cpuspertask ))
nodes=$(( tasks/pernode ))
echo -n "automatic scaling for sample $samplename via $autoscaler*#atoms ($atoms) suggests: "
echo "$(( autoscaler* atoms / cpus * cpus)) processes"
echo "apllying autoscaler to input-file"
sed -i "s/nproc.*$/nprocs $tasks/" $sample
else
queue="nodeshort"
tasks=64
......@@ -261,7 +273,8 @@ if [ -z "$SLURM_JOB_ID" ]; then
#TODO: check sensible time constraint
# saving standard settings
submit_statement="sbatch -A ${_arg_assoc} -p ${queue} -J ${_arg_tag} -o ${_arg_outdir}/${samplename%%.*}_%j.log -n $tasks -t 120:00:00 --signal=B:SIGUSR2@600 -N 1"
# submit_statement="sbatch -A ${_arg_assoc} -p ${queue} -J ${_arg_tag} -o ${_arg_outdir}/${samplename%%.*}_%j.log -n $tasks -t 120:00:00 --signal=B:SIGUSR2@600 -N 1"
submit_statement="sbatch -A ${_arg_assoc} -p ${queue} -J ${_arg_tag} -o ${_arg_outdir}/${samplename%%.*}_%j.log -n $tasks -c $cpuspertask -t ${_arg_runlimit} --signal=B:SIGUSR2@600 -N ${nodes}"
$submit_statement --wrap "$(cat << EOF
cleanup(){
......@@ -274,9 +287,9 @@ if [ -z "$SLURM_JOB_ID" ]; then
sbcast $sample "\$scratch"/\$(basename $sample)
# Go to jobdir and start the program
cd /localscratch/\${SLURM_JOB_ID}
set OMPI_MCA_btl=self,sm,openib
export RSH_COMMAND=ssh
#eval \$(which orca) "\$scratch"/\$(basename $sample)
$EBROOTORCA/orca "\$scratch"/\$(basename $sample)
$EBROOTORCA/orca "\$scratch"/\$(basename $sample) "-np \${SLURM_NTASKS} -npernode \${PERNODE} --verbose"
cleanup
EOF
)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment