Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

Error message during clCreateProgramWithBinary - WARNING: [acla10_ref0] NOT using DMA

I have a kernel that has been flashed on the a10gx board (Arria10 PCIe). I built the .aocx file with the aoc tool. I flashed the FPGA with aocl tool before executing the OpenCL application.

My OpenCL application does a series of call to the OpenCL API (initialization, etc...), at some point I have a call to clCreateProgramWithBinary and this is what I get in the console:

What could trigger the warning?

Reprogramming device [0] with handle 1

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a497a4010) and/or dev offset (0x10000) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a47b74010) and/or dev offset (0x171800) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a47a12010) and/or dev offset (0x2d3000) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a478b0010) and/or dev offset (0x434800) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a4774e010) and/or dev offset (0x596000) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a475ec010) and/or dev offset (0x6f7800) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a4748a010) and/or dev offset (0x859000) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a47328010) and/or dev offset (0x9ba800) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a471c6010) and/or dev offset (0xb1c000) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a47064010) and/or dev offset (0xc7d800) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a46f02010) and/or dev offset (0xddf000) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from host to device because of lack of alignment

** host ptr (0x7f3a46da0010) and/or dev offset (0xf40800) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from device to host because of lack of alignment

** host ptr (0x7f3a46c3e010) and/or dev offset (0x10a2000) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from device to host because of lack of alignment

** host ptr (0x7f3a46adc010) and/or dev offset (0x1203800) is not aligned to 64 bytes

** WARNING: [acla10_ref0] NOT using DMA to transfer 1447200 bytes from device to host because of lack of alignment

** host ptr (0x7f3a4697a010) and/or dev offset (0x1365000) is not aligned to 64 bytes

*** Error in `/home/xxxx/workspace/yyyy/build/Debug/zzzzzzzz': free(): invalid pointer: 0x000000000040d65a ***

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Host/device data transfer via DMA needs the host buffer to be 64-byte-aligned or else DMA will not work and you will get those warnings. Please read "Intel® FPGA SDK for OpenCL Best Practices Guide, 1.3.4 Allocate Aligned Memory" for instructions as to how you can allocate aligned memory on the host.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Host/device data transfer via DMA needs the host buffer to be 64-byte-aligned or else DMA will not work and you will get those warnings. Please read "Intel® FPGA SDK for OpenCL Best Practices Guide, 1.3.4 Allocate Aligned Memory" for instructions as to how you can allocate aligned memory on the host.

    --- Quote End ---

    Hi, Thank you for the prompt feedback. I came across the documentation you mentioned at the end of last week. It would be good to have this specific memory allocation in the Hello World sample code.

    I have IN/OUT buffers as parameters to the kernel. I had to use the posix_memalign() to fix the warning issue.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The Hello Word example does not have any host/device transfer and hence, this issue doesn't apply to it. However, all the other examples already use aligned memory allocation.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    The Hello Word example does not have any host/device transfer and hence, this issue doesn't apply to it. However, all the other examples already use aligned memory allocation.

    --- Quote End ---

    Sorry if I have not been clear enough. My comments was related to the fact that it would be good to have a sample code showing this specific memory allocation. Based on your comment, I understand there are other sample codes showing this memory allocation, I will look for them.

    Thanks,