<div dir="ltr">Hi,<div><br></div><div>I'm trying to run some examples using OpenMP offloading to GPU, and I'm having some issues. See this function below:</div><div><br></div><div>void doWork(const double *inputData, // the input data<br>                     double *outputData) //  where computation goes<br>{<br>#pragma omp target data map(inputData) map(outputData)<br>{<br>#pragma omp target teams distribute parallel for<br>    for (int j=0; j<10; j++)<br>    {<br>        for (int i=0; i< 10; i++)<br>        {<br>           outputData[indx] = inputData[indx];<br>        }<br>    }<br>}</div><div>}</div><div><br></div><div>When I try to run this code, I get something like this:</div><div><br></div><div>Libomptarget fatal error 1: failure of target construct while offloading is mandatory</div><div><br></div><div>This is probably something stupid, sorry about that. It seems that the problem is that the data from inputData is not mapped to the device. Could you please help me with that?</div><div><br></div><div>Thanks,</div><div>Talita</div></div>