Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

oneAPI config issue, troubleshooting

jholden
Beginner
1,032 Views

Hi,

 

I am trying to setup and configure oneAPI on my Fedora 40 linux system.

 

I have installed oneAPI through the GUI, created the vector-add sample through the CLI, and ran setvars.sh.  I then create the build folder, run 'cmake ..', and then 'make cpu-gpu'

 

I then get this error:

c++: error: unrecognized command-line option ‘-fsycl’

 

Is there something really simple I am missing? Any help would be much appreciated.

0 Kudos
3 Replies
yzh_intel
Moderator
954 Views

Hi, can you try to compile the code manually using icpx, the command line should be something like "icpx -fsycl code.cpp ". icpx is the sycl compiler provided in oneapi basekit. Based on the error message, it seems that you're not using a sycl aware compiler.  

jholden
Beginner
874 Views

Hi,

Using icpx from the command line worked. Thank you for that!

 

In case it is helpful, I arrived at this situation through the following sequence of events:

1) https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?packages=oneapi-toolkit&oneapi-toolkit-os=linux&oneapi-lin=offline

 

And from there, on the right side of the page, a link to the documentation on running the sample code vector-add:

 

2) https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add#configure-the-build-system

 

In this github page, the instructions just have me use 'make cpu-gpu', which seems to invoke the c++ command rather than icpx. 

 

This all seems to be official Intel documentation.

0 Kudos
yzh_intel
Moderator
854 Views

Hi, I followed the steps in the oneapi samples but see no issues there. My best guess is there's something wrong in your configuration steps, as the project seems to be configured with c++ as the compiler. 

0 Kudos
Reply