I'm using the CAPS OpenACC compiler. I've tried to use dynamic array inside of the struct data type in the OpenACC pragma lines. My code like that:
struct Structure{
int val[n];
int length;
int *valdyn;
};
#pragma acc parallel copyin(sa,sb) copyout(c[0:n])
{
#pragma acc loop
for (int i = 0; i < n; i++)
c[i] = sa.valdyn[i] + sb.valdyn[i];
}
It was compiled successfully. But when i tried to run, i got these errors
terminate called after throwing an instance of 'hmpperr::DeviceError'
what(): cuCtxSynchronize() failed: Launch failed (700)
So my question is that is there any way to use struct data types together with OpenACC? Moreover My case is also valid for struct in struct like that:
struct Structure{
int val[20];
int length;
struct Other_Struct *Residue ;
int *valdyn;
};