Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 415

undefined symbol: __offload_set_version

$
0
0

Hi,

I am trying to run a simple offload code and I got this error:

undefined symbol: __offload_set_version

Could you help to identify this error?

  1. source code:
  2. ========
  3. #include "offload.h"
  4. #include <stdio.h>
  5. #include <iostream>
  6. void main()
  7. {
  8.     _Offload_status x;
  9.     OFFLOAD_STATUS_INIT(x);
  10. #pragma offload target(mic) status(x) mandatory
  11.     {
  12.         if (_Offload_get_device_number() < 0) {
  13.             printf("mandatory offload ran on CPU\n");
  14.         } else {
  15.             printf("mandatory offload ran on MIC\n");
  16.         }
  17.     }
  18.     if (x.result == OFFLOAD_SUCCESS) {
  19.         printf("mandatory offload was successful\n");
  20.     } else {
  21.         printf("mandatory offload failed\n");
  22.     }
  23. }

 


Viewing all articles
Browse latest Browse all 415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>