Research Article

Performance of a Code Migration for the Simulation of Supersonic Ejector Flow to SMP, MIC, and GPU Using OpenMP, OpenMP+LEO, and OpenACC Directives

Listing 11

Format of the OpenACC directives used when a reduction is required. For the outer loop the directive acc loop has to be deleted.
DO i=2,(ni-1)
!$acc loop reduction(+:ETOT)
DO j=2,(nj-1)
ETOT = ETOT + (ET(i,j)*VOL(i,j));
END DO
END DO