Open arporter opened 2 years ago
I've created 80_explicit_data_mv
branch for this, based off the one where I'm adding tracer advection for #75.
I've added a new target for the 'compute in subroutine' version of the benchmark. This processes and compiles on my laptop although we generate very sub-optimal code in the driver routine:
OPEN(UNIT = 24, FILE = 'output.dat', FORM = 'formatted')
checksum = 0.0d0
!$acc update if_present device(checksum)
!$acc update if_present host(jpk)
do jk = 1, jpk - 1, 1
!$acc update if_present host(jpj)
do jj = 2, jpj - 1, 1
!$acc update if_present host(jpi)
do ji = 2, jpi - 1, 1
!$acc update if_present host(checksum,mydomain)
checksum = checksum + mydomain(ji,jj,jk)
!$acc update if_present device(checksum)
STOP 'PSyclone: tracer_advection: manually add ACC update statements (if required) for the following CodeBlock...'
WRITE(24, *) mydomain(ji, jj, jk)
It turns out that 'enter data' does not work well with automatic arrays. It seems that the best solution to this is to implement the 'raise-to-module-scope' transformation.
76 is adding OpenACC versions of the tracer-advection benchmark. Currently these all use managed memory but psyclone/#310 is adding support for explicit control of data movement.