- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When trying to offload an array that exceeds a specific size, the program fails with "offload error: process on the device 0 was terminated by signal 11 (SIGSEGV)"
Here is some test code. The first part works, the last not:
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[]) {
{
int ar[3144000];
printf("Size %lld\n",3144000);
#pragma omp target data map(to:ar)
printf("OK\n");
printf("Back\n");
}
{
int ar[3145000];
printf("Size %lld\n",3145000);
#pragma omp target data map(to:ar)
printf("OK\n");
printf("Back\n");
}
return EXIT_SUCCESS;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, just found, that you only need to increase the default stack size with MIC_STACKSIZE=100M
But the error message is quite bad. Wouldn't it be possible to check/catch that and display something more helpful?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The message produced by the offload rtl reflects the actual error that occurred and was reported by the system. That error is essentially the same error that occurs on the host when a program exhausts the available shell stack space. On the host one sees only “Segmentation fault (core dumped)”. Unfortunately there is no way for the offload to know the issue relates specifically to insufficient stack space and report a different message.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page