Running mpiBLAST on the HPCC
Let's assume that we want to run our BLAST query against "nt" using the HPCC BLAST database repository. The first step, will be to break the "nt" sequences up into 16 fragments. Remember, we need to write our fragments into our home, scratch, or research space, since we won't have permissions to write in the HPCC BLAST data directory.
First, lets create a subdirectory in our home space for our work, and load the mpiBLAST module:
We should also create a space for temporary worker fragments:
Next, let's create our .ncbirc file inside our working directory (myBLAST/.ncbirc):
Now lets break the "nt" fasta sequences into fragments using the HPCC database repository:
The command above will break the "nt" sequences (stored in /mnt/research/common-data/Bio/blastdb/FASTA/nt.fa) into 16 fragments, and save the results to the "/mnt/home/mydir/myBLAST" directory with the file prefix "my_nt.fa".
To actually run an MPI simulation on HPCC, you will need to compose your run into a job submission script. The following represents a viable example:
In this example, we are using 18 nodes, 1 core per node, with an allocation of 1GB of memory per process thread (18 total). This is convenient because by splitting up our worker threads to different nodes, we allow ourselves a much wider subset of the universe of compute nodes - that is, it's a lot easier to find a node that has at least 1 core and 1GB available, than it is to find one that has 3 or 6 cores available and 3-6GB of RAM.
Now let's pay closer attention to the command line itself. Here are a few interesting features:
- We are of course, using 18 "nodes" or worker threads "-n 18"
- The blast type we're performing is a "blastn", where we are using our "my_query.fa" file to query against the "nt" database we previously broke up into fragments. Results are written to results.txt.
- The "--use-parallel-wirte" flag enables parallel writing and is a directive to the mpiBLAST program
- Similarly, we can record time profile information to the file "time.txt" using the flag shown above
- The "--removedb" flag can be very useful in conserving disk space, as it will delete those temporary fragments from out "myBLAST/tmp" directory when the job is complete.
There are several other flags available that can be passed to the mpiBLAST program. See the mpiBLAST user documentation for more information.