Use openacc ,and have an error with

Invalid accelerator region: not a single-entry single-exit region
[/code]!$acc kernels loop
DO q = 1, TNP

ENDIF

WHAT****


[/b]

Hi justpk,

Looks like you missed commenting out one of your GOTO statements. GOTOs are fine to use so long as they jump inside the body of the loop, but this one looks think it jumps out of the loop.

  • Mat



hi mat,
thank u verymuch,but if i use gotos ,will openacc work? openacc should be single-entry single-exit?

thank u verymuch,but if i use gotos ,will openacc work? openacc should be single-entry single-exit?

The compute region must have a single entry and exit. The reason is that a early exit is a dependent operation forcing the loop to performed sequentially.

However, if the GOTO jumps within a single compute region, then it’s fine to use.

  • MAt