cd beagle-lib
./autogen.sh
./configure --prefix=/home/user/Software/beast/beagle-lib
make install
export LD_LIBRARY_PATH=/home/user/Software/beast/beagle-lib/lib:$LD_LIBRARY_PATH
make check
beast/beagle-lib/examples/tinytest$ ./tinytest
Available resources:
Resource 0:
Name : CPU
Desc :
Flags: PROCESSOR_CPU PRECISION_DOUBLE PRECISION_SINGLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALING_DYNAMIC SCALERS_RAW SCALERS_LOG VECTOR_NONE VECTOR_SSE THREADING_NONE FRAMEWORK_CPU
Using resource 0:
Rsrc Name : CPU
Impl Name : CPU-4State-Single
Impl Desc : none
Flags: PROCESSOR_CPU PRECISION_SINGLE COMPUTATION_SYNCH EIGEN_REAL SCALING_MANUAL SCALERS_RAW VECTOR_NONE THREADING_NONE FRAMEWORK_CPU
logL = -1498.89802 (PAUP logL = -1498.89812)
sumLogL = -1498.89802
$ ./beast -beagle_info
BEAST v2.6.0, 2002-2019
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
r.bouckaert@auckland.ac.nz
alexei@cs.auckland.ac.nz
Institute of Evolutionary Biology
University of Edinburgh
a.rambaut@ed.ac.uk
David Geffen School of Medicine
University of California, Los Angeles
msuchard@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, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
--- BEAGLE RESOURCES ---
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
we have beagle can run with CPU. But cuda is not activated yet!
I have installed cuda driver based on the my Ubuntu desktop version.
Check the Ubuntu version using the following command:
$ uname -a
16.04.2-Ubuntu
So, accordingly installed the cuda toolkit from the following link:
https://developer.nvidia.com/cuda-downloads
once the cuda is installed, we need to check if it is properly installed. Follow the instructions to check if it is properly installed.
https://xcat-docs.readthedocs.io/en/stable/advanced/gpu/nvidia/verify_cuda_install.html
https://xcat-docs.readthedocs.io/en/stable/advanced/gpu/nvidia/verify_cuda_install.html
The tutorial is slightly old, I had to go to /usr/local/cuda-10.1/samples
Sometime, while installing, there can be error like this:
$ make
Making all in libhmsbeagle
make[1]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
make all-recursive
make[2]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
Making all in GPU
make[3]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU'
Making all in kernels
make[4]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU/kernels'
echo "// auto-generated header file with CUDA kernels PTX code" > BeagleCUDA_kernels.h
/usr/bin/nvcc -o BeagleCUDA_kernels.ptx -ptx -DCUDA -DSTATE_COUNT=4 \
./kernels4.cu -O3 -arch compute_30 -Wno-deprecated-gpu-targets -DHAVE_CONFIG_H -I/home/user/Software/beast/beagle-lib -I/home/user/Software/beast/beagle-lib || { \rm BeagleCUDA_kernels.h; exit; }; \
echo "#define KERNELS_STRING_SP_4 \"" | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
cat BeagleCUDA_kernels.ptx | sed 's/\"/\\"/g' | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
echo "\"" >> BeagleCUDA_kernels.h
nvcc fatal : Path to libdevice library not specified
for s in 16 32 48 64 80 128 192; do \
echo "Making state count = $s" ; \
/usr/bin/nvcc -o BeagleCUDA_kernels.ptx -ptx -DCUDA -DSTATE_COUNT=$s \
./kernelsX.cu -O3 -arch compute_30 -Wno-deprecated-gpu-targets -DHAVE_CONFIG_H -I/home/user/Software/beast/beagle-lib -I/home/user/Software/beast/beagle-lib || { \rm BeagleCUDA_kernels.h; exit; }; \
echo "#define KERNELS_STRING_SP_$s \"" | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
cat BeagleCUDA_kernels.ptx | sed 's/\"/\\"/g' | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
echo "\"" >> BeagleCUDA_kernels.h; \
done
Making state count = 16
nvcc fatal : Path to libdevice library not specified
rm: cannot remove 'BeagleCUDA_kernels.h': No such file or directory
Makefile:518: recipe for target 'BeagleCUDA_kernels.h' failed
make[4]: *** [BeagleCUDA_kernels.h] Error 1
make[4]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU/kernels'
Makefile:700: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU'
Makefile:622: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
Makefile:465: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
Makefile:611: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
$ make
Making all in libhmsbeagle
make[1]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
make all-recursive
make[2]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
Making all in GPU
make[3]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU'
Making all in kernels
make[4]: Entering directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU/kernels'
echo "// auto-generated header file with CUDA kernels PTX code" > BeagleCUDA_kernels.h
/usr/bin/nvcc -o BeagleCUDA_kernels.ptx -ptx -DCUDA -DSTATE_COUNT=4 \
./kernels4.cu -O3 -arch compute_30 -Wno-deprecated-gpu-targets -DHAVE_CONFIG_H -I/home/user/Software/beast/beagle-lib -I/home/user/Software/beast/beagle-lib || { \rm BeagleCUDA_kernels.h; exit; }; \
echo "#define KERNELS_STRING_SP_4 \"" | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
cat BeagleCUDA_kernels.ptx | sed 's/\"/\\"/g' | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
echo "\"" >> BeagleCUDA_kernels.h
nvcc fatal : Path to libdevice library not specified
for s in 16 32 48 64 80 128 192; do \
echo "Making state count = $s" ; \
/usr/bin/nvcc -o BeagleCUDA_kernels.ptx -ptx -DCUDA -DSTATE_COUNT=$s \
./kernelsX.cu -O3 -arch compute_30 -Wno-deprecated-gpu-targets -DHAVE_CONFIG_H -I/home/user/Software/beast/beagle-lib -I/home/user/Software/beast/beagle-lib || { \rm BeagleCUDA_kernels.h; exit; }; \
echo "#define KERNELS_STRING_SP_$s \"" | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
cat BeagleCUDA_kernels.ptx | sed 's/\"/\\"/g' | sed 's/$/\\n\\/' >> BeagleCUDA_kernels.h; \
echo "\"" >> BeagleCUDA_kernels.h; \
done
Making state count = 16
nvcc fatal : Path to libdevice library not specified
rm: cannot remove 'BeagleCUDA_kernels.h': No such file or directory
Makefile:518: recipe for target 'BeagleCUDA_kernels.h' failed
make[4]: *** [BeagleCUDA_kernels.h] Error 1
make[4]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU/kernels'
Makefile:700: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle/GPU'
Makefile:622: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
Makefile:465: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/user/Software/beast/beagle-lib/libhmsbeagle'
Makefile:611: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Paste the location of cuda bin directory in bashrc (/usr/local/cuda-10.1/bin/)
export PATH="/usr/local/cuda-10.1/bin:$PATH"
$ ./beast -beagle_info
BEAST v2.6.0, 2002-2019
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
r.bouckaert@auckland.ac.nz
alexei@cs.auckland.ac.nz
Institute of Evolutionary Biology
University of Edinburgh
a.rambaut@ed.ac.uk
David Geffen School of Medicine
University of California, Los Angeles
msuchard@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, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
--- BEAGLE RESOURCES ---
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 : Quadro P2000
Global memory (MB): 5058
Clock speed (Ghz): 1.48
Number of cores: 1024
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_CUDA
export PATH="/usr/local/cuda-10.1/bin:$PATH"
$ ./beast -beagle_info
BEAST v2.6.0, 2002-2019
Bayesian Evolutionary Analysis Sampling Trees
Designed and developed by
Remco Bouckaert, Alexei J. Drummond, Andrew Rambaut & Marc A. Suchard
Centre for Computational Evolution
University of Auckland
r.bouckaert@auckland.ac.nz
alexei@cs.auckland.ac.nz
Institute of Evolutionary Biology
University of Edinburgh
a.rambaut@ed.ac.uk
David Geffen School of Medicine
University of California, Los Angeles
msuchard@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, Tim Vaughan, Chieh-Hsi Wu, Walter Xie
Thanks to:
Roald Forsberg, Beth Shapiro and Korbinian Strimmer
--- BEAGLE RESOURCES ---
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 : Quadro P2000
Global memory (MB): 5058
Clock speed (Ghz): 1.48
Number of cores: 1024
Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_NONE PROCESSOR_GPU FRAMEWORK_CUDA
Voila! Beast with Beagle installed!!