Commit 9e274558 authored by Christian Meesters's avatar Christian Meesters

may now use job reservations

parent 9bf662e2
......@@ -77,6 +77,7 @@ declare -i _arg_runlimit=300
_arg_assoc=$(sacct -nu $USER -o Account | tail -n1)
declare -i _arg_nodes=1
declare _arg_blastmem=1G
declare -i _arg_blast_threads=1
declare -i _arg_splitup_per_queryfile=20
......@@ -96,6 +97,7 @@ print_help ()
printf "\t%s\n" "-p,--partition: queue (default is nodeshort)"
printf "\t%s\n" "-A,--account: queue (default is the last submit account; an error is triggered if none specified nor can be deduced)"
printf "\t%s\n" "-N,--nodes: number of nodes (1 is the default)"
printf "\t%s\n" "--reservation: reservation to use (none is the default)"
printf "\t%s\n" "--time: time in minutes (300 is the default)"
printf "\t%s\n" "-m,--blastmem: memory which is required for blast per instance (1G per default)"
printf "\t%s\n" "-r,--ramdisk: ramdisk size (default is 40 G)"
......@@ -118,7 +120,7 @@ print_help ()
echo "- support for alternate implementations, e.g. BLAT, diamond"
echo "- automatic merging of xml output"
echo "- restart capability to resume work in case of timelimits."
echo "- besser easybuild support (keeping permissions right."
echo "- besser easybuild support (keeping permissions right)."
echo "- issue tracking on a web site."
echo "- beeond support for handling greater references"
echo "- automatic reference database generation in case of version mismatches or similar"
......@@ -133,7 +135,7 @@ credits()
echo "Benjamin Rieger (Institut für Molekulargenetik) contributed a perl implementation"
echo "of a format conform splitting of FASTA files."
echo "The original implemenation was a LSF chain job. It was eventually adopted and maintained by"
echo "Christian Meesters (ZDV, HPC group) until 2017."
echo "Christian Meesters (ZDV, HPC group) from 2017 onwards."
echo "History of the re-implementation:"
echo "- v0.1 -- 27. Sep. 2017 -- release of the re-implementation for SLURM supporting the"
......@@ -141,10 +143,11 @@ credits()
echo "- v0.1.1 -- 19. Oct. 2017 -- bug fix: blast parameters now correctly transferred to"
echo " blast(x)."
echo "- v0.1.2 -- 25. Oct. 2017 -- minor fixes and clarifications"
echo "- v0.2 -- xx. Nov. 2017 -- new features:"
echo "- v0.2 -- xx. Jan. 2018 -- new features:"
echo " - possible to choose between NCBI-BLAST executables"
echo " - better user feedback / self documentation \(at least a start\)"
echo " - error messages are now directed to stderr"
echo " - jobs may use reservations (e.g. for courses)"
echo " changes:"
echo " - deleted default evalue and max_target_seqs settings"
echo " - XML output is mandatory"
......@@ -229,6 +232,16 @@ do
if test "$_val" = "$_key"
test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1
......@@ -390,6 +403,7 @@ JOBTAG="BLAST_${FA}_VS_${DB}"
# TODO: port to M2
### Auto-Adjust the Queue
if [ $_arg_runlimit -le 300 ]; then
if [ "$_arg_queue" != "nodeshort" ]; then
......@@ -504,7 +518,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)) --gres=ramdisk:$_arg_ramdisk -c $_arg_blast_threads $SCRIPT --partition $_arg_queue --account $_arg_assoc --nodes $_arg_nodes --time $_arg_runlimit --blastmem $_arg_blastmem --ramdisk $_arg_ramdisk --threads $_arg_blast_threads --splitup $_arg_splitup_per_queryfile --executable=$_arg_executable $FASTA $DATABASE $BLASTPARAMS"
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)) --gres=ramdisk:$_arg_ramdisk -c $_arg_blast_threads $SCRIPT --partition $_arg_queue --account $_arg_assoc --nodes $_arg_nodes --time $_arg_runlimit --reservation=$_arg_reservation --blastmem $_arg_blastmem --ramdisk $_arg_ramdisk --threads $_arg_blast_threads --splitup $_arg_splitup_per_queryfile --executable=$_arg_executable $FASTA $DATABASE $BLASTPARAMS"
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