Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17256 Discussions

OpenCL diagnose not working

Altera_Forum
Honored Contributor II
2,423 Views

Hi, 

 

 

We have just started working with the Bittware's S5-PCIe-HQ board and there is a problem when using OpenCL. We have checked the forum but so far we haven't seen a problem like this. 

 

 

Just a little background: the system is configured with CentOS 64bit, Quartus Subscription Edition and the LM_LICENSE_FILE environment variable was added to the .bashrc file. With Quartus, a .rbf file (with a basic VHDL program to control the LEDs) can be generated and using Bittworks Toolkit (bwconfig), the file can be loaded as long as the USB cable is connected. Bwconfig does not detect the card through the PCIe because is brand new.  

 

 

Regarding OpenCL, after following the instructions on the Altera SDK for OpenCL Getting Started Guide and running the aocl install on terminal, this is what comes up: 

 

aocl install: Running install from /shared/altera/apbpp_v14.0/linux64/libexec Using kernel source files from /usr/src/kernels/2.6.32-431.23.3.el6.x86_64 make: Entering directory `/usr/src/kernels/2.6.32-431.23.3.el6.x86_64' CC /tmp/opencl_driver_PfH8ac/aclpci_queue.o CC /tmp/opencl_driver_PfH8ac/aclpci.o CC /tmp/opencl_driver_PfH8ac/aclpci_fileio.o CC /tmp/opencl_driver_PfH8ac/aclpci_dma.o CC /tmp/opencl_driver_PfH8ac/aclpci_cvp.o CC /tmp/opencl_driver_PfH8ac/aclpci_cmd.o LD /tmp/opencl_driver_PfH8ac/aclpci_drv.o Building modules, stage 2. MODPOST 1 modules CC /tmp/opencl_driver_PfH8ac/aclpci_drv.mod.o LD /tmp/opencl_driver_PfH8ac/aclpci_drv.ko.unsigned NO SIGN /tmp/opencl_driver_PfH8ac/aclpci_drv.ko  

 

After that, when running aocl diagnose, it shows this: 

 

aocl diagnose: Running diagnostic from /shared/altera/apbpp_v14.0/linux64/libexec Verified that the kernel mode driver is installed on the host machine. Using board package from vendor: BittWare Inc Querying information for all supported devices that are installed on the host machine ... Found no active device installed on the host machine. Please make sure to: 1. Set the environment variable AOCL_BOARD_PACKAGE_ROOT to the correct board package. 2. Install the driver from the selected board package. 3. Properly install the device in the host machine. 4. Configure the device with a supported OpenCL design. 5. Reboot the machine if the PCI Express link failed. DIAGNOSTIC_FAILED  

 

As the board works with .rbf files and is even detected using lspci, this could be related to suggestion number 4. Based on this, a few examples codes were downloaded (hello_world_d5.zip, dma_master.zip, pcie_ddr3_dma.zip).  

 

 

Regarding hello_world, when trying to compile it, an error shows up: 

 

Error: aoc: Can't find a valid license for the Altera SDK for OpenCL  

 

With the other two examples, the rbf file is generated properly in Quartus using the instructions in the readme of the pcie_ddr3_dma but when running dma_master, this is what comes up: 

 

pci_cfg irq pin: 0 irq line: 0 Segmentation fault (core dumped)  

 

As Quartus works fine with the license file and there is even a line in it for OpenCL, doesn't look like the license file could be the problem but we don't know if we are missing something. We have been trying different steps but non of them seem to work. The problem right now is that we are not sure how to proceed with this, to make OpenCL work on the card. 

 

 

Regards, 

Carlos
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
1,629 Views

Carlos, 

 

Have you opened a support issue on our developer site at developer.bittware.com ? You seem to be mixing OpenCL and non-OpenCL examples, and also have something missing with your license setup as the OpenCL tools can't find a license while Quartus can. 

 

Ron
0 Kudos
Altera_Forum
Honored Contributor II
1,629 Views

Hi, 

 

we have the same board (in a Ubuntu 12.10 machine) and we recently had some problems updating to v14, that could be solved. 

 

Would you post the relevant lines of lspci -v concerning the device, esp. with the subsystem number? 

 

What does dmesg say when you rmmod and modprobe the driver "aclpci_drv" ? 

 

Do you have a /dev/acl0-device? 

 

Does cat /proc/devices list "acl" ? 

 

Yet s.th. seems to be wrong with the license as aoc should be working. We are using a University License, not the one provided by BW. The Altera self-service licensing-center shows SW-OPENCL-SDK/UNIV 

 

Greetings, 

 

Franz
0 Kudos
Altera_Forum
Honored Contributor II
1,629 Views

given the license file supposedly is not available, I would double check for LM_LICENSE_FILE is actually set properly in the terminal instance that you are trying to compile from.

0 Kudos
Altera_Forum
Honored Contributor II
1,629 Views

Hi everyone, thank you for the help. 

 

Ron, you are correct, I have been mixing examples but is because I was trying every idea possible, since I thought my problem could be related with the fact that there was nothing loaded on the FPGA. And I just realized that I had a typo in the license environment variable. I will try to compile another OpenCL example as soon as I can to see if the compilation error goes away. 

 

Franz, these are the answers to your questions: 

-Would you post the relevant lines of lspci -v concerning the device, esp. with the subsystem number? 

01:00.0 Unassigned class : Altera Corporation Device ab00 (rev 01) Subsystem: Altera Corporation Device 0004 Flags: bus master. fast devsel, latency 0, IRQ 14 Memory at f0000000 (64-bit, prefetchable) Capabilities: <access denied> Kernel modules: bwtkdrvr 

 

What does dmesg say when you rmmod and modprobe the driver "aclpci_drv" ? 

Sorry, but I didn't really understand what you were looking for here, so I attached a file where I logged my terminal when doing these commands. 

 

Do you have a /dev/acl0-device? 

No 

 

Does cat /proc/devices list "acl" ? 

Yes, under “Character devices”, it says “245 acl” 

 

By the way, even though I fixed the license environment variable, aocl diagnose still complains there are no active devices. 

 

Regards, 

Carlos
0 Kudos
Altera_Forum
Honored Contributor II
1,629 Views

other than the fact that I was using windows, this is what happened to me when I had the "compressed" checkbox marked when loading the fpga.

0 Kudos
Altera_Forum
Honored Contributor II
1,629 Views

Hi, 

 

the output of lspci should contain  

Altera Corporation Device 0005 

 

so the v14 device driver never registers to manage the board. 

 

I was in the same situation. The reason was, that the v14 hello_world.rbf from Bittware (or any other v14 rbf for the board) has to be loaded to the fpga and flash with _unchecked_ "compressed" box in bwconfig-gui (it is now fixed in the doc and there is a thread featuring this in this forum). After that, the board driver should be loaded automatically. 

 

With dmesg I ment simply typing "dmesg" in the terminal to get the output of the kernel debug buffer. There you can see, whether the driver is actually used after having been loaded (on startup after having executed aocl install before)
0 Kudos
Altera_Forum
Honored Contributor II
1,629 Views

Hi, 

 

Franz, thanks for the advice: 

 

 

--- Quote Start ---  

I was in the same situation. The reason was, that the v14 hello_world.rbf from Bittware (or any other v14 rbf for the board) has to be loaded to the fpga and flash with _unchecked_ "compressed" box in bwconfig-gui (it is now fixed in the doc and there is a thread featuring this in this forum). After that, the board driver should be loaded automatically. 

--- Quote End ---  

 

 

I tried to follow your suggestion about loading the example with the "compressed" box unchecked but didn't work. I ended up downloading an example compiled with v13 and now the card is recognized when doing "aoc diagnostic".  

 

Now, with lspci a few things have changed. I was just wondering that even though it says "Unassigned device", everything seems ok: 

01:00.0 Unassigned class : Altera Corporation Device d800 (rev 01) Subsystem: Altera Corporation Device 0005 Flags: bus master. fast devsel, latency 0, IRQ 16 Memory at f0000000 (64-bit, prefetchable) Capabilities: <access denied> Kernel driver in use: aclpci Kernel modules: acl_pci_drv  

 

Thank you guys for the help, 

Carlos
0 Kudos
Reply