Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Racket - Importing OpenCL

I am attempting to learn OpenCL and I installed the OpenCL FFI using raco pkg install opencl, but I am now getting a strange error when I try to use the package:

clGetPlatformIDs: Undefined error: -1001
  context...:
   /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:255:18
   /home/lb/Dropbox/workspace/misc/opencl-test.rkt: [running body]

Here is the code snippet:

#lang racket
(require opencl/c)
(displayln (clGetPlatformIDs:count))

And furthermore, when I run raco test --drdr -p opencl, I get fails on 26/61 of the tests.

I am running Racket 6.1.1 on Arch Linux (64 bit).

What am I doing wrong?

like image 878
Langston Avatar asked Nov 28 '25 13:11

Langston


1 Answers

I fixed this problem by installing the beignet package from the Arch User Repository. This package conflicted with my installation of libcl, which it also provides. I removed my extraneous libcl with sudo pacman -R -dd libcl to skip dependency checks.

After sucessfully installing beignet, raco test --drdr -p opencl reports 15/61 errors, and the above code runs.

like image 191
Langston Avatar answered Dec 01 '25 07:12

Langston