Commit 5418200c authored by Christian Meesters's avatar Christian Meesters

bug fix to blast - infering ramdisk and tests

parent 1c4fe802
# easyconfigfile for the ZDV taskfarm script
name = 'parallel_BLAST'
version = '0.3'
version = '0.3.2b'
homepage = ''
......@@ -15,8 +15,11 @@ module purge
module load tools/parallel
# load the most current version of BLAST +
module load bio/BLAST+
# inherently loaded is python
#module load bio/BLAST+ # do not rely on most recent version
module load bio/BLAST+/2.7.1-foss-2018a
module load lang/Python/3.6.4-foss-2018a
......@@ -487,7 +490,7 @@ if [ -z $BLASTEXE ] && [[ $_arg_test == "off" ]]; then
### which is the reference directory size?
_arg_ramdisk=$(du -shL --block-size=1M &quot;$_arg_reference&quot; | cut -f1 )M</pre>
_arg_ramdisk=$(du -shL --block-size=1M "$_arg_database" | cut -f1 )M
### setup variable for THIS script; giving absolute path if necessary
......@@ -541,7 +544,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 --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 --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
......@@ -650,6 +653,7 @@ cmd=$PWD/
rm -f $cmd
echo '#!/bin/bash' > $cmd
#echo 'sleep 300' >> $cmd
#echo 'set -x' >> $cmd
echo 'module load bio/BLAST+' >> $cmd
#echo 'echo $(pwd)' >> $cmd
......@@ -665,7 +669,7 @@ printf "$BLASTEXE -num_threads $SLURM_CPUS_PER_TASK -db $DATABASE $BLASTPARAMS "
echo '-query $1 -out $tmp_out' >> $cmd
# marks the end of this run
echo 'END_BLAST=$(date +%s.%N)' >> $cmd
echo 'elapsed=$(bc <<< "scale=1; (($END_BLAST-$START_BLAST))/60")' >> $cmd
echo 'elapsed=$(bc <<< "scale=1; ((END_BLAST-START_BLAST))/60")' >> $cmd
echo 'echo \"Elapsed: \"$elapsed' >> $cmd
# compress, when done
echo 'gzip $tmp_out' >> $cmd
......@@ -683,10 +687,7 @@ trap "rm -f $cmd" EXIT
#HOSTLIST=$(scontrol show hostname $SLURM_JOB_NODELIST | paste -d, -s )
#parallel --controlmaster --workdir --sshdelay 0.2 $PWD -S $HOSTLIST -j $(($SLURM_JOB_NUM_NODES*$SLURM_CPUS_ON_NODE/$SLURM_CPUS_PER_TASK)) --env run_blast run_blast ::: $(find -type f -name 'group*.fasta')
mem_per_process=$((SLURM_MEM_PER_NODE / task_cpus))
srun="srun --cpu-bind=q --mem-bind=q -n 1 -N1 --exclusive -c $SLURM_CPUS_PER_TASK --jobid $SLURM_JOBID --mem-per-cpu=$((SLURM_MEM_PER_NODE / task_cpus))"
srun="srun --cpu-bind=q --mem-bind=q -n 1 -N1 --exclusive -c $SLURM_CPUS_PER_TASK --jobid $SLURM_JOBID --mem-per-cpu=$((SLURM_MEM_PER_NODE / SLURM_CPUS_ON_NODE))"
parallel="parallel --no-notice -j $SLURM_NTASKS -P $SLURM_NTASKS "
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