Forum Discussion
Altera_Forum
Honored Contributor
13 years agoOpenCL SDK on Ubuntu
Hi,The OpenCL SDK Release page says that Redhat EL 5.6 is the only supported Linux distribution. We have a server with 32G RAM running Ubuntu 12.04.I am just curious to know if OpenCL SDK will run...
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- On my CentOS 6.4 x86_64 machine I can compile with aoc but I can't run my host code without adding $ALTERAOCLSDKROOT/host/linux64/lib to the LD_LIBRARY_PATH. However, that directory has a version of libstdc++ that conflicts with the system version of libstdc++, so some other applications don't load for me while my library path includes the Altera library path. Does anyone else experience this or any other issues with CentOS 6.4 x86_64? --- Quote End --- Sure. For runtime you'll need the libstdc++ that is shipped with the AOCL. I'd say the best way to go around it is to call your executables from a script that exports $ALTERAOCLSDKROOT/host/linux64/lib to your LD_LIBRARY_PATH temporarily. Otherwise, it can be somewhat annoying if you try to run your OpenCL application also on a GPU and you constantly need to redefine LD_LIBRARY_PATH. You name the following as runAOCL # !/bin/bash ldBak=$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ALTERAOCLSDKROOT/host/linux64/lib $1 export LD_LIBRARY_PATH=ldBak and just call runAOCL <myexecutable> Although I'm not that sure about how to handle several arguments to your executable, something quite similar should work.