- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to offload a whole program on mic by doing the following:
int mymain(int argc,char *argv[]){
...
}
int main(int argc,char *argv[]){
#pragma offload target(mic) in(argv:length(argc))
mymain(argc,argv);
}
I get the following error:
offload error: buffer write failed (error code 6)
Could you please help me?
Best,
Nikos
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
which version of the compiler are you using.
with 16.0 compiler I do not get the error
cat test.c
__declspec(target(mic))
int mymain(int argc,char *argv[]){
printf("hello world\n");
}
int main(int argc,char *argv[]){
#pragma offload target(mic) in(argv:length(argc))
mymain(argc,argv);
}
icc test.c
test.c(3): warning #266: *MIC* function "printf" declared implicitly
printf("hello world\n");
^
./a.out
hello world
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ravi,
Thank you for the immediate response, it turned out to be a reference to an extern variable that was resolved when i defined a local copy of that variable.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page