Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and GDB*
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

dpcpp beta3: undefined reference on linking

leggett__charles
Beginner
699 Views

 

Platform: Centos7

dpcpp version: Intel(R) oneAPI DPC++ Compiler 2021.1-beta03 (2019.10.0.1106)

 

when linking executable an error is produced:

/opt/intel/inteloneapi/compiler/2021.1-beta03/linux/bin/../lib/libsycl.so: undefined reference to `clCreateProgramWithIL@OPENCL_2.1'
/opt/intel/inteloneapi/compiler/2021.1-beta03/linux/bin/../lib/libsycl.so: undefined reference to `clGetKernelSubGroupInfo@OPENCL_2.1'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)


 

same program works when compiled on Ubuntu 18.04

0 Kudos
8 Replies
Sushma_P_Intel
Employee
699 Views
Hello Charles , Thanks for reaching out to us. We are working on this issue and will get back to you. Regards, Sushma
leggett__charles
Beginner
699 Views

Turns out this was due to conflicting libOpenCL.so. When the new one from beta03 is used, compilation works, but a segfault occurs upon execution:

 

#1  0x00007ffff7dea973 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7def54e in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7dea784 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7deeb3b in _dl_open () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff6ac1eeb in dlopen_doit () from /lib64/libdl.so.2
#6  0x00007ffff7dea784 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#7  0x00007ffff6ac24ed in _dlerror_run () from /lib64/libdl.so.2
#8  0x00007ffff6ac1f81 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
#9  0x00007ffff7ff18c3 in khrIcdVendorAdd ()
   from /opt/intel/inteloneapi/compiler/latest/linux/lib/libOpenCL.so.1
#10 0x00007ffff7ff1b4f in khrIcdVendorsEnumerateEnv ()
   from /opt/intel/inteloneapi/compiler/latest/linux/lib/libOpenCL.so.1
#11 0x00007ffff7ff37fa in khrIcdOsVendorsEnumerate ()
   from /opt/intel/inteloneapi/compiler/latest/linux/lib/libOpenCL.so.1
#12 0x00007ffff70991cb in __pthread_once_slow () from /lib64/libpthread.so.0
#13 0x00007ffff7ff1f61 in clGetPlatformIDs ()
   from /opt/intel/inteloneapi/compiler/latest/linux/lib/libOpenCL.so.1
#14 0x00007ffff746ed7a in cl::sycl::detail::pi::OclpiPlatformsGet(unsigned int, _pi_platform**, unsigned int*) () from /opt/intel/inteloneapi/compiler/latest/linux/lib/libsycl.so
#15 0x00007ffff74806f2 in cl::sycl::detail::platform_impl_pi::get_platforms() ()
   from /opt/intel/inteloneapi/compiler/latest/linux/lib/libsycl.so
#16 0x00007ffff74b0ae6 in cl::sycl::platform::get_platforms() ()
   from /opt/intel/inteloneapi/compiler/latest/linux/lib/libsycl.so

 

ldd shows:

	linux-vdso.so.1 =>  (0x00007ffc36f63000)
	libOpenCL.so.1 => /opt/intel/inteloneapi/compiler/latest/linux/lib/libOpenCL.so.1 (0x00007fa396c62000)
	libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa396745000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fa396443000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa39622d000)
	libsycl.so => /opt/intel/inteloneapi/compiler/latest/linux/lib/libsycl.so (0x00007fa395f20000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa395d04000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa395936000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fa395732000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa396a4c000)
	libimf.so => /opt/intel/inteloneapi/compiler/latest/linux/compiler/lib/intel64_lin/libimf.so (0x00007fa395194000)
	libsvml.so => /opt/intel/inteloneapi/compiler/latest/linux/compiler/lib/intel64_lin/libsvml.so (0x00007fa39380d000)
	libirng.so => /opt/intel/inteloneapi/compiler/latest/linux/compiler/lib/intel64_lin/libirng.so (0x00007fa3934a3000)
	libintlc.so.5 => /opt/intel/inteloneapi/compiler/latest/linux/compiler/lib/intel64_lin/libintlc.so.5 (0x00007fa39322c000)

 

Varsha_M_Intel
Employee
699 Views

Hi,

Are you targeting cpu or gpu? Could you share the code you are trying to run with us?

 

-Varsha

leggett__charles
Beginner
699 Views

it's merely trying to list the available OpenCL devices:

#include <CL/sycl.hpp>
#include <iostream>

int main() {
  {
    auto platform_list = cl::sycl::platform::get_platforms();
    std::cout << "   available devices [" << platform_list.size() << "]\n";
    
    // looping over platforms
    int i=0;
    for (const auto &platform : platform_list) {
      std::cout << "    [" << i << "] "
                << platform.get_info<cl::sycl::info::platform::name>()
                << std::endl;
      auto device_list = platform.get_devices();
      for (const auto &device : device_list) {
        std::cout << "        -> "
                  << device.get_info<cl::sycl::info::device::name>()
                  << std::endl;
      }
      ++i;
    }
  }  
  return 0;
}

 

leggett__charles
Beginner
699 Views
Any updates here?
leggett__charles
Beginner
699 Views
is anyone bothering to look in to this, or have you decided that centos is not a supported platform?
SantoshY_Intel
Moderator
336 Views

Hi,


We checked whether DPC++ is supported by CentOS7 using Intel® oneAPI Base Toolkit System Requirements. We observed that CentOS7 supports all the OneAPI components except oneCCL, oneDNN, and Intel oneAPI DPC++/C++ Compiler.



Thanks & Regards,

Santosh



SantoshY_Intel
Moderator
315 Views

Hi,


We haven't heard back from you. We hope your issue has been resolved. As all your questions have been answered we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.


Have a Good day!


Thanks & Regards

Santosh


Reply