/gpu_smc

A GPU implementation of the particle filter with Metropolis Hastings

Primary LanguageC++

GPU Implementation for Particle Filter with Metropolis Hasting

This is a GPU implementation of the [Particle Markov chain Monte Carlo methods][1].

prepare environment

The following packages are needed in this code:

  • eigen
  • arrayfire
  • cmake
  • ubuntu 18.04

Install cmake

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake

Install Eigen

sudo apt-get install libeigen3-dev

Install arrayfire

  1. Install cuda 10.1 from nvidia's webpage.
  2. Install arrayfire 3.6.3 from this page.

The step to install arrayfire is summarized as follows:

# download arrayfire
wget https://arrayfire.s3.amazonaws.com/3.6.3/ArrayFire-v3.6.3_Linux_x86_64.sh
# change to excutable
chmod +x ArrayFire-v3.6.3_Linux_x86_64.sh
# install
bash ArrayFire-v3.6.3_Linux_x86_64.sh
# copy extracted file to /opt/
sudo cp -r /arrayfire/ /opt/arrayfire
# add link to cmake
cat /opt/arrayfire/lib64 >> /etc/ld.so.conf.d/arrayfire.conf
ldconfig

Reference

[1]: Particle Markov chain Monte Carlo methods, Andrieu, Christophe and Doucet, Arnaud and Holenstein, Roman, Journal of the Royal Statistical Society: Series B (Statistical Methodology)