2017-09-10 Update: Uncomplicate Neanderthal

This weekend I made another attempt at some numeric programming. I have been working on a Clojure library named Neanderthal. It can use CUDA, OpenCL or native libraries. Instead of using BLAS and LAPACK for native libraries, it uses the Intel Math Kernel Library.

In order to use the native library, I installed the Intel MKL library. I did have a bit of trouble with the library. This worked:

export LD_LIBRARY_PATH=/home/ericm/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64_lin/

For some reason, the “export” had to be on the front. I tried without, and I got an error. But I was able to copy and paste the code from the native example here.

I was able to get the code running from the first OpenCL example.

These are some packages I installed to get the OpenCL example to work:

aptitude install ocl-icd-opencl-dev
aptitude install dkms
aptitude install beignet-opencl-icd

I will also look at TensorFlow. There are a few libraries that let you use Clojure.

2017-12-21_01.25.32 update: Based on an email from the library author on the mailing list, this is how you run the native tests and skip the CUDA/OpenGL tests:

Just run mkl_test namespace. Note: these are mije tests, so for example in Leiningen:

lein midje uncomplicate.neanderthal.mkl_test

Or, with the REPL running, just evaluate mkl_test namespace.

You’re welcome.

Image from a 9th century Lorsch Gospel manuscript housed at Biblioteca Naţională a României; image from the Virtual Monastic Library of Lorsch, allowed under Fair Use.