-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenCL error: Unknown error from file </home/software/beagle-lib/libhmsbeagle/GPU/GPUInterfaceOpenCL.cpp>, line 105. #175
Comments
Idk if this will be helpful for you or not: I encountered this problem about a week ago as well while trying to use BEAST2 for the first time. Messed around with cmake commands for a hot second (tried a bunch of different compilers, versions of gcc, g++, etc), but no matter what at 52% always the same message: In file included from /root/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.h:338, It continues compiling though and makes synthetictest, but as soon as it's run hmctest immediately fails. BEAST2 doesn't fair much better; it manages to generate the file explorer, but as soon as it begins loading the .xml the error OpenCL error: Unknown error from file </root/beagle-lib/libhmsbeagle/GPU/GPUInterfaceOpenCL.cpp>, line 105. shows up and terminates the process. That said, I just had a successful run by using ./beast -java in the command line (AKA forcing BEAST2 to only use Java). By no means does it address the root issue (which if I had to guess has to do with the script for OpenCL GPU interfacing not being properly written during compilation but the error isn't severe enough to prevent make from finishing), but at least for the time being it appears to be a workaround? Idk sorry if this wasn't helpful. |
Hi @hikari20XX Thank you so much for your response. I am able to bypass the error through your suggestion (./beast -java). However, I am now running into a memory issue, as I cannot use -Xmx. Would you have any suggestions for that? Thank you again so much for your response. |
I hadn't run into that issue yet (luckily my datasets have been small enough so far not to require additional memory allocation), but was able to reproduce something along the lines of what you described with my current build when ./beast -java -Xmx16g was attempted. My initial guess as to fixing/circumventing it would be either to use 'Java -Xmx(insert desired memory allocation size here) -cp /path/to/launcher.jar beast.app.beast app.BeastMain arg1 arg2 ...' OR editing the memory allocation from inside the script itself (will look more into this but rn that's all I got...). My guess is that there's some part of BEAST that's not building correctly (might be missing a dependency or something, idk) that's preventing anything but 'vanilla' BEAST from working properly. Also, if you're looking to fix Beagle-lib, instead of cloning from GitHub, try using the tarball instead. After doing that, I was able to get MrBayes working with Beagle, but not BEAST2 (probably need to rebuild it from scratch but have been too lazy to do so). Sorry if this wasn't helpful, best of luck!!!! Will look more into this when there's time. |
Thank you so much @hikari20XX !! I really appreciate your help! |
Hello! I have been using beast without problem for the past few years on CentOS 7 without problem. This week, when I ran beast, I would see this error:
Alexei J. Drummond, Andrew Rambaut and Marc A. Suchard
Source code distributed under the GNU Lesser General Public License:
http://github.com/beast-dev/beast-mcmc
Using BEAGLE library v3.1.2 for accelerated, parallel likelihood evaluation
2009-, BEAGLE Working Group - https://beagle-dev.github.io/
Citation: Ayres et al (2012) Systematic Biology 61: 170-173 | doi:10.1093/sysbio/syr100
Random number seed: 1648396588899
Loading additional development parsers from development_parsers.properties, which is additional set of parsers only available for development version ...
Parsing XML file: file.xml
File encoding: UTF8
Looking for plugins in /usr/local/working/plugins
Read alignment: alignment
Sequences = 766
Sites = 29903
Datatype = nucleotide
Site patterns 'patterns' created from positions 1-29903 of alignment 'alignment'
unique pattern count = 3477
Read attribute patterns, 'Location.pattern' for attribute, Location
Creating the tree model, 'treeModel'
taxon count = 766
tree height = 5.606529898876135
Using strict molecular clock model.
Using strict molecular clock model.
Creating state frequencies model 'frequencies': Initial frequencies = {0.25, 0.25, 0.25, 0.25}
Creating HKY substitution model. Initial kappa = 2.0
Creating site rate model:
4 category discrete gamma with initial shape = 0.5
Using BEAGLE DataLikelihood Delegate
Mar 27, 2022 10:56:30 AM beagle.BeagleFactory loadBeagleInstance
INFO: BEAGLE function, create, returned error code -6 (No resource matches requirements)
Fatal exception: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.
java.lang.RuntimeException: No acceptable BEAGLE library plugins found. Make sure that BEAGLE is properly installed or try changing resource requirements.
at beagle.BeagleFactory.loadBeagleInstance(Unknown Source)
at dr.evomodel.treedatalikelihood.BeagleDataLikelihoodDelegate.(Unknown Source)
at dr.evomodelxml.treedatalikelihood.TreeDataLikelihoodParser.createTreeDataLikelihood(Unknown Source)
at dr.evomodelxml.treedatalikelihood.TreeDataLikelihoodParser.parseXMLObject(Unknown Source)
at dr.xml.AbstractXMLObjectParser.parseXMLObject(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.convert(Unknown Source)
at dr.xml.XMLParser.parse(Unknown Source)
at dr.app.beast.BeastMain.(Unknown Source)
at dr.app.beast.BeastMain.main(Unknown Source)
I tried reinstalling beagle using the instructions at: https://github.com/beagle-dev/beagle-lib/wiki/LinuxInstallInstructions
git clone --depth=1 https://github.com/beagle-dev/beagle-lib.git
cd beagle-lib
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME ..
make install
**I've also tried compiling with cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME -DBUILD_CUDA=OFF -DBUILD_OPENCL=OFF ..
I get the same results from this.
Here is the output from make install:
-- The C compiler identification is GNU 6.1.0
-- The CXX compiler identification is GNU 6.1.0
-- Check for working C compiler: /opt/miniconda3/bin/cc
-- Check for working C compiler: /opt/miniconda3/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/miniconda3/bin/c++
-- Check for working CXX compiler: /opt/miniconda3/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found JNI: /opt/miniconda3/lib/libjawt.so
-- JAVA_HOME=/opt/miniconda3
-- JNI_INCLUDE_DIRS=/opt/miniconda3/include;/opt/miniconda3/include/linux;/opt/iniconda3/include
-- JNI_LIBRARIES=/opt/miniconda3/lib/libjawt.so;/opt/miniconda3/lib/server/libjm.so
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED - Success
-- Not using libtools for plugins
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - found
-- Found OpenCL: /usr/lib64/libOpenCL.so (found version "2.2")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "11.6")
-- CUDA Includes: /usr/local/cuda/include
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/software/beagle-lib/build
(base) [[email protected]@sysbio1 build]$
(base) [[email protected]@sysbio1 build]$ make install
Scanning dependencies of target hmsbeagle
[ 4%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/beagle.cpp.o
[ 8%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/benchmark/BeageBenchmark.cpp.o
[ 12%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/benchmark/linag.cpp.o
[ 16%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/plugin/Plugin.pp.o
[ 20%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/plugin/UnixShaedLibrary.cpp.o
[ 25%] Linking CXX shared library libhmsbeagle.so
[ 25%] Built target hmsbeagle
Scanning dependencies of target hmsbeagle-cpu-sse
[ 29%] Building CXX object libhmsbeagle/CPU/CMakeFiles/hmsbeagle-cpu-sse.dir/BegleCPUSSEPlugin.cpp.o
In file included from /usr/local/software/beagle-lib/libhmsbeagle/CPU/BeaglePU4StateSSEImpl.h:338:0,
from /usr/local/software/beagle-lib/libhmsbeagle/CPU/BeaglePUSSEPlugin.cpp:9:
/usr/local/software/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.hpp: n member function ‘virtual void beagle::cpu::BeagleCPU4StateSSEImpl<double, T_PD, P_PAD>::calcCrossProductsPartials(const double*, const double*, const double, const double*, double, double*, double*)’:
/usr/local/software/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.hpp:53:25: warning: ignoring attributes on template argument ‘V_Real {aka vector(2 double}’ [-Wignored-attributes]
std::array<V_Real, 8> vAcrossPatterns;
^
/usr/local/software/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.hpp:56:25: warning: ignoring attributes on template argument ‘V_Real {aka vector(2 double}’ [-Wignored-attributes]
std::array<V_Real, 8> vWithinPattern;
^
[ 33%] Linking CXX shared library libhmsbeagle-cpu-sse.so
[ 33%] Built target hmsbeagle-cpu-sse
Scanning dependencies of target hmsbeagle-cpu
[ 37%] Building CXX object libhmsbeagle/CPU/CMakeFiles/hmsbeagle-cpu.dir/BeaglePUPlugin.cpp.o
[ 41%] Linking CXX shared library libhmsbeagle-cpu.so
[ 41%] Built target hmsbeagle-cpu
Scanning dependencies of target CudaKernels
[ 45%] Building CUDA kernels
NVCC=/usr/local/cuda/bin/nvcc
NVCCFLAGS=-O3 -Wno-deprecated-gpu-targets -ccbin /opt/miniconda3/bin/c++ -m64 -_POSIX_C_SOURCE -std=c++11
INCLUDE_DIRS=-I/usr/local/software/beagle-lib
Making CUDA SP state count = 16
Making CUDA SP state count = 32
Making CUDA SP state count = 48
Making CUDA SP state count = 64
Making CUDA SP state count = 80
Making CUDA SP state count = 128
Making CUDA SP state count = 192
Making CUDA SP state count = 256
Making CUDA DP state count = 16
Making CUDA DP state count = 32
Making CUDA DP state count = 48
Making CUDA DP state count = 64
Making CUDA DP state count = 80
Making CUDA DP state count = 128
Making CUDA DP state count = 192
Making CUDA DP state count = 256
[ 45%] Built target CudaKernels
Scanning dependencies of target hmsbeagle-cuda
[ 50%] Building CXX object libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cud.dir//GPUImplHelper.cpp.o
[ 54%] Building CXX object libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cud.dir//GPUInterfaceCUDA.cpp.o
[ 58%] Building CXX object libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cud.dir//KernelLauncher.cpp.o
[ 62%] Building CXX object libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cud.dir//KernelResource.cpp.o
[ 66%] Building CXX object libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cud.dir/__/CUDAPlugin.cpp.o
[ 70%] Linking CXX shared library libhmsbeagle-cuda.so
[ 70%] Built target hmsbeagle-cuda
Scanning dependencies of target hmsbeagle-jni
[ 75%] Building CXX object libhmsbeagle/JNI/CMakeFiles/hmsbeagle-jni.dir/beagleBeagleJNIWrapper.cpp.o
[ 79%] Linking CXX shared library libhmsbeagle-jni.so
[ 79%] Built target hmsbeagle-jni
Scanning dependencies of target hmctest
[ 83%] Building CXX object examples/CMakeFiles/hmctest.dir/hmctest/hmctest.cpp.
[ 87%] Linking CXX executable hmctest
[ 87%] Built target hmctest
Scanning dependencies of target synthetictest
[ 91%] Building CXX object examples/CMakeFiles/synthetictest.dir/synthetictest/ynthetictest.cpp.o
[ 95%] Building CXX object examples/CMakeFiles/synthetictest.dir/synthetictest/inalg.cpp.o
[100%] Linking CXX executable synthetictest
[100%] Built target synthetictest
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/software/lib/libhmsbeagle.so
-- Set runtime path of "/usr/local/software/lib/libhmsbeagle.so" to ""
-- Installing: /usr/local/software/include/libhmsbeagle-1/libhmsbeagle/beagl.h
-- Installing: /usr/local/software/include/libhmsbeagle-1/libhmsbeagle/platfrm.h
-- Installing: /usr/local/software/lib/libhmsbeagle-cpu.so.40.0.0
-- Up-to-date: /usr/local/software/lib/libhmsbeagle-cpu.so
-- Installing: /usr/local/software/lib/libhmsbeagle-cpu-sse.so.40.0.0
-- Up-to-date: /usr/local/software/lib/libhmsbeagle-cpu-sse.so
-- Installing: /usr/local/software/lib/libhmsbeagle-cuda.so.40.0.0
-- Set runtime path of "/usr/local/software/lib/libhmsbeagle-cuda.so.40.0.0"to ""
-- Up-to-date: /usr/local/software/lib/libhmsbeagle-cuda.so
-- Installing: /usr/local/software/lib/libhmsbeagle-jni.so
-- Set runtime path of "/usr/local/software/lib/libhmsbeagle-jni.so" to ""
After that, I do:
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$HOME/lib/pkgconfig:$PKG_CONFIG_PATH
make test
Here is the make test output:
Running tests...
Test project /usr/local/software/beagle-lib/build
Start 1: hmctest
1/1 Test #1: hmctest ..........................***Failed 0.86 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.87 sec
The following tests FAILED:
1 - hmctest (Failed)
Errors while running CTest
make: *** [test] Error 8
Here is the output of LastTest.log:
"hmctest" start time: Mar 27 10:22 CDT
Output:
OpenCL error: Unknown error from file </usr/local/software/beagle-lib/libhmsbeagle/GPU/GPUInterfaceOpenCL.cpp>, line 105.
Test time = 0.86 sec
Test Failed.
"hmctest" end time: Mar 27 10:22 CDT
"hmctest" time elapsed: 00:00:00
End testing: Mar 27 10:22 CDT
I have checked the forums for solutions and have not been able to solve this issue. I would really appreciate any help on how to fix this!
The text was updated successfully, but these errors were encountered: