OpenMP Target Offloading Bug - Making Target Region in Task

Dear Nvidia HPC Compiler team

I posted a bug report last month that you were kind and fixed right away. This motivated me to try to report some of the other bugs that I have stumbled upon when doing OpenMP target offloading with NVC. I hope this will help you to improve your HPC compilers, which I am really satisfied with despite the bugs.

The issue is that you cannot embed a target teams clause in a task region. However, if you make a wrapper function for the target region and call the function from a task, the exact same code works.

This time I have prepared a small example for you that you can take a look at:

Best regards,


Thanks Anton. I’ve filed this as TPR #31927.

I was playing with the example to see if could figure out why it’s seg faulting, (I couldn’t) but stumbled upon another issue where if I change the inner loop to use “loop” rather than “distribute parallel for”, the compiler gets undefined references at link. Unclear if it’s related, so I added a second report, TPR #31928, for this issue.


Hi Mat

It is interesting that there is also an issue with “loop”.

Again, thank you so much for the thorough testing and great support.