Software Archive
Read-only legacy content
17061 Discussions

How to abort application once error encountered in offloaded section

Abhishek_S_7
Beginner
720 Views

Hi,

I am having a  C parallel code. In this code there is a offload section using Cilk. Memory is being asigned in shared function. I want this application get aborted gracefully when error is encountered in offloaded section. How to do it.

Regards,

abhishek

0 Kudos
1 Reply
Sumedh_N_Intel
Employee
720 Views

One of the ways you can do this is by returning a value back to host. Based on the return value the code code can continue executing or clean up and then exit the program. 

0 Kudos
Reply