Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*

compilation issues with oneDPL headers

alexstrelch
Beginner
1,431 Views

hello,

I tried to compile test codes from oneAPI-samples  using the new toolkit. Some of them failed with the following error message  : 

In file included from /home/astrel/work/Crs/oneAPI-samples/DirectProgramming/DPC++/ParallelPatterns/histogram/src/main.cpp:9:
In file included from /opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/execution:34:
In file included from /opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/pstl/glue_algorithm_impl.h:23:
In file included from /opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/pstl/utils.h:31:
/opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/pstl/hetero/dpcpp/sycl_iterator.h:34:68: error: no type named 'buffer_allocator' in namespace 'sycl'; did you mean 'image_allocator'?
template <access_mode Mode, typename T, typename Allocator = sycl::buffer_allocator>

The errors seem to be due to onedpl headers.

Any idea to resolve the issue?

Thank you.

0 Kudos
6 Replies
NoorjahanSk_Intel
Moderator
1,412 Views

Hi,

 

Thanks for reaching out to us.

 

We have tried to build the sample using below steps and we are able to get the expected results without any issues.

Steps we have followed on Ubuntu:

 

Please find the below screenshot for the result.

NoorjahanSk_Intel_0-1671529948110.png

 

Please follow the above steps while building the code. If you still face the issue, please provide us with the below details.

  1. Steps you have followed to build the sample code.
  2. Os details
  3. Compiler version being used.

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
alexstrelch
Beginner
1,395 Views

Thank you, Noorjahan.

Here are the details:

1. Steps:

git clone https://github.com/oneapi-src/oneAPI-samples

module load cmake

source /opt/intel/oneapi/setvars.sh

cd ./oneAPI-samples/DirectProgramming/DPC++/ParallelPatterns/histogram

mkdir build & cd build

cmake ..

make VERBOSE=1

2. OS:

Linux {hostname} 5.15.0-50-generic #56~20.04.1-Ubuntu SMP Tue Sep 27 15:51:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

3. Compiler:

Intel(R) oneAPI DPC++/C++ Compiler 2023.0.0 (2023.0.0.20221201)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm
Configuration file: /opt/intel/oneapi/compiler/2023.0.0/linux/bin-llvm/../bin/icpx.cfg

4. Error message (and there were a bunch of warnings):

/opt/intel/oneapi/compiler/2023.0.0/linux/bin/icpx -O3 -std=c++17 -fsycl -O3 -DNDEBUG -MD -MT CMakeFiles/histogram.dir/src/main.cpp.o -MF CMakeFiles/histogram.dir/src/main.cpp.o.d -o CMakeFiles/histogram.dir/src/main.cpp.o -c /home/astrel/work/Crs/Tmp/oneAPI-samples/DirectProgramming/DPC++/ParallelPatterns/histogram/src/main.cpp :
In file included from /home/astrel/work/Crs/Tmp/oneAPI-samples/DirectProgramming/DPC++/ParallelPatterns/histogram/src/main.cpp

In file included from /home/astrel/work/Crs/Tmp/oneAPI-samples/DirectProgramming/DPC++/ParallelPatterns/histogram/src/main.cpp:9:
In file included from /opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/execution:34:
In file included from /opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/pstl/glue_algorithm_impl.h:23:
In file included from /opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/pstl/utils.h:31:
/opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/pstl/hetero/dpcpp/sycl_iterator.h:34:68: error: no type named 'buffer_allocator' in namespace 'sycl'; did you mean 'image_allocator'?
template <access_mode Mode, typename T, typename Allocator = sycl::buffer_allocator>
~~~~~~^~~~~~~~~~~~~~~~
image_allocator

 

Direct compiling of the source resulted in the same error.

Thank you,

 

0 Kudos
NoorjahanSk_Intel
Moderator
1,355 Views

Hi,


Thanks for providing the details.


>>In file included from /opt/intel/oneapi/dpl/2021.7.2/linux/include/oneapi/dpl/execution


From your error, we observed that you are using OneDPL 2021.7 version.


Could you please upgrade to the latest OneDPL version(2022.0.0) and try to build your code with the latest version?


We tried with OneDPL(2022.0.0) and did not see any issues at our end.


You can get the latest version by installing the entire OneAPI BaseTookit or the standalone version.

BaseToolkit:

https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html

Standalone:

https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
1,326 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks & Regards,

Noorjahan.


0 Kudos
alexstrelch
Beginner
1,313 Views

Hi Noorjahan,

I just re-installed the toolkit and could compile the code sample, thank you for the instructions. You can close the issue.

Regards,

A.

0 Kudos
NoorjahanSk_Intel
Moderator
1,303 Views

Hi,


Thanks for the confirmation!


As this issue has been resolved, we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread.


Thanks & Regards,

Noorjahan.


0 Kudos
Reply