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

Cannot use oneAPI cpu_selector but OpenCL is working in CPU.

RN1
New Contributor I
1,908 Views

I can run any OpenCL program in the CPU and the GPU, but with oneAPI/sycl I cannot use the CPU.

I have used two sample programs (vector-add and simple-vector-inc) just modifying the `default_selector` to `cpu_selector`. They give me this error:

./vector-add-buffers
Running on device: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Vector size: 10000
about to do q.submit
about to do h.parallel_for
An exception is caught for vector add.
terminate called after throwing an instance of 'cl::sycl::runtime_error'
  what():  Native API failed. Native API returns: -34 (CL_INVALID_CONTEXT) -34 (CL_INVALID_CONTEXT)
Aborted (core dumped)

What am I doing wrong?

I did some other tests, like trying to use different icl-loaders (/etc/OpenCL/vendors), but all Intel CPU fails with oneAPI/sycl.

 

If I execute on the GPU (`default_selector` or `gpu_selector`) it just runs successfully:

Running on device: Intel(R) Gen9
Vector size: 10000
about to do q.submit
about to do h.parallel_for
[0]: 0 + 0 = 0
[1]: 1 + 1 = 2
[2]: 2 + 2 = 4
...
[9999]: 9999 + 9999 = 19998
Vector add successfully completed on device.

 

Another question, is normal that the compilation phase (dpcpp -O2 -g ...) needs around 7s?

0 Kudos
1 Solution
RN1
New Contributor I
1,819 Views

Hello, Abhishek.

Finally, it is working although I needed to built all C++/libc system libraries manually and mock Ubuntu 18.04 profile env vars.

View solution in original post

0 Kudos
6 Replies
AbhishekD_Intel
Moderator
1,886 Views

Hi Raul,

 

We can see that you are trying to execute "vector-add-buffers" from samples, but we don't know the exact reason why only you are getting this error. It seems that your specified context is not a valid OpenCL context.

So please give us more details about your OS and do the following updates in your code and give us outputs of them so that we can dig into it.

  1. Add the below lines in your code.
std::cout << "Running on device: "
              << q.get_device().get_info<info::device::name>() << "\n"
              << q.get_context().get_platform().get_info<info::platform::name>() << "\n";
  1. export SYCL_PI_TRACE=2
  2. compile code and do $ ldd vector-add-buffers give us logs
  3. execute the executable and give us the output.

 

Please give us all the details so that we can debug it.

 

 

Warm Regards,

Abhishek

 

0 Kudos
RN1
New Contributor I
1,875 Views

Hi Abhishek!

I post here the details.  Thanks for your support.
At least with this I can execute in the GPU, but in the other machine, I cannot even compile (https://community.intel.com/t5/Intel-oneAPI-Base-Toolkit/oneAPI-cannot-compile-sample-program-Support-for-Xeon-Phi-or/m-p/1189304#M292)

With the GPU:

$ LD_LIBRARY_PATH=/opt/intel/inteloneapi/compiler/2021.1-beta07/linux/lib ./build/vector-add
Running on device: Intel(R) Gen9
Intel(R) Level-Zero
Vector size: 64
about to submit
[0]: 0 + 0 = 0
[1]: 1 + 1 = 2
[2]: 2 + 2 = 4
...
[63]: 63 + 63 = 126
Vector add successfully completed on device.

My env:

TBBROOT=/opt/intel/inteloneapi/tbb/2021.1-beta07/env/..
DAALROOT=/opt/intel/inteloneapi/daal/latest
ADVISOR_2021_DIR=/opt/intel/inteloneapi/advisor/2021.1-beta07
DPCT_BUNDLE_ROOT=/opt/intel/inteloneapi/dpcpp-ct/2021.1-beta07
ONEAPI_ROOT=/opt/intel/inteloneapi
CONDA_EXE=/opt/intel/inteloneapi/intelpython/latest/bin/conda
_CE_M=
PKG_CONFIG_PATH=/opt/intel/inteloneapi/vtune/2021.1-beta07/include/pkgconfig/lib64:/opt/intel/inteloneapi/mkl/2021.1-beta07/tools/pkgconfig:/opt/intel/inteloneapi/advisor/2021.1-beta07/include/pkgconfig/lib64:
VPL_DIR=/opt/intel/inteloneapi/vpl/latest
CCL_ATL_TRANSPORT_PATH=/opt/intel/inteloneapi/ccl/2021.1-beta07/lib/cpu_gpu_dpcpp
CCL_ROOT=/opt/intel/inteloneapi/ccl/2021.1-beta07
I_MPI_ROOT=/opt/intel/inteloneapi/mpi/2021.1-beta07
VPL_EXTENSIONS_PATH=/opt/intel/inteloneapi/vpl/latest/lib
LIBVA_DRIVER_NAME=iHD
FI_PROVIDER_PATH=/opt/intel/inteloneapi/mpi/2021.1-beta07//libfabric/lib/prov
DNNLROOT=/opt/intel/inteloneapi/oneDNN/2021.1-beta07/cpu_dpcpp_gpu_dpcpp
CCL_CONFIGURATION=cpu_gpu_dpcpp
CONDA_PREFIX=/opt/intel/inteloneapi/intelpython/latest
MANPATH=:/opt/intel/inteloneapi/debugger/10.0-beta07/documentation/man:::
SETVARS_COMPLETED=1
CONDA_PROMPT_MODIFIER=(base)
APM=/opt/intel/inteloneapi/advisor/2021.1-beta07/perfmodels
VPLLIB=/opt/intel/inteloneapi/vpl/latest/lib
INFOPATH=/opt/intel/inteloneapi/debugger/10.0-beta07/documentation/info/
VTUNE_PROFILER_2021_DIR=/opt/intel/inteloneapi/vtune/2021.1-beta07
IPPROOT=/opt/intel/inteloneapi/ipp/latest
IPP_TARGET_ARCH=intel64
PYTHONPATH=/opt/intel/inteloneapi/vpl/latest/bindings/python:/opt/intel/inteloneapi/advisor/2021.1-beta07/pythonapi
_CE_CONDA=
LIBRARY_PATH=/opt/intel/inteloneapi/vpl/latest/lib:/opt/intel/inteloneapi/tbb/2021.1-beta07/env/../lib/intel64/gcc4.8:/opt/intel/inteloneapi/oneDNN/2021.1-beta07/cpu_dpcpp_gpu_dpcpp/lib:/opt/intel/inteloneapi/mpi/2021.1-beta07//libfabric/lib:/opt/intel/inteloneapi/mpi/2021.1-beta07//lib/release:/opt/intel/inteloneapi/mpi/2021.1-beta07//lib:/opt/intel/inteloneapi/mkl/2021.1-beta07/lib/intel64:/opt/intel/inteloneapi/ipp/latest/lib/intel64:/opt/intel/inteloneapi/ipp/latest/../../compiler/latest/linux/compiler/lib/intel64:/opt/intel/inteloneapi/ipp/latest/../../tbb/latest/lib/intel64/gcc4.8:/opt/intel/inteloneapi/daal/latest/lib/intel64:/opt/intel/inteloneapi/compiler/latest/linux/lib:/opt/intel/compilers_and_libraries_2020.0.166/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2020.0.166/linux/ipp/../tbb/lib/intel64/gcc4.8
CONDA_SHLVL=1
I_MPI_LIBRARY_KIND=release_mt
OCL_ICD_FILENAMES=/opt/intel/inteloneapi/compiler/latest/linux/lib/x64/libintelocl.so
CONDA_PYTHON_EXE=/opt/intel/inteloneapi/intelpython/latest/bin/python
CLASSPATH=/opt/intel/inteloneapi/mpi/2021.1-beta07//lib/mpi.jar:/opt/intel/inteloneapi/daal/latest/lib/daal.jar
LD_LIBRARY_PATH=/opt/intel/inteloneapi/vpl/latest/lib:/opt/intel/inteloneapi/tbb/2021.1-beta07/env/../lib/intel64/gcc4.8:/opt/intel/inteloneapi/oneDNN/2021.1-beta07/cpu_dpcpp_gpu_dpcpp/lib:/opt/intel/inteloneapi/mpi/2021.1-beta07//libfabric/lib:/opt/intel/inteloneapi/mpi/2021.1-beta07//lib/release_mt:/opt/intel/inteloneapi/mpi/2021.1-beta07//lib:/opt/intel/inteloneapi/mpi/2021.1-beta07//lib/release:/opt/intel/inteloneapi/mpi/2021.1-beta07//lib:/opt/intel/inteloneapi/mkl/2021.1-beta07/lib/intel64:/opt/intel/inteloneapi/ipp/latest/lib/intel64:/opt/intel/inteloneapi/ipp/latest/../../compiler/latest/linux/compiler/lib/intel64:/opt/intel/inteloneapi/ipp/latest/../../tbb/latest/lib/intel64/gcc4.8:/opt/intel/inteloneapi/debugger/10.0-beta07/dep/lib:/opt/intel/inteloneapi/debugger/10.0-beta07/libipt/intel64/lib:/opt/intel/inteloneapi/debugger/10.0-beta07/gdb/intel64/lib:/opt/intel/inteloneapi/daal/latest/lib/intel64:/opt/intel/inteloneapi/compiler/latest/linux/lib:/opt/intel/inteloneapi/compiler/latest/linux/lib/x64:/opt/intel/inteloneapi/compiler/latest/linux/compiler/lib/intel64_lin:/opt/intel/inteloneapi/compiler/latest/linux/compiler/lib:/opt/intel/inteloneapi/ccl/2021.1-beta07/lib/cpu_gpu_dpcpp
PS1=\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\]
CONDA_DEFAULT_ENV=base
MKLROOT=/opt/intel/inteloneapi/mkl/2021.1-beta07
LIBVA_DRIVERS_PATH=/opt/intel/inteloneapi/vpl/latest/lib
NLSPATH=/opt/intel/inteloneapi/mkl/2021.1-beta07/lib/intel64/locale/%l_%t/%N:/opt/intel/compilers_and_libraries_2020.0.166/linux/compiler/lib/intel64/locale/%l_%t/%N
PATH=/opt/intel/inteloneapi/vtune/2021.1-beta07/bin64:/opt/intel/inteloneapi/mpi/2021.1-beta07//libfabric/bin:/opt/intel/inteloneapi/mpi/2021.1-beta07//bin:/opt/intel/inteloneapi/mkl/2021.1-beta07/bin/intel64:/opt/intel/inteloneapi/intelpython/latest/bin:/opt/intel/inteloneapi/intelpython/latest/condabin:/opt/intel/inteloneapi/dpcpp-ct/2021.1-beta07/bin:/opt/intel/inteloneapi/dev-utilities/2021.1-beta07/bin:/opt/intel/inteloneapi/debugger/10.0-beta07/gdb/intel64/bin:/opt/intel/inteloneapi/compiler/latest/linux/bin/intel64:/opt/intel/inteloneapi/compiler/latest/linux/bin:/opt/intel/inteloneapi/compiler/latest/linux/ioc/bin:/opt/intel/inteloneapi/advisor/2021.1-beta07/bin64:/opt/intel/compilers_and_libraries_2020.0.166/linux/bin/intel64:/opt/intel/compilers_and_libraries_2020.0.166/linux/bin:/home/USER/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/intel/advisor_2020.0.0.604394/bin64:/opt/intel/bin:/opt/intel/inspector_2020.0.0.603904/bin64:/opt/intel/vtune_amplifier_xe_2019.3.0.591499/bin64:/opt/intel/vtune_profiler_2020.0.0.605129/bin64:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
INTEL_PYTHONHOME=/opt/intel/inteloneapi/debugger/10.0-beta07/dep
DPCPP_ROOT=/opt/intel/inteloneapi
VPLINCLUDE=/opt/intel/inteloneapi/vpl/latest/include
CPATH=/opt/intel/inteloneapi/vpl/latest/include:/opt/intel/inteloneapi/tbb/2021.1-beta07/env/../include:/opt/intel/inteloneapi/oneDNN/2021.1-beta07/cpu_dpcpp_gpu_dpcpp/include:/opt/intel/inteloneapi/mpi/2021.1-beta07//include:/opt/intel/inteloneapi/mkl/2021.1-beta07/include:/opt/intel/inteloneapi/ipp/latest/include:/opt/intel/inteloneapi/dpcpp-ct/2021.1-beta07/include:/opt/intel/inteloneapi/dev-utilities/2021.1-beta07/include:/opt/intel/inteloneapi/daal/latest/include:/opt/intel/inteloneapi/compiler/latest/linux/include:/opt/intel/compilers_and_libraries_2020.0.166/linux/ipp/include:
VPLPYTHONPATH=/opt/intel/inteloneapi/vpl/latest/bindings/python

 

$ LD_LIBRARY_PATH=/opt/intel/inteloneapi/compiler/2021.1-beta07/linux/lib ./build/vector-add
---> piPlatformsGet(
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce731b4
) --->        pi_result : PI_SUCCESS
---> piPlatformsGet(
       <unknown> : 2
       <unknown> : 0x17884b0
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x17670e0
       <unknown> : 4294967295
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce7300c
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x17670e0
       <unknown> : 4294967295
       <unknown> : 2
       <unknown> : 0x1764da0
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x1776b30
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x1765138
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x1776b30
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f18
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x17651d8
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f18
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x1776b30
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f50
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f50
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x176c830
       <unknown> : 4294967295
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce7300c
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x176c830
       <unknown> : 4294967295
       <unknown> : 1
       <unknown> : 0x1765540
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x1765138
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f18
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f50
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piPlatformsGet(
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce731b4
) --->        pi_result : PI_SUCCESS
---> piPlatformsGet(
       <unknown> : 1
       <unknown> : 0x17aa8d0
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x19a6540
       <unknown> : 4294967295
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce7300c
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x19a6540
       <unknown> : 4294967295
       <unknown> : 1
       <unknown> : 0x19a6980
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x19a69c0
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x19d3c78
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x19a69c0
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f18
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x19a69c0
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce72f50
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x17670e0
       <unknown> : 4294967295
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce730fc
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x17670e0
       <unknown> : 4294967295
       <unknown> : 2
       <unknown> : 0x17aa8d0
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x1776b30
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x175c288
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x1776b30
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce73008
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x175c308
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce73008
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x1776b30
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce73040
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce73040
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x176c830
       <unknown> : 4294967295
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce730fc
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x176c830
       <unknown> : 4294967295
       <unknown> : 1
       <unknown> : 0x19d3ce0
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x175c3b8
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce73008
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce73040
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x19a6540
       <unknown> : 4294967295
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce730fc
) --->        pi_result : PI_SUCCESS
---> piDevicesGet(
       pi_platform : 0x19a6540
       <unknown> : 4294967295
       <unknown> : 1
       <unknown> : 0x19d3ca0
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x175c430
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x19e6028
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x175c430
       <unknown> : 4162
       <unknown> : 8
       <unknown> : 0x7ffd3ce73008
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x175c430
       <unknown> : 4096
       <unknown> : 8
       <unknown> : 0x7ffd3ce73040
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piPlatformGetInfo(
       pi_platform : 0x17670e0
       <unknown> : 2306
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce73180
) --->        pi_result : PI_SUCCESS
---> piPlatformGetInfo(
       pi_platform : 0x17670e0
       <unknown> : 2306
       <unknown> : 16
       <unknown> :
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piContextCreate(
       <unknown> : 0
       <unknown> : 1
       <unknown> : 0x19e64d0
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x19e6368
) --->        pi_result : PI_SUCCESS
---> piQueueCreate(
       <unknown> : 0x19e6538
       <unknown> : 0x176a4e8
       <unknown> : 1
       <unknown> : 0x7ffd3ce73278
) --->        pi_result : PI_SUCCESS
Running on device: ---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4139
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce73470
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4139
       <unknown> : 41
       <unknown> : 0
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
---> piPlatformGetInfo(
       pi_platform : 0x17670e0
       <unknown> : 2306
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce73438
) --->        pi_result : PI_SUCCESS
---> piPlatformGetInfo(
       pi_platform : 0x17670e0
       <unknown> : 2306
       <unknown> : 16
       <unknown> : d
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
Intel(R) OpenCL
Vector size: 64
about to submit
---> piMemBufferCreate(
       <unknown> : 0x19e6538
       <unknown> : 33
       <unknown> : 256
       <unknown> : 0x1e83980
       <unknown> : 0x7ffd3ce72868
) --->        pi_result : PI_SUCCESS
---> piMemBufferCreate(
       <unknown> : 0x19e6538
       <unknown> : 33
       <unknown> : 256
       <unknown> : 0x1e83b00
       <unknown> : 0x7ffd3ce72868
) --->        pi_result : PI_SUCCESS
---> piMemBufferCreate(
       <unknown> : 0x19e6538
       <unknown> : 9
       <unknown> : 256
       <unknown> : 0x7ffd3ce736b0
       <unknown> : 0x7ffd3ce72868
) --->        pi_result : PI_SUCCESS
---> piDeviceGetInfo(
       <unknown> : 0x176a4e8
       <unknown> : 4136
       <unknown> : 4
       <unknown> : 0x7ffd3ce721fc
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piPlatformGetInfo(
       pi_platform : 0x17670e0
       <unknown> : 2305
       <unknown> : 0
       <unknown> : 0
       <unknown> : 0x7ffd3ce721b8
) --->        pi_result : PI_SUCCESS
---> piPlatformGetInfo(
       pi_platform : 0x17670e0
       <unknown> : 2305
       <unknown> : 12
       <unknown> :
       <unknown> : 0
) --->        pi_result : PI_SUCCESS
---> piProgramCreate(
       <unknown> : 0x19e6538
       <unknown> : #
       <unknown> : 18740
       <unknown> : 0x7ffd3ce721b8
) --->        pi_result : -34
An exception is caught for vector add.
terminate called after throwing an instance of 'cl::sycl::runtime_error'
  what():  Native API failed. Native API returns: -34 (CL_INVALID_CONTEXT) -34 (CL_INVALID_CONTEXT)
[1]    13235 abort (core dumped)  LD_LIBRARY_PATH=/opt/intel/inteloneapi/compiler/2021.1-beta07/linux/lib

 

 $ LD_LIBRARY_PATH=/opt/intel/inteloneapi/compiler/2021.1-beta07/linux/lib ldd ./build/vector-add
        linux-vdso.so.1 (0x00007ffee1df9000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007efcbd856000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007efcbd711000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007efcbd6f7000)
        libsycl.so.1 => /opt/intel/inteloneapi/compiler/2021.1-beta07/linux/lib/libsycl.so.1 (0x00007efcbd4a5000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007efcbd2de000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007efcbda94000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007efcbd2d8000)
        libOpenCL.so.1 => /opt/intel/inteloneapi/compiler/2021.1-beta07/linux/lib/libOpenCL.so.1 (0x00007efcbd2cd000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007efcbd2ab000)
        libimf.so => /opt/intel/lib/libimf.so (0x00007efcbcd0d000)
        libsvml.so => /opt/intel/lib/libsvml.so (0x00007efcbb312000)
        libirng.so => /opt/intel/lib/libirng.so (0x00007efcbafa8000)
        libintlc.so.5 => /opt/intel/lib/libintlc.so.5 (0x00007efcbad31000)

 

0 Kudos
AbhishekD_Intel
Moderator
1,863 Views

Hi Raul,


Is it possible for you to change the underlying OS and test the same sample?

Because we tried on Ubuntu with Xeon(R) E-2176G and CPU selector it's working for us. We thought we will get some clue but it is difficult to get the exact problem.

Please update us.



Warm Regards,

Abhishek


0 Kudos
RN1
New Contributor I
1,820 Views

Hello, Abhishek.

Finally, it is working although I needed to built all C++/libc system libraries manually and mock Ubuntu 18.04 profile env vars.

0 Kudos
AbhishekD_Intel
Moderator
1,813 Views

Hi Raul,


That's great, happy to know that it's working for you.

Please confirm if we can close this thread.

You can always post a new thread if you face any issue.


Warm Regards,

Abhishek


0 Kudos
AbhishekD_Intel
Moderator
1,764 Views

Hi,

We are closing this thread please post a new thread if you have any problem.


Thank you


0 Kudos
Reply