oclgrind-kernel command not found

In this troubleshooting guide we learn how to fix oclgrind-kernel command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

oclgrind-kernel: command not found

or when using sudo you get the following error message

sudo: oclgrind-kernel: command not found

Solutions to oclgrind-kernel: command not found

How To Fix oclgrind-kernel: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu oclgrind-kernel is provided by oclgrind package.

oclgrind is:

Oclgrind is an extensible OpenCL device simulator that provides a plugin interface to facilitate the creation of tools to aid analysis and development of OpenCL programs. Among the tools that Oclgrind provides are various debugging aids, such as out-of-bounds memory access checking, data-race detection, and an interactive debugger.

Oclgrind implements the OpenCL 1.2 runtime API, which makes simulating an existing OpenCL program very straightforward - simply prefix your usual application command-line with ‘oclgrind’. There is also a simple interface for simulating individual kernels in isolation via the ‘oclgrind-kernel’ command.

To fix this problem, we can install more using the command below.

sudo apt-get -y install oclgrind

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install oclgrind.

sudo apt -y install oclgrind

Or if you have aptitude installed you can use the following command.

sudo aptitude install oclgrind

Summary

In this tutorial we learn how to fix oclgrind-kernel command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.