Forum Discussion
aoc cannot find valid licences file
Hello. I'm trying out compiling Altera OpenCL on a new workstation. After acquiring the license file and installing Quartus II and OpenCL SDK. I tried to compile some OpenCL.
But aoc refuses to do so with the following message.marty@labpc:~$ aoc test.cl -o test --board c5soc
Could not acquire a valid license for the Intel(R) FPGA SDK for OpenCL(TM).
Error: Verilog generator FAILED.
Refer to test/test.log for details.
But I can launch Quartus successfully and I'm sure that I have OpenCL licences(It says so in Altera Licensing Center). Why is this happning. How can i diagnose this? OS: Ubuntu 16.04 CPU: Ryzen R7 1700X15 Replies
- Altera_Forum
Honored Contributor
Make sure the "LM_LICENSE_FILE" path is correct in your bashrc. If you are using Quartus v17.0, but acquired your license before v17.0 was released, you might need to request a new license from Altera. We were using the same license all the way from v15.0, but v17.0 rejected those licenses, so we had to acquire new ones. Also if you are on the v17.0 branch, make sure you are using v17.0.2; the latest update claims to have fixed some issue with valid licenses being rejected.
- Altera_Forum
Honored Contributor
I'm sure with that. I have set Quartus to use LM_LICENSE_FILE to loacate it's licsence and it works(starts and runs correctly). But somehow aoc does not find a valid licensee. Is there other possible reasons?
- Altera_Forum
Honored Contributor
The only other reason could be that your OpenCL license is invalid/expired. I suggest opening a service request with Altera directly regarding this issue.
- Altera_Forum
Honored Contributor
--- Quote Start --- The only other reason could be that your OpenCL license is invalid/expired. I suggest opening a service request with Altera directly regarding this issue. --- Quote End --- I am not so sure that that's the only other possible reason, nonetheless you're right, the issue surely deserves a service request. I've got the same problem but with the following differences: 1. my board is a Terasic DE1-SoC; 2. my Quartus installation is v. 16.1.2 SE. My system is running Ubuntu 16.04.3 as well. I can't install Quartus v. 17 since v. 16.1 is the highest one that is compatible with my board. Also in my case, Quartus works just fine with the license I installed, whose path is assigned to LM_LICENSE_FILE in /etc/profile, therefore it is in the environment of every login shell. Nonetheless, the aoc compiler doesn't find it as a valid license. From the knowledge base I gather that there was a workaround to a similar problem with quartus 14.1 (https://www.altera.com/support/support-resources/knowledge-base/solutions/rd02092015_394.html), requiring one to use the MAC address of eth0. Unfortunately, eth0 does not exist on my machine (no Ethernet port). I hope a better workaround will be found for the OpenCL SDK. - Altera_Forum
Honored Contributor
I have requested service from TerasIC (my board's manufacturer). They renewed the licences. But It still doesn't work. And they ended up advising me to run Windows instead of Ubuntu. Really!? WTF.
Maybe it is a problem with eth0. Newer Linux systems uses predictable network interface names. Which replaces eth0 with something like enp6. I have tried linking /dev/eth0 to /dev/enp6. Unfortunately it does not work. But his issue shouldn't exist in v 16. It should have need fixed long time ago. --Edit I found this in the knowledge base. You can disable PNIN or create a dummy interface. https://www.altera.com/support/support-resources/knowledge-base/embedded/2017/why-quartus-opencl-license-doesnt-work-on-centos-7-x-.html This solved my problem. - Altera_Forum
Honored Contributor
Pardon my ignorance, I had totally forgotten about the issue with the interface name. I am glad you finally got it to work.
- Altera_Forum
Honored Contributor
--- Quote Start --- (...) --Edit I found this in the knowledge base. You can disable PNIN or create a dummy interface. https://www.altera.com/support/support-resources/knowledge-base/embedded/2017/why-quartus-opencl-license-doesnt-work-on-centos-7-x-.html This solved my problem. --- Quote End --- Thanks a lot, the dummy interface creation worked for me as well! With only one minor adjustment: the "sudo ip li add dummy0 type dummy" command gave output "RTNETLINK answers: File exists", therefore I just repeated it with dummy1 replacing dummy0. Also, I guess that procedure ought to be kept in a script, to be run again if the system is rebooted. - Altera_Forum
Honored Contributor
Hello all,
I have the same problem as marty1885 I have installed version 17.0.2 in Ubuntu. The license file seems to work for Quartus, because I'm able to compile a VHDL example. However, I get the error message when trying to compile openCL code. I have unsuccessfully tried the solutions suggested in https://www.altera.com/support/support-resources/knowledge-base/embedded/2017/why-quartus-opencl-license-doesnt-work-on-centos-7-x-.html In any case, thanks to HRZ and GiuseppeScollo for their contributions. I am quite frustrated because I had the same problem before with version 16, and I've updated just to overcome that issue. Is there a way, at least, that openCL provides more information about what it's going wrong? BTW, I'm trying to compile for the HARP system. Best, Roberto - Altera_Forum
Honored Contributor
Do you get an invalid license error or some other error? The "quartus_sh_compile.log" file is the main compilation log with all the compilation info in it.
- Altera_Forum
Honored Contributor
Hello, this is the message I get:
Could not acquire a valid license for the Intel(R) FPGA SDK for OpenCL(TM). Error: Verilog generator FAILED With respect to "quartus_sh_compile.log", I cannot find it. I guess it is generated by Quartus, while I'm running command line. Despite I cannot compile for synthesis, I can compile for emulation. My License file seems to be ok and available: $ echo $LM_LICENSE_FILE /home/harp/intelFPGA/LICENCIA/1-G9LVJF_License.dat But, the most important thing is that the license works for Quartus. There seems to be a problem with OpenCL as a "secondary product" to Quartus. I found the license problem with 2 different projects: the vector_addition example; and another one provided by the HARP guys. It's maybe a matter of starting a service request? Roberto