Making MrBays run on a mulitcore machine

So what makes the excellent phylogenetic program MrBays even better, multicore support!

MrBays itself is pretty easy to install on a linux machine just by following the configure file notes, however I found it a little more tricky to get it to run in multicore mode. Others might find this useful, so I through I would add it to my blog

First download and extract a copy of MrBays and naviage to the /src directory in the terminal.

Install the required libraries
>sudo apt-get install mpich2 libmpich2-dev libmpich2-1.2 libreadline6-dev

Run the following to configure.
>autoconf
>./configure --enable-mpi=yes --with-beagle=no
>make

As beagle is for graphics processors we want to turn that off for a normal PC like system.

Now in your home directory make a file called “.mpd.conf” add this line to the file but change the ‘secretword’ to what ever you like: “MPD_SECRETWORD=<secretword>”

Change the permissions so that only you can read and write
>chmod 700 .mpd.conf

Run the mpd in the background, it shouldn’t complain, but if it does do what it asks.
>mpd &

Now run the program on 6 cores (or how many you have available), stdout will be written to GT.txt, all this will run in the background due to “&”
>mpirun -np 6 mb trimmed_nex.txt > GT.txt &

You can check the progress by opening the output file or just typing:
>tail -f HGT.txt

Done!

Sources
http://matthewvavrek.com/2011/03/19/mrbayes-and-multicore-processors/
http://mrbayes.sourceforge.net/wiki/index.php/FAQ#How_do_I_compile_single-_and_multi-processor_versions_on_SGI_machines.3F

Advertisement