Hi,
I have run into a problem with OpenACC with pgi/12.10.0, it does not seem to allow c structs which contain more than one struct member. For example the following code will not parallelize, giving an invalid loop error in the -Minfo output. If I however only have one double3 struct inside the st struct it seems to parallelize. Is this something that has been fixed in a newer version?
Thanks,
Adam
typedef struct ST st;
typedef struct TUPLE double3;
#include <stdio.h>
#include <stdlib.h>
struct TUPLE {
double x;
double y;
double z;
};
struct ST {
double3 pos;
double3 vel;
};
int main(int argc, char *argv[])
{
st *mystructs = (st*) malloc(sizeof(st)*1000);
int i;
st tmpST;
#pragma acc kernels copy(mystructs[0:1000])
for(i=0; i<1000; i++){
tmpST = mystructs[i];
}
return 0;
}
No, it’s more of a limitation. Though, I put in a feature request (TPR#19218) and we’ll see what can be done. Your case is simpler then others I’ve seen so may be possible.