[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Getting started with OpenCL on the Parallella

Getting started with OpenCL on the Parallella

Moderator: dar

Getting started with OpenCL on the Parallella

Postby smoothy » Tue Jul 05, 2016 6:31 pm

Hi,

I thought it would be nice to share some experience on getting started with OpenCL, COPRTHR and STDCL on the Parallella board.

After a few hair-ripping attempts to install coprthr 1.6.0, I followed this guide here:



I didn't install the optional packages m4-1.4.16, flex-2.5.35 and bison-2.5 since m4 and bison had some make errors in previous attempts even though I installed them in the correct order.

The packages libelf, libevent and libconfig are mandatory however before installing COPRTHR. Simply download these packages following the links in the guide,
unzip with tar -xzvf file.tar.gz
cd into the new folder
./configure
sudo make install

I went for the pre-build browndeer package which is pre-installed on the newest Linaro desktop version 14.04.
DO NOT run the uninstall script when you're in the /usr/local/ directory since this will remove the browndeer directory.
Then run sudo ./browndeer/scripts/install_coprthr_parallella.sh
For me, this went fast since the terminal says most files already existed, so I guess it was preinstalled.
Then I set the 2 paths for root and user as described in the guide, copied the test and examples directories into my Work folder existing in /home/linaro with

cp -R /usr/local/browndeer/examples ./Work
cp -R /usr/local/browndeer/test ./Work

Then go into test folder and execute the test as root.

cd Work/test
sudo su
make quicktest

Very important to note is that all the tests should finish with [pass], except for the test
test_stdcl_ndev_float4 stddev 1
which is expected to [fail], which shouldn't be a problem.

Now that COPRTHR seems to be set up and good to go, I want to start programming and testing.
I cd into /Work/examples/parallella/hello_opencl
and run the compile cmd as provided in the README.txt file:

gcc hello_opencl.c -o hello_opencl.x -I/usr/local/browndeer/include \ -L/usr/local/browndeer/lib -lcoprthr-e
/usr/bin/ld: cannot find -lcoprthr-e
collect2: error: ld returned 1 exit status

I successfully reinstalled COPRTHR using the latest stable version from source
and still get the same error. Running the other browndeer examples won't work for me either.
Somehow the path does not seem to be set correctly and the linker doesn't seem find the file. Could anybody give me some support on how to fix this please?

Cheers
Last edited by smoothy on Tue Jul 12, 2016 1:33 pm, edited 2 times in total.
smoothy
 
Posts: 6
Joined: Sun Jul 03, 2016 4:13 pm

Re: Getting started with OpenCL on the Parallella

Postby smoothy » Wed Jul 06, 2016 2:27 pm

Has nobody ever encountered this problem beforer? It seems that my linker can't find the library statically, also the path looks wrong. I saw in one of the very first posts here that lcoprthr-e seems to be the platform implementation for the epiphany arcitecture. But I still couldn't find a way to fix this.

please help...
smoothy
 
Posts: 6
Joined: Sun Jul 03, 2016 4:13 pm

Re: Getting started with OpenCL on the Parallella

Postby smoothy » Mon Jul 11, 2016 11:52 pm

Ok then, I guess the compile cmd in the README.txt is simply out of date or something...
So I couldn't find a coprthr-e file anywhere, but compiling the hello_opencl example with ocl should do the trick:

gcc -o hello_opencl.x hello_opencl.c -I/usr/local/browndeer/include \-L/usr/local/browndeer/lib -locl
smoothy
 
Posts: 6
Joined: Sun Jul 03, 2016 4:13 pm

Re: Getting started with OpenCL on the Parallella

Postby Fabian » Fri Oct 28, 2016 2:29 pm

Fabian
 
Posts: 10
Joined: Wed Aug 31, 2016 7:54 am

Re: Getting started with OpenCL on the Parallella

Postby jar » Fri Oct 28, 2016 5:26 pm

I think some of those quicktest codes are expected to fail. So carry on.

With that said, OpenCL isn't really the best model for Epiphany as I've said many times in other posts on the forum.
User avatar
jar
 
Posts: 295
Joined: Mon Dec 17, 2012 3:27 am

Re: Getting started with OpenCL on the Parallella

Postby Fabian » Wed Nov 02, 2016 7:26 am

Fabian
 
Posts: 10
Joined: Wed Aug 31, 2016 7:54 am

Re: Getting started with OpenCL on the Parallella

Postby jar » Wed Nov 02, 2016 1:34 pm

OpenMP works if your problem is trivially parallel (no inter-core synchronization). I saw there were some new examples published recently.

The eSDK is okay if you don't mind writing the primitives you may need, but it's non-standard and takes some effort to learn.

I'm working to get OpenSHMEM support with eSDK and COPRTHR-2 (which has a partial implementation of MPI) and the 2016.3 image, but there are a lot of moving pieces that I do not control. It might be one or two months. I know that doesn't help you now.
User avatar
jar
 
Posts: 295
Joined: Mon Dec 17, 2012 3:27 am

Re: Getting started with OpenCL on the Parallella

Postby Fabian » Wed Nov 02, 2016 5:00 pm

Thanks for your answer.

I have been working with the eSDK so far. I was just looking for smarter ways to implement on the epiphany. I might look at OpenMP as well.
Fabian
 
Posts: 10
Joined: Wed Aug 31, 2016 7:54 am


Return to OpenCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron