[SOLVED] Archlinux + OpenCL - XU4

Moderators: odroid, mdrjr

[SOLVED] Archlinux + OpenCL - XU4

Unread postby jmscaramal » Thu Jan 12, 2017 2:12 am

Hello guys... first of all, I'm sorry if there's a similar question about this, but i searched all forum and read a related topic (OpenCL XU3 Ubuntu), and unfortunately, I still couldn't run any OpenCL example.
I have an odroid-XU4 board running ArchLInux ( https://archlinuxarm.org/platforms/armv ... odroid-xu4 ) .

I've download the Mali OpenCL SDK for ARM from: http://malideveloper.arm.com/develop-fo ... pencl-sdk/

... changed the platform.mk to (I'm trying to compile directly on XU4):

Code: Select all
CC:=g++
AR=ar


Tried the 64_bit_integer example... I was able to built the files successfully (make), however, when I try to run the executable (./64_bit_integer) I'm getting the following error:

OpenCL error: Unknown error
Retrieving OpenCL platforms failed. common.cpp:233
Failed to create an OpenCL context. 64_bit_integer.cpp:53

I'm not sure about what packages / drivers I need install before running these examples, since I'm running a clean install of ArchLinux.

So, could You help me to configure and run the OpenCL examples? (I need to code some OpenCL code )....

Thanks in advance
Last edited by jmscaramal on Fri Jan 13, 2017 3:30 am, edited 2 times in total.
User avatar
jmscaramal
 
Posts: 5
Joined: Sat May 16, 2015 3:27 am
languages_spoken: portugues,english
ODROIDs: ODROID-U3
ODROID-XU4

Re: Archlinux + OpenCL - XU4

Unread postby rooted » Thu Jan 12, 2017 8:01 am

Try running it as sudo, may be a permission issue.
User avatar
rooted
 
Posts: 3292
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Archlinux + OpenCL - XU4

Unread postby odroid » Thu Jan 12, 2017 11:34 am

We tested the OpenCL SDK on Ubuntu only.

Can you run any OpenGL-ES application on your Arch?
What is the result of "glmark2-es2"?
User avatar
odroid
Site Admin
 
Posts: 21862
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Archlinux + OpenCL - XU4

Unread postby jmscaramal » Fri Jan 13, 2017 3:30 am

First of all.. I'm sorry for replying only now... I forgot to check the "Notify me when a reply is posted"... My bad.... :oops:

rooted wrote:Try running it as sudo, may be a permission issue.

Thanks for the help... I could run it with the sudo command... It was in fact a permission issue. :D

odroid wrote:We tested the OpenCL SDK on Ubuntu only.

Can you run any OpenGL-ES application on your Arch?
What is the result of "glmark2-es2"?


Thanks for replying... At the moment, I'm not using any desktop environment! Anyway..with the sudo command, it worked!
User avatar
jmscaramal
 
Posts: 5
Joined: Sat May 16, 2015 3:27 am
languages_spoken: portugues,english
ODROIDs: ODROID-U3
ODROID-XU4

Re: [SOLVED] Archlinux + OpenCL - XU4

Unread postby jmscaramal » Fri Jan 13, 2017 3:55 am

If it's not asking too much, since it is a permission issue, could you tell me what file devices should I give permission for the regular user? Or maybe, what group should I add the regular user in order to run any opencl program?
User avatar
jmscaramal
 
Posts: 5
Joined: Sat May 16, 2015 3:27 am
languages_spoken: portugues,english
ODROIDs: ODROID-U3
ODROID-XU4

Re: [SOLVED] Archlinux + OpenCL - XU4

Unread postby rooted » Fri Jan 13, 2017 5:01 am

I have no experience with OpenCL I just know it's accelerated, does it use the /dev/video* interface?

Try adding yourself to the video group, I doubt it will work though.
User avatar
rooted
 
Posts: 3292
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: [SOLVED] Archlinux + OpenCL - XU4

Unread postby jmscaramal » Fri Jan 13, 2017 5:29 am

rooted wrote:I have no experience with OpenCL I just know it's accelerated, does it use the /dev/video* interface?

Try adding yourself to the video group, I doubt it will work though.


Yeah... I've already tried that.. It's not the video group... I think I'll try figure it out empirically.... :idea:
User avatar
jmscaramal
 
Posts: 5
Joined: Sat May 16, 2015 3:27 am
languages_spoken: portugues,english
ODROIDs: ODROID-U3
ODROID-XU4

Re: [SOLVED] Archlinux + OpenCL - XU4

Unread postby jmscaramal » Fri Jan 13, 2017 5:56 am

rooted wrote:I have no experience with OpenCL I just know it's accelerated, does it use the /dev/video* interface?

Try adding yourself to the video group, I doubt it will work though.


Solved... I found a link with instructions for installing MALI opencl driver on a chromebook (http://krblogs.com/post/65347946766/mal ... chromebook ). One of the steps is:

"Create a udev rule so that users in ‘video’ group can access mali device. Create a file say '10-mali.rules’ in /etc/udev/rules.d/ and add this

KERNEL==“mali[0-9]”, GROUP=“video” MODE=“0660” ". So, I created the following file /etc/udev/rules.d/50-mali.rules containing:
Code: Select all
KERNEL=="mali0", MODE="0666", GROUP="video"


after a reboot, I could run the samples with the regular user.

Thanks for the replies guys! :D
User avatar
jmscaramal
 
Posts: 5
Joined: Sat May 16, 2015 3:27 am
languages_spoken: portugues,english
ODROIDs: ODROID-U3
ODROID-XU4

Re: [SOLVED] Archlinux + OpenCL - XU4

Unread postby rooted » Fri Jan 13, 2017 8:00 am

Good work, thanks for coming back with the solution.
User avatar
rooted
 
Posts: 3292
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)


Return to Other OS

Who is online

Users browsing this forum: No registered users and 1 guest