You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
! Original code before transformation
PROGRAM test_abstraction10
USE mo_column, ONLY: compute_column_public
REAL, DIMENSION(20,60) :: q, t ! Fields as declared in the whole model
INTEGER:: nproma, nz ! Size of array fields
INTEGER:: p ! Loop index
nproma =20
nz =60DO p =1, nproma
q(p,1) =0.0
t(p,1) =0.0END DO
!$claw sca forward create update
DO p =1, nproma
CALL compute_column_public(nz, q(p,:), t(p,:))
END DOPRINT*,SUM(q)
PRINT*,SUM(t)
END PROGRAM test_abstraction10
! Can also be XcodeML directly
Transformation code
! Wrong code after being processed by CLAW
! Can also be XcodeML directly
Expected code
PROGRAM test_abstraction10
USE mo_column , ONLY: compute_column_public
REAL:: q ( 1 : 20 , 1 : 60 )
REAL:: t ( 1 : 20 , 1 : 60 )
INTEGER:: nproma
INTEGER:: nz
INTEGER:: p
nproma =20
nz =60DO p =1 , nproma , 1
q ( p , 1 ) =0.0
t ( p , 1 ) =0.0END DO
!$omp target data map(alloc:q(:,:),t(:,:))
!$omp target update to(q(:,:),t(:,:))
CALL compute_column_public ( nz , q ( : , : ) , t ( : , : ) )
!$omp target update from(q(:,:),t(:,:))
!$omp end target dataPRINT* , sum ( q )
PRINT* , sum ( t )
END PROGRAM test_abstraction10
! Expected code
PROGRAM test_abstraction10
USE mo_column , ONLY: compute_column_public
REAL:: q ( 1 : 20 , 1 : 60 )
REAL:: t ( 1 : 20 , 1 : 60 )
INTEGER:: nproma
INTEGER:: nz
INTEGER:: p
nproma =20
nz =60DO p =1 , nproma , 1
q ( p , 1 ) =0.0
t ( p , 1 ) =0.0END DO
!$omp target data map(alloc:q(:,:),t(:,:))
!$omp target update to(q(:,:),t(:,:))
CALL compute_column_public ( nz , q ( : , : ) , t ( : , : ) , nproma = nproma&
)
!$omp target update from(q(:,:),t(:,:))
!$omp end target dataPRINT* , sum ( q )
PRINT* , sum ( t )
END PROGRAM test_abstraction10
! Can also be XcodeML directly
Execution of clawfc
# Command used to apply the transformation
clawfc --directive=openmp --target=gpu
Related issues (if any)
Issue #00
The text was updated successfully, but these errors were encountered:
Description of the issue in few words.
Original code
Transformation code
Expected code
Execution of
clawfc
# Command used to apply the transformation
clawfc --directive=openmp --target=gpu
Related issues (if any)
Issue #00
The text was updated successfully, but these errors were encountered: