Acc. restriction: function/procedure calls are not supported

I am trying to compile the following code:
for(int i=0;i<1000;i++)
for(int j=0;j<1000;j++)
a_[j] = 1;
#pragma data copy(a)
#pragma acc kernels
for(int i=0;i<1000;i++)
for(int j=0;j<1000;j++)
a[j] = 2 * a[j];

But I am getting the following errors:
Accelerator region ignored
Accelerator restriction: function/procedure calls are not supported
Accelerator restriction: unsupported call to '_c_subchk’

What could be the problem?

Thanks in Advance.
Vaibhav Jain

Hi Vaibhav Jain,

What flags are you using? This routine is added when bounds checking is enabled and bounds checking isn’t available on the device. Please remove “-C” and/or “-Mbounds” and try again.

  • Mat