Install hdf5r package in R 4.0.2

While installing the R package “hdf5r“ version 1.3.3, I encountered the error:

1
2
3
4
fatal error: hdf5.h: No such file or directory
#include <hdf5.h>
^~~~~~~~
compilation terminated.

My OS is Debian buster/10.6, and the package “libhdf5-dev” has been installed. It looks R cannot find the path of hdf5 header and library files.

Read More

BEAST Tips

BEAST (and BEAST 2, of course) is widely uesed for phylogenetic inference. But it is quite complicated. This post represents some useful tips while using BEAST.

1. Install beagle-lib

Beagle-lib accelerates Bayesian and Maximun Likelihood phylogenetic software amazingly. Especially the beagle-lib v3.x improves 20-50% than version 2.x.

1.1 Compile beagle-lib without CUDA and OpenCL

Although CUDA and OpenCL improves BEAST computing significantly, how to install beagle-lib without an Nvidia GPU card?

1
./configure --without-cuda --without-opencl

It will show these warning messages:

1
2
configure: WARNING: OpenCL not found or disabled.  OpenCL implementation  will not be built. If OpenCL support is desired, check the path to OpenCL and specify --with-opencl=/path/to/opencl
configure: WARNING: NVIDIA CUDA nvcc compiler not found or CUDA support disabled. CUDA implementation will not be built. If CUDA support is desired, check the path to CUDA and specify --with-cuda=/path/to/cuda

It’s OK. Simply continue with:

1
make install

And do not forget run test with:

1
make check

1.2 Install beagle-lib in custom path

Sometimes it’s not possible to install beagle-lib in the default system library path /usr/local/lib. It could be resolved by setting the environment variable LD_LIBRARY_PATH.

For example, to install beagle-lib into /data/lib, in configure step:

1
2
./configure --prefix=/data
make install

Then append to .bashrc:

1
export LD_LIBRARY_PATH=/data/lib:$LD_LIBRARY_PATH

Then run

1
source .bashrc

to enable the environment change.