Building on JLSE with dpc++ version "Intel(R) oneAPI DPC++/C++ Compiler 2021.2.0 (2021.x.0.20210323)", installed at /soft/restricted/CNDA/sdk/2021.04.30.001/oneapi/compiler/20210323/linux/bin, compiling with the flag -std=c++11 produces some very unusual compile errors that I did not come across when building with earlier versions:
The error vanishes when the -std=c++11 flag is removed. To reproduce,
> module load oneapi mpi
> make broken <---- doesn't work
> make working <---- works
using the attached source and Makefile.
Thanks for reporting this issue. I'm unable to reproduce this issue in my current environment (Intel(R) oneAPI DPC++ Compiler 2021.2.0 (2021.2.0.20210317).
We will try this with the version specified by you and let you know.
Thanks you for contacting Intel support.
dpcpp is designed for DPC++ application and should not be used for C++ applications.
The code you attached is DPC++. However, I have to point to oneAPI specification, where it is stated that
"C++. Every DPC++ program is also a C++ program. A compliant DPC++ implementation must support the C++17 Core Language (as specified in Sections 1-19 of ISO/IEC 14882:2017) or newer."
Therefore, it is not unexpected that you are getting various errors, when using C++11 standard for DPC++ application as it is not supported.
Moreover, please also note, that version of DPC++ you point to uses latest SYCL standard also, which is SYCL2020.
SYCL2020 Specification states:
"The documents in the following list are referred to within this SYCL specification, and their content is a requirement for this document.
Hope this helps.
I understand, thankyou. However would you consider adding an error when requesting a standard <c++17? The test case I sent is a minimal example, the actual use case is a monolithic codebase with a very long history (some code in there is over 20 years old) and a custom build process and so it cost me an entire afternoon to locate the source of this error. It was especially difficult because this same code compiled perfectly in the previous oneAPI revision.