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?
- source code:
- ========
- #include "offload.h"
- #include <stdio.h>
- #include <iostream>
- void main()
- {
- _Offload_status x;
- OFFLOAD_STATUS_INIT(x);
- #pragma offload target(mic) status(x) mandatory
- {
- if (_Offload_get_device_number() < 0) {
- printf("mandatory offload ran on CPU\n");
- } else {
- printf("mandatory offload ran on MIC\n");
- }
- }
- if (x.result == OFFLOAD_SUCCESS) {
- printf("mandatory offload was successful\n");
- } else {
- printf("mandatory offload failed\n");
- }
- }