Forum Discussion
OpenCL 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 fine on Ubuntu as well. (just that it may not be supported) Thanks, Best Regards, Snth19 Replies
- Altera_Forum
Honored Contributor
Only RHEL 5.6 is officially supported. That said, the SDK should be able to be installed on any x86-64 Linux system. This of course will require Quartus II to be installed on the system as well as a prerequisite. The main barrier to this is using an actual board in an Ubuntu system. The PCIe driver is specific to the kernel version used by RHEL 5.6. So in theory you could use an Ubuntu machine to build/compile kernels, but the actual running of a program would need to occur on a system that has a working PCIe driver and board.
- Altera_Forum
Honored Contributor
Hi Swizzle,
Thanks for the heads-up. It was very useful. I think we will go with RHEL to avoid any embarrassments. Best Regards, Snth - Altera_Forum
Honored Contributor
Swizzle feedback is correct. I've tried AOCL with Ubuntu, and the major problem is related with the driver compilation. After being able to compile the aclpci_drv driver, the build script must be changed to look for the proper path of the linux headers, and afterwards the compiled .ko module never loads. Stick with RHEL, the driver compilation and loading is smooth.
The aclpci_drv while not reporting errors if loaded with modprobe is not loaded correctly. You should add a startup script that runs the aclpci_load script each time the system is booted up, for the driver to be correctly loaded. You can try aocl diagnostic to see if both driver and FPGA are up and running. - Altera_Forum
Honored Contributor
Thank you Andradx.. Given the complications, RHEL looks to be my best bet.
- Altera_Forum
Honored Contributor
One Last Question:
Altera doc says Redhat EL5.6 is required. Will this work with Redhat EL 6 as well? OR Should I go for Redhat 5.6 version alone? I am planning a Virtual Machine (using KVM) - I hope the tools work on top of a VM.... May be, I Should configure some PCIe Pass Through ? Any advice here? - Altera_Forum
Honored Contributor
I'm running CentOS 6.3. I matched only the kernel version and revision.
Regarding virtualization with PCIe devices, I tried some years ago Citrix with CUDA devices and the PCIe passthrough was possible, but tricky. Should you succeed in enabling the passthrough it should work. Not really much of a help, though. - Altera_Forum
Honored Contributor
I have tried CentOS 6.4 x86_64 (installation on my PC is very exhausting), it works! FYI
- Altera_Forum
Honored Contributor
--- Quote Start --- I have tried CentOS 6.4 x86_64 (installation on my PC is very exhausting), it works! FYI --- Quote End --- Just so that anyone trying to install on Ubuntu may know. As a production machine, the one where kernels are compiled, synthesized and P&R, Ubuntu fits just fine. In fact, we've been running a Ubuntu workstation for a while now with the Altera AOCL 13.0sp1 and it works just fine. However, if you are looking for a machine where you can install the FPGA board and download an OpenCL bitstream, then CentOS 6.4 x86_64 is right for you. It just works (almost) out-of-the-box. Sorry about not mentioning this before. - Altera_Forum
Honored Contributor
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? - Altera_Forum
Honored Contributor
--- 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.