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

Automatic parallelization in SCA forward subroutine #465

Open
clementval opened this issue Oct 24, 2018 · 0 comments
Open

Automatic parallelization in SCA forward subroutine #465

clementval opened this issue Oct 24, 2018 · 0 comments

Comments

@clementval
Copy link
Collaborator

Description

Currently, the parallelisation is done automatically in the root SCA subroutine/function. When using sea forward along the call graph, some parallization must be done as well. But user must do it explicitly at the moment. This should be done by CLAW.

Original code

!$claw parallelize forward
CALL column%compute_column(nz, q, t)

q = q + sum(t)

Transformed code

  CALL column % compute_column ( nz , q , t , nproma = nproma )
  q = q + sum ( t )

Expected code

CALL column % compute_column ( nz , q , t , nproma = nproma )
!$acc parallel
!$acc loop gang vector collapse(2)
do iter1 = lbound(q, 1), ubound(q, 1)
  do iter2 = lbound(q, 2), ubound(q, 2)
    q(iter1, iter2) = q(iter1, iter2) + sum ( t )
  end do
end do
!$acc end parallel

Execution of clawfc

clawfc --target=gpu --directive=acc -o transformed_code.f90 original_code.f90

Related issues (if any)

  • None
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