The contents of a basic Sun Grid Engine job file look something like this:
#!/bin/bash
# SGE uses shell script comments that start with "#$" to configure how
# SGE handles the job.
#
# Use the bash shell as the shell for the job:
#$ -S /bin/bash
#
# Write output and error stream to the current working directory:
#$ -cwd
#
# The job command or commands are below:
/apps/bin/blastall -p blastp \
-d /nethome/aleonard/blast/database.fasta \
-i /nethome/aleonard/blast/input.fasta \
-o /nethome/aleonard/blast/output.txt
To use a job file, create a shell script with contents similar to the above (such as “job.sh”), make the script executable (“chmod 755 job.sh”) and submit it to SGE (“qsub job.sh”).
It is important to note that blastall will only be using one processor (the “-a” flag is not used, so it defaults to one CPU). It is generally the best for throughput – getting the most work done in the least amount of time – if you can split your job into many multiple, single-threaded jobs and run those in parallel, as opposed to running one or a few multiple-threaded jobs.
References: N1 Grid Engine 6 User’s Guide, NCBI BLAST Scaling on Sun Fire T2000
Post a Comment