Re: Fw:Re: Finding Beagle library

6,792 views
Skip to first unread message

Kai He

unread,
Feb 21, 2013, 12:39:28 AM2/21/13
to beast...@googlegroups.com
Hi everyone, 

I'm reposting it, because I still have beagle library problem.


Error messege from BEAST: 

BEAGLE resources available:

Failed to load BEAGLE library: no hmsbeagle-jni in java.library.path

Hardware: GT555M
OS system: windows7 x64 home edition.

Adding the beagle path "C:\Program Files (x86)\Common Files\libhmsbeagle-1.0" to "Path" (and restart the OS) didn't help...
Copying all the files to Java bin library (and restart) didn't help...
Modify and use the beast.cmd (java -Xms64m -Xmx256m -Djava.library.path="C:\Program Files\(x86)\Common Files\libhmsbeagle-1.0" -jar "%BEAST_LIB%/beast.jar" %*) in the bin folder didn't help...
Installing CUDA 5 toolkit,SDK didn't help...


I should mention Beagle did work last time after I re-installing OS. 
This time, I installed the same OS, same driver etc.. I couldn't figure out what I did was wrong this time... 

Any suggestion will be really appreciated... 

Thanks a lot!!

Kai He








-------- Forwarding messages --------
From: cmh <cryst...@gmail.com>
Date: 2012-10-01 14:29:04
To: beast...@googlegroups.com
Subject: Re: Finding Beagle library
Hello,

I am getting the same error on multiple computers. I am running Windows Vista Enterprise, 32 bit, Windows 7 Home Premium, 64 bit and Windows Server 2008 R2 Standard, 64 bit. I searched my computer for hmsbeagle-jni, but couldn't find it. Unfortunately, aside from the trial version, I do not have access to Visual Studio Pro. Any further info will be greatly appreciated! Thanks.

-Crystal

On Tuesday, August 21, 2012 3:58:08 AM UTC-7, Eleanor wrote:
Hi,

I'm sure this is a very basic problem but it's prevented me from getting any further. I've installed the new (1.7.3) version of Beast and want to run it with Beagle. They both seem to have installed fine and Beast looks like it is running ok, but I get the error "Failed to load BEAGLE library: no hmsbeagle-jni in java.library.path" when trying to open the Beagle library. Any thoughts?

Thanks,

Eleanor

--
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/-/AlrvaaUsVjIJ.
To post to this group, send email to beast...@googlegroups.com.
To unsubscribe from this group, send email to beast-users+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beast-users?hl=en.




Sam Mech

unread,
Jul 9, 2013, 11:32:27 AM7/9/13
to beast...@googlegroups.com
Hi guys,

I have the same ptoblem even under vista OS 32 bit or under XP. Please is there any solution?

thanks in advance
Sam

Alexandre De Bruyn

unread,
Jul 15, 2013, 2:27:26 AM7/15/13
to beast...@googlegroups.com
Same problem here,

With a Windows 7 Pro 64bits and a Linux Mint distribution.

Installation works fine (it seems) but Beast doesn't find hms-beagle.jni.

Any thoughts?

Martyna

unread,
Aug 5, 2013, 10:20:41 PM8/5/13
to beast...@googlegroups.com
Hi,
I've been trying all these things as well and nothing.
My Beagle works with GUI BEAST but not with the command prompt version (which I would really like it to work with).

I realize there are other threads about these problems, but the explanation there either don't seem to work for us or I don't know how to implement them. The problem seem to be quite common.

I would be really grateful for some help.

Martyna

Andrew Rambaut

unread,
Aug 6, 2013, 6:21:47 AM8/6/13
to beast...@googlegroups.com
What OS are you running?

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.
Visit this group at http://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kath O'Reilly

unread,
Aug 20, 2013, 4:29:27 PM8/20/13
to beast...@googlegroups.com
Using the command line it has been suggested to use 

java -Djava.library.path="C:\Program Files (x86)\Common Files\libhmsbeagle-1.0" -jar "/BEAST175/lib/beast.jar"

which should force Beast to look in the location of where the Beagle library is installed.

Kath O'Reilly

Tsai Kun-Chan

unread,
Aug 28, 2013, 11:04:51 PM8/28/13
to beast...@googlegroups.com
Dear Kath,

I have followed your direction in command line under win 8system, and successfully activated BEAST.

However, "Failed to load BEAGLE library: no hmsbeagle-jni in java.library.path" still shows on the screen.

It seems that this method fails again due to the lost connection between java and BEAGLE.

KC

Kath O'Reilly於 2013年8月21日星期三UTC+8上午4時29分27秒寫道:

Gehara

unread,
Sep 8, 2013, 9:55:38 AM9/8/13
to beast...@googlegroups.com
Dear Kun-Chan

Try installing the latest version of Java SE Development kit.
That solved the problem in my case.

Gehara

Ben Hartridge

unread,
Oct 7, 2013, 7:03:18 AM10/7/13
to beast...@googlegroups.com
I had this exact problem today, and the worst thing was that a couple of months ago I had BEAST working with Beagle just fine on this machine.

Turns out that when I had first installed Beagle, the only JDK on the machine was the 64-bit version.  I'd since uninstalled it, and even though java.exe from the 32-bit JDK reported "C:\Program Files (x86)\Common Files\libhmsbeagle-1.0" in its java.library.path, Beagle couldn't talk to the JRE.  I re-installed the 64-bit JRE, and BEAST can load Beagle and is working properly.

BEAST+Beagle is now churning through my work 8.9 times quicker than on straight CPU, which will save a week of runtime.

Julien

unread,
Dec 10, 2013, 8:06:42 AM12/10/13
to beast...@googlegroups.com
Hi all,

I spent all day yesterday looking on internet to find how to fix the " no hmsbeagle-jni" issue.
I finally followed the exact recomandation of Ben: installing the 64-bit JRE (you can find it here: http://www.oracle.com/technetwork/java/javase/system-configurations-135212.html)
and it solved the problem.

I am now also experimenting the BEAGLE speed up.

Hope that will help

Best

Julien

Andrew Rambaut

unread,
Dec 10, 2013, 8:54:03 AM12/10/13
to beast...@googlegroups.com
We very recently discovered an issue  that prevented BEAST from finding the BEAGLE library on 32-bit Windows systems. We have fixed it (it is an issue with BEAST, not BEAGLE) but in the meantime a workaround is to make a copy of "hmsbeagle32.dll” (in Program Files\Common Files\libhmsbeagle) and name it "hmsbeagle-jni.dll”.

Andrew



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


cmh

unread,
Dec 30, 2013, 5:42:38 PM12/30/13
to beast...@googlegroups.com
Hello all,

I am running Windows 8.1, and even though I had JRE7 installed, I took Gehara's advice and downloaded Java SE Developmental Kit 7 and BEAGLE now works with BEAST:

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

After many failed attempts of getting BEAGLE to work, despite correct loading of OpenCL and NVIDIA drivers, I now have a functional BEAST-BEAGLE test run:

BEAGLE resources available:
0 : CPU
    Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_SSE VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU


1 : GeForce GT 750M
    Global memory (MB): 2048
    Clock speed (Ghz): 0.97
    Number of cores: 384
    Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_CUDA


2 : Intel(R) HD Graphics 4600 (OpenCL 1.2 )
    Global memory (MB): 1784
    Clock speed (Ghz): 0.40
    Number of multiprocessors: 20
    Flags: PRECISION_SINGLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_OPENCL


3 : Intel(R) Core(TM) i7-4702HQ CPU @ 2.20GHz (OpenCL 1.2 )
    Global memory (MB): 16287
    Clock speed (Ghz): 2.20
    Number of multiprocessors: 8
    Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_OPENCL


4 : GeForce GT 750M (OpenCL 1.1 CUDA 6.0.1)
    Global memory (MB): 2048
    Clock speed (Ghz): 0.97
    Number of multiprocessors: 2
    Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_OPENCL

Richard Broughton

unread,
Jan 9, 2014, 10:22:05 AM1/9/14
to beast...@googlegroups.com
I am having the same problem described in this thread but on Ubuntu 12.10: message "Failed to load BEAGLE library: no hmsbeagle-jni in java.library.path".  I note that hmsbeagle-jni.so and hmsbeagle.jni.sa are in the Beagle folders in my home directory.  Cuda toolkit and Beagle pass all tests.  I installed openjdk-7 as indicated by the Beagle install instructions (it actually says openjdk-6).  People seem to be getting results using the Oracle jdk and as far as I can tell you just installed it over working versions of Beagle/Beast.  Did everything just work or did Beagle need to be re-compiled?

Thanks,
Rich    

Richard Broughton

unread,
Jan 10, 2014, 10:14:03 AM1/10/14
to beast...@googlegroups.com
I am having this same problem on Ubuntu 12.10.  CUDA and Beagle pass all tests but I get the error message from Beast: Failed to load BEAGLE library: no hmsbeagle-jni in java.library.path.  I installed openjdk7 as instructed by Beagle.  Any suggestions would be appreciated.
Thanks!
Rich Broughton

陈大嵩

unread,
Nov 23, 2014, 3:42:40 AM11/23/14
to beast...@googlegroups.com
You are quite RIGHT !!!

在 2013年12月31日星期二UTC+8上午6时42分38秒,cmh写道:

John Damm Sørensen

unread,
Jul 3, 2015, 11:24:14 AM7/3/15
to beast...@googlegroups.com
The solution to this problem is to use the LD_LIBRARY_PATH environment variable. Relying onthe  -Djava.library.path option only reveals another problem with the CPU dependant libraries.

To get everything working get the very latest release of Beagle-lib. I had an older one that didn't build  hmsbeagle-jni.so.

Once unpacked make sure you have access to JDK 1.7 or later (I used 1.7.0_55)

Then run autogen.sh followed by ./configure --prefix=/tools/opt/beagle-lib/ where prefix is where you want to install beagle-lib.

The configure script will complain if it can't find the java compiler which means you haven't set up your environment correctly. You may specify the top directory of your JDK installation with the configure option  --with-jdk=PATH-TO-JDK.

Once configure runs without complaining about JDK (javac) run:
make
make install

Check that you have at least these file in the  /tools/opt/beagle-lib/lib folder:
libhmsbeagle-cpu.la             libhmsbeagle-jni.la
libhmsbeagle-cpu.so             libhmsbeagle-jni.so
libhmsbeagle-cpu.so.21          libhmsbeagle.la
libhmsbeagle-cpu.so.21.0.0      libhmsbeagle.so
libhmsbeagle-cpu-sse.la         libhmsbeagle.so.1
libhmsbeagle-cpu-sse.so         libhmsbeagle.so.1.1.1
libhmsbeagle-cpu-sse.so.21      pkgconfig
libhmsbeagle-cpu-sse.so.21.0.0


Now you are almost ready to go. All you need is to add the beagle-lib path to LD_LIBRARY_PATH like in bash:

export LD_LIBRARY_PATH=/tools/opt/beagle-lib/lib:$LD_LIBRARY_PATH


Without LD_LIBRARY_PATH pointing to beagle-lib  you will get this from Beats. Note the last two lines
:
 java -jar /tools/BEAST2.2.1/lib/beast.jar -beagle_info -overwrite your-xml.xml

                        BEAST v2.2.1, 2002-2015
             Bayesian Evolutionary Analysis Sampling Trees
                       Designed and developed by
 Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard

                     Department of Computer Science
                         University of Auckland
                        re...@cs.auckland.ac.nz
                        ale...@cs.auckland.ac.nz

                   Institute of Evolutionary Biology
                        University of Edinburgh
                           a.ra...@ed.ac.uk

                    David Geffen School of Medicine
                 University of California, Los Angeles
                           msuc...@ucla.edu

                      Downloads, Help & Resources:
                           http://beast2.org/

  Source code distributed under the GNU Lesser General Public License:
                   http://github.com/CompEvol/beast2

                           BEAST developers:
   Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
 Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
                 Oliver Pybus, Chieh-Hsi Wu, Walter Xie

                               Thanks to:
          Roald Forsberg, Beth Shapiro and Korbinian Strimmer

Failed to load BEAGLE library: no hmsbeagle-jni in java.library.path
BEAGLE resources available:

Using  -Djava.library.path=/tools/opt/beagle-lib/lib will result in this output. This time note the last three lines:
java -Djava.library.path=/tools/opt/beagle-lib/lib -jar /tools/BEAST2.2.1/lib/beast.jar -beagle_info -overwrite your-xml.xml

                        BEAST v2.2.1, 2002-2015
             Bayesian Evolutionary Analysis Sampling Trees
                       Designed and developed by
 Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard

                     Department of Computer Science
                         University of Auckland
                        re...@cs.auckland.ac.nz
                        ale...@cs.auckland.ac.nz

                   Institute of Evolutionary Biology
                        University of Edinburgh
                           a.ra...@ed.ac.uk

                    David Geffen School of Medicine
                 University of California, Los Angeles
                           msuc...@ucla.edu

                      Downloads, Help & Resources:
                           http://beast2.org/

  Source code distributed under the GNU Lesser General Public License:
                   http://github.com/CompEvol/beast2

                           BEAST developers:
   Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
 Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
                 Oliver Pybus, Chieh-Hsi Wu, Walter Xie

                               Thanks to:
          Roald Forsberg, Beth Shapiro and Korbinian Strimmer

Unable to load CPU plugin!
Please check for proper libhmsbeagle installation.
BEAGLE resources available:


With LD_LIBRARY_PATH pointing to beagle-lib the first command returns:

 java -jar /tools/BEAST2.2.1/lib/beast.jar -beagle_info -overwrite your-xml.xml

                        BEAST v2.2.1, 2002-2015
             Bayesian Evolutionary Analysis Sampling Trees
                       Designed and developed by
 Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard

                     Department of Computer Science
                         University of Auckland
                        re...@cs.auckland.ac.nz
                        ale...@cs.auckland.ac.nz

                   Institute of Evolutionary Biology
                        University of Edinburgh
                           a.ra...@ed.ac.uk

                    David Geffen School of Medicine
                 University of California, Los Angeles
                           msuc...@ucla.edu

                      Downloads, Help & Resources:
                           http://beast2.org/

  Source code distributed under the GNU Lesser General Public License:
                   http://github.com/CompEvol/beast2

                           BEAST developers:
   Alex Alekseyenko, Trevor Bedford, Erik Bloomquist, Joseph Heled,
 Sebastian Hoehna, Denise Kuehnert, Philippe Lemey, Wai Lok Sibon Li,
Gerton Lunter, Sidney Markowitz, Vladimir Minin, Michael Defoin Platel,
                 Oliver Pybus, Chieh-Hsi Wu, Walter Xie

                               Thanks to:
          Roald Forsberg, Beth Shapiro and Korbinian Strimmer


BEAGLE resources available:
0 : CPU
    Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_SSE VECTOR_NONE THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU

Last lines means success.



genevieve....@gmail.com

unread,
Mar 17, 2016, 5:36:27 AM3/17/16
to beast-users
Hi,

We are experiencing the same error on our Linux HPC. I have attached 2 error files.

We have followed all the suggestions in this post and eventually managed to use beagle resources, but an error occurred soon after launch. Then we uninstalled beast, beagle and then reinstalled, while also installing the latest version of java, but the error still occurs. To clarify, there are other pieces of software on the HPC that use Java and these are running without issue.

We eventually changed changed the java flag to "false" in the xml and now the analysis is running on 1 CPU, albeit slowly.

Dataset - 2161 bp alignment, 2071 distinct alignment patterns​, 2 partitions.

Any advice would be much appreciated.

Thanks,
Genevieve
hs_err_pid59315.log
hs_err_pid59468.log

Remco Bouckaert

unread,
Mar 17, 2016, 2:49:43 PM3/17/16
to beast...@googlegroups.com
Hi Genevieve,

From you message I understand it is running with 1 BEAGLE instance at the moment? I recommend upgrading to v2.4.0 if you have not done already — the java useJava flag is removed for v2.4.0 and ThreadedTreeLikelihood is moved from the BEASTLabs package, so you don’t need to install that any more (unless you need other functionality from BEASTLabs). 

If you set useThreads=“true” on the element with id=“likelihood” and start BEAST with both -threads (=total number of threats) and -instances (=threads used for each partition) flags you should see improvements in performance. Note that the number for threads should be equal or larger than the number of instances, for example 

beast -threads 8 -instances 4 file.xml

should run with a total of 8 threads, 4 for each of your two partitions. You have to experiment with these numbers to get optimal performance, since it depends a bit on your data what works best. If your partitions are not balanced, you can limit the number of threads used for a partition by setting the threads-attribute on the ThreadedTreeLikelihood, for example set threads=“3” for the first partition if that is smaller than the second. 

Cheers,

Remco



-- 
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.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.
<hs_err_pid59315.log><hs_err_pid59468.log>

kbr...@berkeley.edu

unread,
Sep 14, 2017, 2:10:41 PM9/14/17
to beast-users
Hello Remco, 

We are having an issue getting BEAGLE to work. I have attached my error message files. Any help is greatly appreciated. 

We already went in and renamed the 32 bit file to-jni. It is calling BEAGLE, but then terminates with an error... 

Thanks, 
KB
hs_err_pid4716.log
hs_err_pid8804.log
Reply all
Reply to author
Forward
0 new messages