Hi,I'm trying to compile a kernel for the de1-soc on Ubuntu 16.04. The computer has 40 GB of RAM and 40 GB of swap, but still runs out of memory after 2 hours into the compilation when "aocl-opt" is running. Any idea of why this is happening? I cannot possibly need more than 80 GB of memory. I have successfully compiled smaller kernels.
The memory recommendations in Altera's OpenCL docs are mostly for placement and routing and not OpenCL conversion/optimization, the latter doesn't need more than a few GBs of memory in most cases. Still, I have seen cases where the OpenCL optimization process runs into some kind of a deadlock or memory leak and even fills 256 GB of memory until it runs out of memory and crashes; your case is very likely similar. I am afraid in such cases there is no choice but to follow another approach or use some other algorithm for your kernel. This happens if the algorithm is not suitable for FPGA synthesis or the kernel has been written in a way that the compiler cannot understand and optimize it properly.
Surely it can't be that difficult to debug the compiler and at least issue some kind of error message in this case.
It makes OpenCL on Intel FPGAs a lot less attractive if there is a constant risk looming to run into such cases .