Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit data-movement version of tracer-advection benchmark. #80

Open
arporter opened this issue Jan 6, 2022 · 3 comments
Open
Assignees

Comments

@arporter
Copy link
Member

arporter commented Jan 6, 2022

#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.

@arporter
Copy link
Member Author

arporter commented Jan 6, 2022

I've created 80_explicit_data_mv branch for this, based off the one where I'm adding tracer advection for #75.

@arporter
Copy link
Member Author

arporter commented Feb 25, 2022

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)

@arporter
Copy link
Member Author

arporter commented Mar 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant