Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
109 Views

Centos 7 - silent failure of SYCL kernel

I am trying to install the base toolkit on CentOS 7.6. That version by default comes with GCC 4.8, and the corresponding libstdc++. So to satisfy the GCC toolchain requirements, I have compiled GCC 6.3 from source, along with libstdc++, and put it in my PATH/LD_LIBRARY_PATH.

The OneAPI Base toolkit installation finishes OK. When I run "clinfo" I get the info about the FPGA emaulation platform, as well as my Intel(R) Xeon(R) Gold 6126 CPU. However, when trying to run the simple-sycl-app.cpp from https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedWithSYCLCompiler.md I am getting a silent failure (i.e. the results are incorrect - they appear to be memory garbage). If I surround the kernel with try/catch, still no exception is caught.

I assume the problem has to do with my installation, since the same code runs fine on a different Ubuntu system (both CPU and GPU). What could be the cause of this? How could I get more information about where things are going wrong?

Tags (1)
0 Kudos
10 Replies
Highlighted
Moderator
109 Views

Hi,

Thanks for reaching out to us. We are working on this.

Meanwhile, could you try reinstalling oneAPI base toolkit on your machine and check if that works?

 

Rahul

 

0 Kudos
Highlighted
Beginner
109 Views

I reinstalled the latest beta3, but it made no difference unfortunately.

0 Kudos
Moderator
109 Views

Hello,

The CentOS 7.6 is not supported. Please check the system requirements for DPC++ compiler here: https://software.intel.com/en-us/articles/intel-oneapi-dpcpp-compiler-system-requirements-beta

Please make sure your OS, the kernel, gcc are meeting the requirements. 

For Ubuntu 18.04.3, the GPU runtime will be installed as part of the oneAPI Base Toolkit installation. 

If you'll be using RH, please follow the instruction to install the GPU runtime. 

Here is the Installation Guide: https://software.intel.com/en-us/articles/installation-guide-for-intel-oneapi-toolkits  

Let me know if you encounter any further issues.

thanks,

Jennifer 

0 Kudos
Highlighted
Beginner
109 Views

Could you please clarify these requirements? For "CPU target", which is how I am trying to use this, it does list CentOS 7.x, and GCC 5+

0 Kudos
Highlighted
Beginner
109 Views

Any ideas?
0 Kudos
Highlighted
New Contributor I
109 Views

Compiling the gcc manually introduces some ambiguity. Try to install devtoolset-6 (or even devtoolset-8 https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/) instead.
0 Kudos
Highlighted
Moderator
109 Views

For using CPU target, i'm assuming you're setting the env like below. the CPU target will use the OpenCL runtime beneath.  

EXPORT SYCL_DEVICE_TYPE=CPU|GPU|HOST|ACC

For catching exception, need to add some code like below. try it and see what details you get. But be aware, CentOS is not supported. Also make sure your default gcc points to the newer gcc version. Hope this is helpful. 

Code snippets on async exception: 

    auto ehandler = [](cl::sycl::exception_list exceptionList) {
        for (std::exception_ptr const &e : exceptionList) {
            try {
                std::rethrow_exception(e);
            }
            catch (cl::sycl::exception const &e) {
                std::cout << "fail" << std::endl;
                // std::terminate() will exit the process, return non-zero, and output a
                // message to the user about the exception
                std::terminate();
            }
        }
    };

queue q(device_selector, ehandler); 

q.submit([&](handler &h) {....} ); 

q.wait_and_throw();

....

0 Kudos
Highlighted
109 Views

Dmitry Savin wrote:

Compiling the gcc manually introduces some ambiguity. Try to install devtoolset-6 (or even devtoolset-8 https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/) instead.

Is there a way to work with compiled version of gcc and inteloneapi?

0 Kudos
Highlighted
Beginner
109 Views

Hi,

Thanks for reaching out to us. We are working on this.

Meanwhile, could you try reinstalling oneAPI base toolkit on your machine and check if that works?

0 Kudos
Highlighted
Beginner
109 Views

Thanks for reaching out to us. We are working on this.

Meanwhile, could you try reinstalling oneAPI base toolkit on your machine and check if that works?

0 Kudos