Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Segmentation fault whith OMP 4.0 map of larger array

$
0
0

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;
}

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



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