Initially, this was to be a post about building clBLAS. However, that proved to be a bit of a trial-by-fire, particularly since it has the AMD Core Math library as a requirement, and there are multiple different versions available on the (AMD) ACML download page. A big pity, since I like to ‘do things by hand’ in order to understand them…

Anyhow, even the binaries for clBLAS have some ins-and-outs, when installing - particularly since Bumblebee is envolved (since the GPU being used is an Nvidia mobile 750m).

### Getting the binary release

Go to the clBLAS GitHub page, and hunt for the appropriate release - which in my case was the 64-bit Linux one.

Now, there are two paths to take : Either install for the local user (which means you’ll have to do something like the following for a build of (for instance) gpuarray :

This will produce (good) messages such as : -- Found clBLAS:. However, things get a little trickier when it’s trying to do a full link of libraries into libraries…

This is an indication that further difficulties lie ahead going the local-install route…

### Install the clBLAS in a system-wide location

One quirk of the bumblebee system (used to switch on and off Nvidia GPUs on a laptop dynamically), is that GPU-specific paths are enabled/disabled as required. Therefore, if the clBLAS libraries are installed in the /usr/lib64/nvidia-bumblebee as below, you will need to run cmake under optirun cmake .. when building other modules (like gpuarray) that depend on them. This may be tiresome, however it allows one to keep a consistent ‘separation’ between the GPU states…

Copying over the clBLAS binaries (do this as root) :

If you don’t need bumblebee-like functionality, then copying the libraryies into /usr/lib64/ should work just fine.