Error -1001 in clGetPlatformIDs Call ! - opencl

I am trying to start working with OpenCL. I have two NVidia graphics card, I installed "developer driver" as well as SDK from NVidia website. I compiled the demos but when I run
./oclDeviceQuery
I see:
OpenCL SW Info:
Error -1001 in clGetPlatformIDs Call
!!!
How can I fix it? Does it mean my nvidia cards cannot be detected? I am running Ubuntu 10.10 and X server works properly with nvidia driver.
I am pretty sure the problem is not related to file permissions as it doesn't work with sudo either.

In my case I have solved it by installing nvidia-modprobe package available in ubuntu (utopic/multiverse). And the driver itself (v346) was installed from https://launchpad.net/~mamarley/+archive/ubuntu/nvidia
Concretely, I have installed nvidia-opencl-icd-346, nvidia-libopencl1-346, nvidia-346-uvm, nvidia-346 and libcuda1-346. Not sure if they are all needed for OpenCL.

This is a result of not installing the ICD portion of Nvidia's openCL runtime. The ICD profile will instruct your application of the different openCL implementations installed on the system as multiple implementations from different vendors can coexist. Whe your application does not find the ICD information it gives the Error -1001.

Run your program as root. In case of success: you have trouble with cl_khr_icd- extension to load the vendor driver.
If you not running X11, you have to create device files manually or by (boot-)script:
ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)

Same problem for me on a Linux system. Solution is to add the user to the video group:
# sudo usermod -aG video your-user-name

Since I just spend a couple of hours on this, I thought I would share:
I got the error because I was connected to the machine per remote desktop (mstsc). On the machine itself everything worked fine.
I have been told that it should work with TeamViewer by the way.

Dont know if you ever solved this problem, but I had the same issue and solved it in this post: ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)
Hope it helps!

I have solved it in Ubuntu 13.10 saucy for intel opencl by created link:
sudo ln -s /opt/intel/opencl-1.2-3.2.1.16712/etc/intel64.icd /etc/OpenCL/vendors/nvidia.icd

I just ran into this problem on ubuntu 14.04 and I could not find ANY working answers anywhere online including this thread (though this was the first to show up on google). What ended up working for me was to remove ALL previous nvidia software and then to reinstall it using the .run file provided on the nvidia website. Installing the components through apt-get seems to fail for some reason.
1) Download CUDA .run file: https://developer.nvidia.com/cuda-downloads
2) Purge all previous nvidia packages
sudo apt-get purge nvidia-*
3) Install all run file components (you will likely have to stop X or restart in recovery mode to run this)
sudo sh cuda_X.X.XX_linux.run

This is because OpenCL has the same brain damaged one library per vendor setup that OpenGL has. A likely reason for the -1001 error is that you have compiled with a different library than the linker is trying to dynamically load.
So see if this is the problem run:
$ ldd oclDeviceQuery
...
libOpenCL.so.1 => important path here (0x00007fe2c17fb000)
...
Does the path point towards the NVidia-provided libOpenCL.so.1 file? If it doesn't, you should recompile the program with an -L parameter pointing towards the directory containing NVidia's libOpenCL.so.1. If you can't do that, you can override the linker's path like this:
$ LD_LIBRARY_PATH=/path/to/nvidias/lib ./oclDeviceQuery

For me, I was missing the CUDA OpenCL library, Running sudo apt install cuda-opencl-dev-12-0 solved it.

You should get number of platforms, allocate the memory for platforms, again get this platforms and then create context from this platform. There is good example:
http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71

This might be due to querying clGetPlatformIDs by multiple threads at the same time

Related

Execute this command line in Windows

I'm trying to connect my firebase auth to an expo project.
I'm following the main docs of each library. I'm stucking on this step.
I'm not able in windows to exeute this command line openssl rand -base64 32 | openssl sha1 -c.
I've tried with the specific https://code.google.com/archive/p/openssl-for-windows/downloads but I don't know how to reproduce the same line.
Any help would be great, thanks in advance.
You need to install openssl. It is usually available on Linux (which I think that article might have been written for). There are some Windows binaries available at here. Alternatively, you could setup a WSL session, and run the command from there.
that is a linux command. Therefore a linux terminal is needed.
there are at least 2 ways to get this done
using virtual machine with ubuntu or some other operating system that uses a linux terminal aka shell (which I doubt you know about)
OR
installing a linux emulator (windows 8+ since it's from the windows store)
assuming you would prefer option 2, go to the windows store, search "Kali" and you will find an app called Kali. install it and if an error shows up, here's a nice video here that talks about solving that error and you would have a kali terminal on your windows computer (your command would work there)

Can not use Elixir in jupyter notebook

Question Summary
I'm trying to use Elixir in jupyter notebook but IElixir doesn't work.
Does somebody know how to solve below error & use Elixir in jupyter notebook?
Environments
OS Ubuntu ver.“18.04.3 LTS (Bionic Beaver)”
CPU Intel Core i7-7700HQ 2.80GHz
RAM 16GB
GPU NVIDIA GeForce GTX 1600 Mobile
Version Information
anaconda 4.7.12
jupyter 1.0.0
elixir 1.9.4
What I did & stacking points
I refer to IElixir github comments to built a deverop environment.
https://github.com/pprzetacznik/IElixir
Progressed Situation
Repository clone (done)
git clone https://github.com/pprzetacznik/IElixir.git
cd IElixir
Built IElixir (Stacking Point)
mix deps.get
mix test
MIX_ENV=prod mix compile
Error was happen in mix test
kojiro#Inspiron7577:~/IElixir$ mix test
===> Compiling esqlite
===> Compiling /home/kojiro/IElixir/deps/esqlite/c_src/esqlite3_nif.c
===> /home/kojiro/IElixir/deps/esqlite/c_src/esqlite3_nif.c:25:10: fatal error: sqlite3.h: ãã®ãããªãã¡ã¤ã«ã ãã£ã¬ã¯ããªã¯ããã¾ãã #include “sqlite3.h” ^~~~~~~~~~~ compilation terminated.
** (Mix) Could not compile dependency :esqlite, “/home/kojiro/.mix/rebar3 bare compile --paths=”/home/kojiro/IElixir/_build/test/lib/*/ebin"" command failed. You can recompile this dependency with “mix deps.compile esqlite”, update it with “mix deps.update esqlite” or clean it with “mix deps.clean esqlite”
first time, I thought error caused by esqlite could not compile in Mix.
so I tried all of error commented command but error doesn't solved.
What I did to solve this error
I follow to IElixir github comment.
use mix local.rebar --force
add ~/.mix/ to PATH then try mix test again.
(base) kojiro#Inspiron7577:~/IElixir$ export PATH="$PATH:~/.mix/"
but error doensn't solved.
I already tried to search "Could not compile dependency :esqlite" but all environmentl situation is different.
Does someone know how to solve this situation?
I am not familiar with this problem, however I found some resources that might help you get Elixir working in jupyter (if ever you didn't already found them !) :
This medium post take you step by step through the installation, and also mention that is a Docker image that exists for it.
you can also find an installation tutorial with Docker here (different from the above mentioned one)
Hope it helps.

building brackets was "Done, without errors" in Debian Wheezy, but

i was trying to build "brackets sprint 40" from source code (by following #jasonsanjose instructions look #4816 and the official wiki's page here) in my 32bit Wheezy, Using CEF3 (Verion 3.1547.1406_linux32_release with glibc 2.13) and everything was OK .
when i ran grunt build and grunt installer the output was: Running "build" task
Running "build-linux" task
Done, without errors.
and when i installed .deb package and executed it in the terminal , this error has been thrown:brackets: libcef_dll/wrapper/libcef_dll_wrapper.cc:120: int CefExecuteProcess(const CefMainArgs&, CefRefPtr): Assertion `false' failed.
Aborted
I did rebuild it many times, but the problem persist.
And this is where i stopped, i don't know where the problem lies.
some help will be appreciated, thank you in advance.
There's a duplicate of this question with longer discussion posted here - https://github.com/adobe/brackets/issues/8170.
Note: This problem shouldn't affect a "vanilla" brackets-shell build on Linux -- it's specific to a hack some people have developed to support an older version of Debian than Brackets officially supports. This requires swapping in a newer version of the CEF library, which is not always easy to do since they are not usually backwards-compatible.

Compiling OpenCL on Ubuntu

My programming experience is about 1 year of C/C++ experience from high school, but I did my research and wrote a simple program with OpenCL a few months ago. I was able to compile and run this on an Apple computer relatively easily with g++ and the --framework option. Now I'm on my Ubuntu machine and I have no idea how to compile it. The correct drivers have been downloaded along with ATI's Stream SDK (I have an ATI Radeon HD5870). Any help would be appreciated!
Try
locate libOpenCL.so
If it is in one of the standard directories (most likely /usr/lib, or /usr/local/lib) you need to replace "--framework OpenCL" with "-lOpenCL". If g++ cannot find the lib you can tell g++ to look in a specific directory by adding "-L/path/to/library".
I wish I had my Linux to be more helpful... It is probably best if you redownload the ati-stream-sdk, after extracting it, open the Terminal and "cd /path/to/extracted/files"; in that directory execute make && sudo make install
make you probably know this from windows, this compiles, whatever needs to be compiled
&& chains commands together, the following commands will only be executed if the first command succeeded
sudo make install this will put the files in the expected places (sudo executes a command with superuser priviledges, you will have to enter your password)
Hope that helps.
You might be missing the dynamic libraries from the dynamic linker configuration.
Search for where the libraries are. Most likely /usr/lib, or /usr/local/lib.
Make sure the path location is also configured at one of these places:
LD_LIBRARY_PATH - you can set it in you environment shell, like .bashrc
/etc/ld.so.conf - you will need to call ldconfig to update the cache and it requires root access to change the file.
Reason
Aside from #bjoernz, my system can't find the libOpenCL.so file
It's because the correct file directory is missing
After searchig over the internet, I found out that libOpenCL.so file can provided by ocl-icd-opencl-dev package
Solution
You just need to install the package mentioned above by typing into cmd
sudo apt update
sudo apt install ocl-icd-opencl-dev
Therefore, libOpenCL.so can be found under /usr/lib/x86_64-linux-gnu/ folder
My System Information
OS: Ubuntu 16.04 LTS
GPU: NVIDIA GeForce GTX 660
GPU Driver: nvidia-375
OpenCL: 1.2
Reference:
[1] How to install libOpenCL.so on ubuntu
[2] How to set up OpenCL in Linux

Why does configure.sh think win32 is Unix?

I'm trying to build an application from source in windows that requires some Unix tools. I think it's the apparently standard ./configure; make; make install (there's no INSTALL file). First I tried MinGW but got confused that there was no bash, autoconf, m4, or automake exes in \bin. I'm sure I missed something obvious but I installed Cygwin anyways just to move forward. For some reason when I run
sh configure.sh
I get:
platform unix
compiler cc
configuration directory ./builds/unix
configuration rules ./builds/unix/unix.mk
My OS has identity problems. Obviously the makefile is all wrong since I'm not on unix but win32. Why would the configure script think this? I assume it has something to do with Cygwin but if I remove that I can't build it at all. Please help; I'm very confused.
Also is it possible to build using MinGW? What's the command for bash and is mingw32-make the same as make? I noticed they're different sizes.
Everything is fine. When you are inside CygWin, you are basically emulating an UNIX. sh runs inside CygWin, and thus identifies the OS correctly as Unix.
Have a look at GCW - The Gnu C compiler for Windows
Also, you might be interested in this help page, that goes into some detail about the minimal system (MSYS), such as how to install, configure et. c.
That should help you get bash, configure and the rest to work for MinGW as well.
From the Cygwin home page
Cygwin is a Linux-like environment for Windows. It consists of two parts:
A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
A collection of tools which provide Linux look and feel.
Since configure is using the Cygwin environment, it is interacting against the emulation layer and so it is just like it's working on a Unix environment.
Have you tried building the application and seeing if it works?

Resources