Global pointer to fixed size array does not work

This looks to be a duplicate of Pointer to fixed size array does not work.

Same answer in that you’re missing the attach.

static void allocatePosition( void ){
Position=(double (*)[DIM])malloc(sizeof(double [DIM])*N);
#pragma acc enter data create(Position[0:N][0:DIM]) attach(Position)
}

-Mat