Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
699 Discussions

Running oneAPI C++SYCL_FPGA GettingStarted Example on devcloud

JSYOO
Novice
1,780 Views

Hello,

I am quite new to everything and I tried to run some examples in

oneAPI-samples/DirectProgramming/C++SYCL_FPGA/Tutorials/GettingStarted
/fpga_compile/

(https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL_FPGA/Tutorials/GettingStarted/fpga_compile)

 

I've heard using modelsim or questa on devcloud is not possible, so I am trying to compile and run fpga_emu, report and fpga. (without the simulation using modelsim)

 

Actually, I already run these examples recently.

I remember it was last Monday.

But, I tried it again today with same steps, but it was very different from the last time.

 

The steps I took last time:

1. log in to devcloud using MobaXterm using

     $ ssh devcloud

2. access node using

     $ devcloud_login

    I chose number 2 which included ARRIA10 oneAPI

3. move to the project directory and make build directory

4. in build directory, do

     $ cmake .. -DFPGA_DEVICE=ARRIA10

5. compile and run fpga_emu

     $ make fpga_emu

     $ ./vector_add.fpga_emu

6. compile and look at report

     $ make report

     ** I could not find any way to open the report file (vector_add_report.prj/reports/reports.html) so I had to zip the report folder and transfer it to my local laptop and open it there. Please let me know if there is any better way to see the reports.html file in ssh!**

7. compile and run fpga

     $ make fpga

     $./vector_add.fpga

 

I remember that these were the steps I took and all compiled and showed the results correctly with no errors.

Last time, I also compiled fpga_emu and report for ReferenceDesigns/matmul example with no errors.

 

 

But today, I had problems starting from step 5 above (fpga_emu compile).

So, I accessed it in fpga compile node by (instead of the step 2 above: devcloud_login)

     $ qsub -I -l nodes=1:fpga_compile:ppn=2 -d . 

 

This allowed me to compile fpga_emu, report and fpga.

But running the fpga compile result file did not work

 

To overcome this problem, I tried:

i) log in to runtime node by 

     $ qsub -I -l nodes=1:fpga_runtime:arria10:ppn=2 -d .

ii) do

     $ cmake .. -DFPGA_DEVICE=/opt/intel/oneapi/intel_a10gx_pac:pac_a10

     instead of step 4 (cmake .. ) above

iii) initialize fpga. Did not reach this step because error occurred when doing 

     $ aocl diagnose all

     error msg when I tried the command after connecting to runtime node as (i):

--------------------------------------------------------------------
ICD System Diagnostics
--------------------------------------------------------------------

Using the following location for ICD installation:
/etc/OpenCL/vendors

WARNING: Skipping ICD validation since there is no ICD entry at this location

Using OCL_ICD_FILENAMES to search for ICD clients, it is set to libintelocl.so

Checking LD_LIBRARY_PATH for registered libraries specified by OCL_ICD_FILENAMES
libintelocl.so was registered on the system at /glob/development-tools/versions/oneapi/2023.2.0.1/oneapi/compiler/2023.2.1/linux/lib/x64

ERROR: No ICD entry and all files specified by OCL_ICD_FILENAMES are invalid
--------------------------------------------------------------------
ICD diagnostics FAILED
--------------------------------------------------------------------
--------------------------------------------------------------------
BSP Diagnostics
--------------------------------------------------------------------
/glob/development-tools/versions/oneapi/2023.2.0.1/oneapi/compiler/2023.2.1/linux/lib/oclfpga/board/intel_a10gx_pac/linux64/libexec/diagnose: error while loading shared libraries: libopae-c.so.1: cannot open shared object file: No such file or directory

 

 

To summerize, I was curious 

 - why it worked last time so simply but it does not work now

 - how to initialize FPGA in devcloud if I should do it

 - any other things I missed to run the examples?

 

Thanks in advance,

Junsang Yoo

0 Kudos
1 Solution
aikeu
Employee
1,597 Views

Hi JSYOO,


The error "Caught a synchronous SYCL exception: NULL pointer .." is expected as you are targetting a specific device family. This flow (HLS SYCL Flow) produce RTL IP Core and are meant to be integrated into a system using Quartus/PD . *The 2 FPGA Development Flow can be referred here Intel oneAPI FPGA Development Flow.


As for As for "Error: The board package being used only supports report generation/emulation/runtime" it maybe due to the node used on DevCloud is not working properly. Can try other node and check if the same error will occur or not.


Thanks.

Regards,

Aik Eu


View solution in original post

0 Kudos
7 Replies
aikeu
Employee
1,744 Views

Hi JSYOO,


Report (.html) can be open using any internet browser, unfortunately devcloud or jupertyLab does not support that so user has to transfer whole folder to read it locally.

qsub -I -l nodes=1:fpga_compile:ppn=2 -d  should be working fine. Maybe is related to board initialization:

https://www.intel.com/content/www/us/en/docs/oneapi/programming-guide/2023-0/fpga-board-initialization.html


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,686 Views

Hi JSYOO,


May I know any further follow up on the case?


Thanks.

Regards,

Aik Eu


0 Kudos
JSYOO
Novice
1,670 Views

Hi Aik,

Thanks for the reply and sorry for the late response

 

I am still stuck in executing FPGA compiled file.

I've tried

 - Getting started vector add example

 - Reference design matmul example

 

Both worked fine for fpga emulation compile and execution.

But both were aborted for fpga execution (compile worked)

 

first, I compiled using -DFPGA_DEVICE=arria10 option in compile node.

Then, I did

     $ aocl diagnose

command on arria10 runtime node and found "/opt/intel/oneapi/intel_a10gx_pac" device and that it did not support usm.

following the board initialization link (https://www.intel.com/content/www/us/en/docs/oneapi/programming-guide/2023-0/fpga-board-initialization.html) that you showed me, I initialized using 

     $ aocl initialize acl0 pac_a10

and initialization success message showed up.

But when I try to run the compiled fpga file, it was aborted for both vector add and matmul example.

matmul example showed more precise error messege with:

Caught a synchronous SYCL exception: NULL pointer argument in memory copy operation. -30 (PI_ERROR_INVALID_VALUE)
If you are targeting an FPGA hardware, ensure that your system is plugged to an FPGA board that is set up correctly

 

I tried another way of compiling using

     $ cmake .. -DFPGA_DEVICE=intel_a10gx_pac:pac_a10

to make the -Xstarget option same as the board initialization link (the same linke as above).

But but I wasn't able to compile using

     $ make fpga

when using this DFPGA_DEVICE option with 

Error: The board package being used only supports report generation/emulation/runtime, please use the board package shipped in the FPGA addon instead.

 

In conclusion I tried with the initializations, but was not able to compile and execute using fpga

 

Thanks,

Junsang Yoo

0 Kudos
aikeu
Employee
1,598 Views

Hi JSYOO,


The error "Caught a synchronous SYCL exception: NULL pointer .." is expected as you are targetting a specific device family. This flow (HLS SYCL Flow) produce RTL IP Core and are meant to be integrated into a system using Quartus/PD . *The 2 FPGA Development Flow can be referred here Intel oneAPI FPGA Development Flow.


As for As for "Error: The board package being used only supports report generation/emulation/runtime" it maybe due to the node used on DevCloud is not working properly. Can try other node and check if the same error will occur or not.


Thanks.

Regards,

Aik Eu


0 Kudos
aikeu
Employee
1,545 Views

Hi JSYOO,


Any further follow up regarding the issue?


Thanks.

Regards,

Aik Eu


0 Kudos
JSYOO
Novice
1,472 Views

Hi Aik,

 

Running and compiling on different node worked well.

 

Thanks,

Junsang Yoo

0 Kudos
aikeu
Employee
1,462 Views

Hi JSYOO,


Thanks. for the respond. I am closing the threa for now.

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


Thanks.

Regards,

Aik Eu


0 Kudos
Reply