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

Warnings coming from libalteracl?

Altera_Forum
Honored Contributor II
1,734 Views

After a great deal of work along with help from Altera and the Card vendor, we now have a working kernel flashed onto the card. We were also able to compile the host program and as such we attempted to run it. When we did we got the following error messages.  

 

First: 

WARNING: NOT using DMA for transfer of size 1024 because of lack of alignment src ptr = 0x7fa01dffd850, dst ptr = 0x2010080, reading = 0 000000000000000000000000000000000000000000000000e4ae120000000000 

 

followed by: 

WARNING: NOT using DMA for transfer of size 1024 because of lack of alignment src ptr = 0x2010080, dst ptr = 0x7fa01dffd850, reading = 1 

 

neither of these message are coming from the host program. Does anyone have any insight into what these messages mean? 

 

-Aaron
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
429 Views

The address alignment problem ("WARNING: NOT using DMA for transfer of size 1024 because of lack of alignment"). When we malloc memory for the host, please align the address first before use in the host program.

0 Kudos
Altera_Forum
Honored Contributor II
429 Views

 

--- Quote Start ---  

The address alignment problem ("WARNING: NOT using DMA for transfer of size 1024 because of lack of alignment"). When we malloc memory for the host, please align the address first before use in the host program. 

--- Quote End ---  

 

 

Exactly. It's explained in the optimization guide (http://www.altera.com/literature/hb/opencl-sdk/aocl_optimization_guide.pdf), page 1-7. It says the data should be 64-byte aligned. 

 

In my case, without proper alignement, one of my memory transfers and kernel execution takes ~300secs. With alignment, it gets down to ~3sec. So you better align it. :D
0 Kudos
Altera_Forum
Honored Contributor II
429 Views

If you take a look at any of the example designs (except hello world) you'll see code fragments that you can use to align these buffers on Windows and Linux hosts. I recommend making the alignment a macro just in case you change to a platform that requires an even larger alignment.

0 Kudos
Altera_Forum
Honored Contributor II
429 Views

Also please see our optimization guide (http://www.altera.com/literature/hb/opencl-sdk/aocl_optimization_guide.pdf), section "Aligned Memory Allocation".

0 Kudos
Reply