Difference between revisions of "Mrbayes-software"

From Earlham CS Department
Jump to navigation Jump to search
Line 1: Line 1:
 
The CCG supports MrBayes on the Cairo (PowerPC) and BobSCEd (quad core Xeon) clusters.  The software is installed in <code>/cluster/{cairo, bobsced}/bin/mb</code>.  Both versions are built with the Message Passing Interface (MPI) libraries enabling parallel runs using up to 4 cores.  Scaling beyond 4 tasks is limited by the software's architecture.  One way around this limitation is to break your large runs into groups of 4.   
 
The CCG supports MrBayes on the Cairo (PowerPC) and BobSCEd (quad core Xeon) clusters.  The software is installed in <code>/cluster/{cairo, bobsced}/bin/mb</code>.  Both versions are built with the Message Passing Interface (MPI) libraries enabling parallel runs using up to 4 cores.  Scaling beyond 4 tasks is limited by the software's architecture.  One way around this limitation is to break your large runs into groups of 4.   
 
<b>N.B.</b> Currently MrBayes is only available on Cairo, the BobSCEd version is being upgraded.
 
  
 
Both versions of MrBayes, Cairo and BobSCEd, are built with the LAM MPI libraries.  While this improves the performance of MrBayes somewhat over other MPI bindings it does make the running of parallel jobs slightly more complicated.   
 
Both versions of MrBayes, Cairo and BobSCEd, are built with the LAM MPI libraries.  While this improves the performance of MrBayes somewhat over other MPI bindings it does make the running of parallel jobs slightly more complicated.   
Line 8: Line 6:
  
 
=== Cairo ===  
 
=== Cairo ===  
 
 
Copy and paste these commands, replacing the name of the MrBayes input file with your own, in to a file.  The <code>vi</code> and <code>emacs</code> editors are both available on the Cairo nodes.
 
Copy and paste these commands, replacing the name of the MrBayes input file with your own, in to a file.  The <code>vi</code> and <code>emacs</code> editors are both available on the Cairo nodes.
  
Line 21: Line 18:
 
You will also need a <code>lam-hosts.def</code> file listing the cluster nodes you want to run your jobs on.  Remember that the node you start the job on (<code>c4</code> in this example) must be listed in the <code>lam-hosts.def</code> file.
 
You will also need a <code>lam-hosts.def</code> file listing the cluster nodes you want to run your jobs on.  Remember that the node you start the job on (<code>c4</code> in this example) must be listed in the <code>lam-hosts.def</code> file.
  
 +
<code>
 +
c4 cpu=2 <br>
 +
c5 cpu=2 <br>
 +
</code>
  
 
+
Once these two files and your MrBayes input file are ready you can run job in the background with the command:
are You can run the script file in the background with the command:
 
  
 
<code>
 
<code>
Line 29: Line 29:
 
</code>
 
</code>
  
Sample script
+
There are sample scripts and MrBayes input files in <code>/cluster/home/charliep/mb-test-cairo</code>.  Note near the end of the MrBayes input file <code>Hybrid_Bayesian.txt</code>, the <code>mcmcp</code> command has an option for <code>nchains</code>, this should be set to 4 in your input file per the information above.
  
watching with ps
+
You can use the <code>top</code> command to see if your program is running.  'q' exits <code>top</code>.  The data set and analysis described in <code>Hybrid_Bayesian.txt</code> takes about N days to run on 4 Cairo cores.
 
 
 
 
Other useful commands:
 
$ lamnodes # displays the hosts in your LAM world
 
 
 
 
 
 
 
 
 
Sample command lines
 
  
 
=== BobSCEd ===
 
=== BobSCEd ===
 +
<b>N.B.</b> Currently MrBayes is only available on Cairo, the BobSCEd version is being upgraded.

Revision as of 00:18, 31 January 2008

The CCG supports MrBayes on the Cairo (PowerPC) and BobSCEd (quad core Xeon) clusters. The software is installed in /cluster/{cairo, bobsced}/bin/mb. Both versions are built with the Message Passing Interface (MPI) libraries enabling parallel runs using up to 4 cores. Scaling beyond 4 tasks is limited by the software's architecture. One way around this limitation is to break your large runs into groups of 4.

Both versions of MrBayes, Cairo and BobSCEd, are built with the LAM MPI libraries. While this improves the performance of MrBayes somewhat over other MPI bindings it does make the running of parallel jobs slightly more complicated.

The difference between LAM and other MPI bindings is that you need to start the LAM world before running the parallel program, and then shut it down when the parallel program is complete. The simplest way to accomplish this is with a small shell script.

Cairo

Copy and paste these commands, replacing the name of the MrBayes input file with your own, in to a file. The vi and emacs editors are both available on the Cairo nodes.

!#/bin/bash
lamwipe # stops LAM (if it's running) lamboot -v lambhosts.def # starts LAM with the hosts listed in lambhosts.def
mpirun -np 4 /cluster/cairo/bin/mb # starts mb on four cores
lamwipe # stops LAM

You will also need a lam-hosts.def file listing the cluster nodes you want to run your jobs on. Remember that the node you start the job on (c4 in this example) must be listed in the lam-hosts.def file.

c4 cpu=2
c5 cpu=2

Once these two files and your MrBayes input file are ready you can run job in the background with the command:

c4$ nohup ./this-run.sh &

There are sample scripts and MrBayes input files in /cluster/home/charliep/mb-test-cairo. Note near the end of the MrBayes input file Hybrid_Bayesian.txt, the mcmcp command has an option for nchains, this should be set to 4 in your input file per the information above.

You can use the top command to see if your program is running. 'q' exits top. The data set and analysis described in Hybrid_Bayesian.txt takes about N days to run on 4 Cairo cores.

BobSCEd

N.B. Currently MrBayes is only available on Cairo, the BobSCEd version is being upgraded.