Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1803 Discussions

How do I compile the vector-add example for the FPGAs?

mrakgr
New Contributor I
1,835 Views
u204476@s001-n059:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add$ qsub -I -l nodes=1:fpga_compile:ppn=2 -d .
qsub: waiting for job 2383026.v-qsvr-1.aidevcloud to start
qsub: job 2383026.v-qsvr-1.aidevcloud ready


########################################################################
#      Date:           Fri 06 Oct 2023 03:26:58 AM PDT
#    Job ID:           2383026.v-qsvr-1.aidevcloud
#      User:           u204476
# Resources:           cput=75:00:00,neednodes=1:fpga_compile:ppn=2,nodes=1:fpga_compile:ppn=2,walltime=06:00:00
########################################################################

u204476@s001-n067:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add$ ./build.sh
mkdir: cannot create directory ‘build’: File exists
-- Configuring the design to run on FPGA device intel_a10gx_pac:pac_a10
-- Configuring done
-- Generating done
-- Build files have been written to: /home/u204476/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/build
[ 50%] Building CXX object src/CMakeFiles/vector-add-buffers.fpga.dir/vector-add-buffers.cpp.o
[100%] Linking CXX executable ../vector-add-buffers.fpga
aoc: Compiling for FPGA. This process may take several hours to complete.  Prior to performing this compile, be sure to check the reports to ensure the design will meet your performance targets.  If the reports indicate performance targets are not being met, code edits may be required.  Please refer to the oneAPI FPGA Optimization Guide for information on performance tuning applications for FPGAs.
Error: The board package being used only supports report generation/emulation/runtime, please use the board package shipped in the FPGA addon instead.
Error: Exiting.

llvm-foreach: 
icpx: error: fpga compiler command failed with exit code 1 (use -v to see invocation)
make[3]: *** [src/CMakeFiles/vector-add-buffers.fpga.dir/build.make:84: vector-add-buffers.fpga] Error 1
make[2]: *** [CMakeFiles/Makefile2:130: src/CMakeFiles/vector-add-buffers.fpga.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:110: src/CMakeFiles/fpga.dir/rule] Error 2
make: *** [Makefile:118: fpga] Error 2
u204476@s001-n067:~/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add$ 

When I try to compile for an FPGA on the fpga_compile node, I get the above error.

#!/bin/bash
mkdir build
cd build
make clean # will erase the executable.
cmake ..
make fpga

The build script I am using merely looks like this. I tried putting in a model type earlier, but got the same error. What should I do here? So far I only got it to work in emulation mode, but the sim and hardware modes aren't working for me.

What I try this in sim mode, it tells me that ModelSim is not present on the computer.

 

0 Kudos
7 Replies
mrakgr
New Contributor I
1,809 Views

https://community.intel.com/t5/Intel-DevCloud/Intel-Devcloud-for-oneAPI-not-support-simulation/m-p/1444667 

 

Looked into some of the old threads that have the same ModelSim error that I got when I tried compiling in simulation mode. By the looks of it, FPGAs don't have the software needed to be used on the oneAPI cloud. I tried executing `source /data/intel_fpga/devcloudLoginToolSetup.sh`, but nothing happens when I do that. Neither does the `devcloud_login` command work.

Despite the cloud having FPGA nodes, is it not possible to use them due to lack software?

0 Kudos
mrakgr
New Contributor I
1,805 Views

https://www.intel.com/content/www/us/en/developer/articles/technical/connecting-to-devcloud-fpga-from-devcloud-oneapi.html 

 

Actually, it seems it is possible to load the FPGA devcloud tools from the login node which can only be accessed only by ssh-ing into the dev cloud.

When I do that the ...

source /data/intel_fpga/devcloudLoginToolSetup.sh
devcloud_login

...commands start working. Is there a way to access these from the Jupyter notebook?

0 Kudos
mrakgr
New Contributor I
1,796 Views

I have two question:

1) I am searching through the forums, and it doesn't seem ModelSim is supported. Is that correct? I thought now that I've figured out how to log into the FPGA nodes properly, ModelSim would become available, but it doesn't seem so. It is weird to have such a huge omission because nothing in the docs is telling me what I am supposed to do regarding ModelSim.

One post a couple of months back, says that ModelSim should become available by October 2023, what happened to that?

2) It seems that it is possible to start FPGA compilation for the vector_add program on the FPGA, but even after 50m, nothing has happened for me. Now, it does say that it might take several hours for it to finish, and I am not opposed to waiting that much, but usually when the user is expected to wait that long, the program is supposed to provide some kind of progress report. Otherwise, how am I to know whether the program has hung in the background? Is this normal when it comes to generating bitstreams for an FPGA?

0 Kudos
RajashekarK_Intel
1,738 Views

Hi,

Thanks for posting in Intel Communities.

 

Were you able to run vector_add ?

 

Kindly follow below steps of README for Intel Devcloud.

Link: https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL/DenseLinearAlgebra/vector-add#build-and-run-the-base-vector-add-sample-in-intel-devcloud-optional

 

There are two mode in which you can run your sample

1. Job submission

2. Interactive mode

 

Here is sample run of what you need to do in Interactive mode on fpga_compile node.

 

1. Login to Devcloud.

2. Change to the samples directory where you have vector_add. ( https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C%2B%2BSYCL/DenseLinearAlgebra/vector-add/src )

3. Requesting fpga_compile node interactively.

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

4. Activate oneAPI environment.

 

source /opt/intel/oneapi/setvars.sh

 

1.png

 

5. Compile and Run

icpx -fsycl -fintelfpga -DFPGA_EMULATOR vector-add-buffers.cpp

./a.out

2.png

 

Concluding,

>> One post a couple of months back, says that ModelSim should become available by October 2023, what happened to that?

Regarding ModelSim on Devcloud for oneAPI, we'll get back to you with related information on that.

 

>> how am I to know whether the program has hung in the background?

Once you've submitted your workload in job submission mode, you can check the status of it via command qstat on Devcloud terminal.

 

Regards,

Rajashekar

 

mrakgr
New Contributor I
1,730 Views

Were you able to run vector_add ?

Yeah, I made a Youtube video about it. The development experience was so bad that I decided to drop FPGAs for my project. I might give them chance again if it turns out that programming the integrated CPUs that are on the FPGA devices is possible using SYCL, but otherwise I am out. FPGAs look a lot better on paper than they are in practice.

0 Kudos
RajashekarK_Intel
1,648 Views

Hi @mrakgr ,

 

Good to know that you've worked on DevCloud and we apologize for the bad development experience you've faced. We have forwarded your feedback to the development team. 

 

And regarding the ModelSim, currently, it is not supported on Intel DevCloud for oneAPI.

 

Regards,

Rajashekar

 

0 Kudos
RajashekarK_Intel
1,561 Views

Hi @mrakgr ,

 

If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.

 

Regards,

Rajashekar

 

0 Kudos
Reply