I tried to port a code to GPU using OpenACC but randomly got error
“FATAL ERROR: variable in data clause is partially present on the device: name=(unknown)”
This implementation likes
// d is a structure including “double *x”
d->X = tmalloc(double,nx);
#pragma acc enter data copyin(d)
#pragma acc enter data create(d->X[0:nx])
Sometimes it crashed with this error. Sometimes it worked after recompiling or rerunning. Notice that many variables have already been created/copied-in on GPU using OpenACC directives. Could the error be related to the other variables that may be correctly created/free on GPU ? Is there any debugging tool available for such issue?