Getting BEAGLE to run BEAST with more than 1 processor

3,724 views
Skip to first unread message

griffinia

unread,
Dec 13, 2011, 2:56:56 PM12/13/11
to beast-users
I am running BEAST 1.61 with BEAGLE 1.0 on a 32-core OpenSUSE Linux
parallel cluster, with the command line input:

beast -beagle -beagle_CPU -beagle-instances 16 [meaning I am assigning
half the cores to BEAGLE].

The job is running, but when I use the Linux "top" command to see
resource allocation, the program seems to be running only on a single
core. If I look at my output file, I see this in the first lines of
the output before the log likelihood scores:

Using BEAGLE resource 0: CPU

which further leads me to believe that only a single core is being
accessed.

Can anyone suggest what I may be doing wrong?

Marc Suchard

unread,
Dec 14, 2011, 11:23:50 AM12/14/11
to beast-users
I believe the command-line option for multi-core is -
beagle_instances. But, you used the term "cluster" which leads me to
believe that you have a cluster of distributed compute nodes. BEAGLE
currently parallelizes across multiple cores on one compute node
(often: 2, 4, 6, or 8).

Also, try -beagle_SSE for little extra bang for your buck (see, Ayres
et al., in press, Syst Biol).

griffinia

unread,
Dec 14, 2011, 9:06:20 PM12/14/11
to beast-users
Yes, Marc, my typing of "beagle-instances" was a typo. And thought I
did say cluster, our parallel processing unit is a single machine with
eight 4-core processors.

Alan

griffinia

unread,
Dec 15, 2011, 3:51:33 PM12/15/11
to beast-users
Marc,

So, any idea why BEAGLE isn't using more than 1 core?

Thanks,
Alan,

On Dec 14, 11:23 am, Marc Suchard <msuch...@gmail.com> wrote:

Shengting Li

unread,
Aug 1, 2012, 5:43:57 AM8/1/12
to beast...@googlegroups.com
I'm not sure. But I guess maybe it's already using multi-cores.
How many lines of "Using BEAGLE resource 0: CPU" do you get? 
When I use "-beagle_instances 2" I get 2 lines of "Using BEAGLE resource 0: CPU".
When I use "-beagle_instances 3" I get 3 lines of "Using BEAGLE resource 0: CPU".

I don't know what's this meaning. 

Andrew Rambaut

unread,
Aug 1, 2012, 6:51:29 AM8/1/12
to beast...@googlegroups.com
Each BEAGLE instance will be run in a separate thread and thus can be on different cores (whether or not they are will depend on the OS scheduler and how mucb other stuff is going on). BEAGLE only sees the CPU as a single resource so it won't tell you that it is running on different cores.

Andrew
> --
> You received this message because you are subscribed to the Google Groups "beast-users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/beast-users/-/SdjB3RC_nX8J.
> To post to this group, send email to beast...@googlegroups.com.
> To unsubscribe from this group, send email to beast-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beast-users?hl=en.

Andrew Rambaut

unread,
Aug 3, 2012, 4:16:10 AM8/3/12
to beast...@googlegroups.com
On Mac or Linux the easiest way is to open a terminal window and use the command 'top'. If you look in the 'cpu' column you will see the percentage of a CPU the task is using - <100% means one core, 100%-200% means two cores etc. 

On Mac there is also Activity Monitor app which can show the same info.

On Windows I have no idea but I imagine there will be something similar.

Best,
Andrew

On 2 Aug 2012, at 00:54, Bojian ZHONG <bjz...@gmail.com> wrote:

Hi Andrew,

Just wondering how to check whether BEAGLE is running on different cores?

Cheers,

Bojian


> To unsubscribe from this group, send email to beast-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beast-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/beast-users/-/90EiPXf7Q5MJ.

genevieve....@gmail.com

unread,
Jun 5, 2014, 11:42:19 AM6/5/14
to beast...@googlegroups.com
Dear Beasties,

My research team has recently installed BEAST 2 and BEAGLE on a CPU 64 core computer running Linux. We are encountering the same issue with regards to the number of cores that are being using by BEAST - this remains at 1 despite using the instances command as griffinia specified in 2011. Has anyone found a solution to this problem?

Any advice would be VERY much appreciated.

Thanks!
Gen
> To unsubscribe from this group, send email to beast-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beast-users?hl=en.

Remco Bouckaert

unread,
Jun 5, 2014, 9:37:18 PM6/5/14
to beast...@googlegroups.com
Dear Gen,

The beagle_instances flag appears to be ignored in BEAST 2 (not quite sure why this happens). To use multiple processors, you can use the ThreadedTreelikelihood from the BEASTLabs package, or set useThreads='true' on CompoundDistributions, especially the one with ID="likelihood". When you run BEAST with more than one threads it should use multiple cores.

For more details, see
http://www.beast2.org/wiki/index.php/Performance_Suggestions#ThreadedTreelikelihood

Cheers,

Remco

Remco Bouckaert

unread,
Jun 5, 2014, 10:42:43 PM6/5/14
to beast...@googlegroups.com


On Friday, June 6, 2014 1:37:18 PM UTC+12, Remco Bouckaert wrote:
The beagle_instances flag appears to be ignored in BEAST 2 (not quite sure why this happens).

Using both beagle-instance and threads flags  ensures BEAST uses multiple cores using BEAGLE, like so:

beast -beagle_instances 2 -threads 2

When the beagle-instance flag is set, but the threads flag is not, only a single thread is used and only one BEAGLE instance is created.

Remco

Andrew Rambaut

unread,
Jun 6, 2014, 5:28:55 AM6/6/14
to beast...@googlegroups.com
In BEAST 1.8 the -threads option should generally only be used to restrict the number of threads.
The default is to use an auto-sizing thread pool to let the system decide how many threads to have (probably as
many as there are partitions). 

The other options are:

-threads 0 Turn off multithreading and do everything in a strictly sequential manner (this can be used as a benchmark).
-threads 1 Likelihood calculations in a single thread but still uses the thread pool (to test threading overhead).
-threads N Restrict the number of threads to N. This is useful to restrict BEAST to only using a share of a multicore system.

-threads -1 The same as not specifying the option, i.e., autosizing thread pool.

Perhaps BEAST 2 could use the same protocol?

Andrew

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.

To post to this group, send email to beast...@googlegroups.com.

Andrew Rambaut 
Institute for Evolutionary Biology | Centre for Infection, Immunity & Evolution 
Ashworth Laboratories, University of Edinburgh, Edinburgh, EH3 9JT, UK


Reply all
Reply to author
Forward
0 new messages