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