Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
769 Discussions

Program built with oneAPI DPC++ fails to run with error message internal compiler error, abnormal

Herman1
Beginner
2,347 Views

I have installed the standalone version of DPC++ toolkit version: Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2023.2.2 Build 20230922.

 

I have created a new project in visual studio version: Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.1.6

 

the test program code is as follows:

// Copyright (C) 2023 Intel Corporation

// SPDX-License-Identifier: MIT

#include <algorithm>
#include <iostream>
#include <sycl/sycl.hpp>
using namespace sycl;


auto handle_async_error = [](exception_list elist) {
for (auto& e : elist) {
try { std::rethrow_exception(e); }
catch (sycl::exception& e) {
std::cout << "ASYNC EXCEPTION!!\n";
std::cout << e.what() << "\n";
}
}
};

int main() {
// Set up queue on any available device
queue q{ gpu_selector_v, handle_async_error };

// Initialize input and output memory on the host
constexpr size_t N = 256;
std::vector<int> a(N), b(N), c(N);
std::fill(a.begin(), a.end(), 1);
std::fill(b.begin(), b.end(), 2);
std::fill(c.begin(), c.end(), 0);

try{
// Create buffers associated with inputs and output
buffer<int, 1> a_buf{a}, b_buf{b}, c_buf{c};


std::cout << "call submit" << std::endl;
// Submit the kernel to the queue
q.submit([&](handler& h) {
accessor a{a_buf, h};
accessor b{b_buf, h};
accessor c{c_buf, h};

// BEGIN CODE SNIP
h.parallel_for(range{N}, [=](id<1> idx) {
c[idx] = a[idx] + b[idx];
});
// END CODE SNIP
}).wait();
std::cout << "submit returned" << std::endl;
}
catch(sycl::exception& e)
{
std::cout << "Caught sync SYCL exception: " << e.what() << "\n";
return 1;
}

// Check that all outputs match expected value
bool passed = std::all_of(c.begin(), c.end(),
[](int i) { return (i == 3); });
std::cout << ((passed) ? "SUCCESS" : "FAILURE")
<< std::endl;
return (passed) ? 0 : 1;
}

 

Building the example in Visual studio succeeds :

------ Rebuild All started: Project: ch04_4_5_vector_add, Configuration: Debug x64 ------
1>Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2023.2.2 Build 20230922
1>Copyright (C) 1985-2023 Intel Corporation. All rights reserved.
1>
1>icx-cl /fsycl /c /ZI /W3 /O2 /D _DEBUG /D _UNICODE /D UNICODE /WX- /EHsc /std:c++17 /MDd /IC:\\git_repos\\vcpkg\\installed\\x64-windows\\include /Fox64\\Debug\\ /Zc:__cplusplus ch04_4_5_vector_add.cpp
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

However when attempting to execute it fails. Starting Power shell and running the intel\oneAPI\setvars.bat followed by the ch04_4_5_vector_add.exe results in the following output:

C:\Users\XXXX\source\repos\ch04_4_5_vector_add\x64\Debug> .\ch04_4_5_vector_add.exe
call submit

internal compiler error, abnormal program termination

 

I have tried changing the optimisation level to /Od and /O1 and both fail in the same way. Building and running the Release version fails in the same way.  
Note if I use the cpu_selector_v instead of the gpu_selector_v everything works as expected.

Device manager reports that I have an Intel UHD graphics adapter in my laptop.
OS details: Windows 10 Enterprise version 22H2

0 Kudos
5 Replies
VaishnaviV_Intel
Employee
2,296 Views

Hi,


Thanks for posting on Intel communities.

Could you please try it on latest Intel oneAPI compiler i.e. 2024.0 and let us know if you are still facing the same issue?


Please refer to the below link to download the latest version,

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


Thanks & Regards,

Vankudothu Vaishnavi.


0 Kudos
Herman1
Beginner
2,273 Views

Hello Vankudothu,

Thanks for replying.

I tried with version 2024.0 and got the same result.

 

Regards

Herman

 

0 Kudos
VaishnaviV_Intel
Employee
2,196 Views

Hi,

 

Thanks for your patience and understanding.

We are not able to reproduce your issue at our end.

Could you please share the sycl-ls output and clinfo report with us to check the graphics driver version?

Also, you can try installing the whole toolkit from the below link,

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

 

Thanks & Regards,

Vankudothu Vaishnavi.

 

 

0 Kudos
VaishnaviV_Intel
Employee
2,140 Views

Hi,


We have not heard back from you. Could you please provide us with an update on your issue?


Thanks & Regards,

Vankudothu Vaishnavi.


0 Kudos
VaishnaviV_Intel
Employee
2,105 Views

Hi,


We haven't heard back from you. If you have any issues, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Vankudothu Vaishnavi.


0 Kudos
Reply