Commit 1c4fe802 authored by Christian Meesters's avatar Christian Meesters

added ramdisk size inference to hot fix

parent 879e5f51
......@@ -293,23 +293,6 @@ do
fi
_arg_blastparams="$_val"
;;
-r*|--ramdisk|--ramdisk=*)
_val_from_long="${_key##--ramdisk=}"
_val_from_short="${_key##-r}"
if test "$_val_from_long" != "$_key"
then
_val="$_val_from_long"
elif test "$_val_from_short" != "$_key" -a -n "$_val_from_short"
then
_val="$_val_from_short"
else
test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1
_val="$2"
shift
fi
_arg_ramdisk="$_val"
[[ $_arg_ramdisk != *"G"* ]] && _arg_ramdisk=$_arg_ramdisk"G"
;;
-t*|--threads|--threads=*)
_val_from_long="${_key##--threads=}"
_val_from_short="${_key##-t}"
......@@ -503,6 +486,9 @@ if [ -z $BLASTEXE ] && [[ $_arg_test == "off" ]]; then
exit
fi
### which is the reference directory size?
_arg_ramdisk=$(du -shL --block-size=1M &quot;$_arg_reference&quot; | cut -f1 )M</pre>
### setup variable for THIS script; giving absolute path if necessary
SCRIPT="$0"
......@@ -555,7 +541,7 @@ EOF
### check if this script is on node by checking env-variable $SLURM_JOB_ID, else send it to SLURM with given parameters and exit
if [ -z "$SLURM_JOB_ID" ]; then
submit_call="sbatch --no-requeue -o ${JOBTAG}_%j.out -J $JOBTAG -p $_arg_queue -A $_arg_assoc -t $_arg_runlimit -N $_arg_nodes -n $((64 * $_arg_nodes / $_arg_blast_threads)) --mem=$_arg_mem --gres=ramdisk:$_arg_ramdisk -c $_arg_blast_threads --reservation=$_arg_reservation $SCRIPT --partition $_arg_queue --account $_arg_assoc --nodes $_arg_nodes --time $_arg_runlimit --reservation=$_arg_reservation --ramdisk $_arg_ramdisk --threads $_arg_blast_threads --splitup $_arg_splitup_per_queryfile --blastparams=\"$BLASTPARAMS\" --executable=$_arg_executable $FASTA $DATABASE"
submit_call="sbatch --no-requeue -o ${JOBTAG}_%j.out -J $JOBTAG -p $_arg_queue -A $_arg_assoc -t $_arg_runlimit -N $_arg_nodes -n $((64 * $_arg_nodes / $_arg_blast_threads)) --mem=$_arg_mem --ramdisk=${_arg_ramdisk} -c $_arg_blast_threads --reservation=$_arg_reservation $SCRIPT --partition $_arg_queue --account $_arg_assoc --nodes $_arg_nodes --time $_arg_runlimit --reservation=$_arg_reservation --ramdisk $_arg_ramdisk --threads $_arg_blast_threads --splitup $_arg_splitup_per_queryfile --blastparams=\"$BLASTPARAMS\" --executable=$_arg_executable $FASTA $DATABASE"
if [[ $_arg_test == "on" ]]; then
echo "Just testing - this command would be submitted:"
echo $submit_call
......
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