This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

errors using #pragma target map from and to to the same variable



Hello,

I am using OpenMP 4.0, and trying to copy data to the device for computation, and copy out to the host after the computation. So what I am doing is:

//allocate zero-initialized data on the host

double *data = (double *) calloc(size_t, sizeof(double)); 

//Copyin to device and copyout to host after computation

#pragma omp target map(to: data[0 : sizet_t]) map(from: data[0 size_t])

#pramga omp parallel for

data[i] ...

But it got segmentation fault when I compiled the code.. 

INTERNAL ERROR: acpia6x experienced a segmentation fault

his is caused by a defect in the compiler itself. TI Customer
Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue". Include this ENTIRE error message and a
copy of the .pp file created when option --preproc_with_comment
(-ppc) is used.


>> Compilation failure

So where is the problem??