Skip to content

Commit

Permalink
Merge branch '84-gpu-task-function-uses-wrong-intents-for-scratch-dat…
Browse files Browse the repository at this point in the history
…a' into 'master'

Merge branch 84 into master

Closes #84

See merge request joneal/OrchestrationRuntime!72
  • Loading branch information
ylee88 committed Jul 29, 2024
2 parents 810ea5a + c533ba2 commit 871afdf
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def generate_source_code(self, destination, overwrite):
intent = "OUT"
else:
raise LogicError("Unknown grid data variable class")

fptr.write(f"{INDENT*2}real, intent({intent}) :: {arg}_d(:, :, :, :, :)\n")

elif src == SCRATCH_ARGUMENT:
Expand All @@ -209,7 +210,7 @@ def generate_source_code(self, destination, overwrite):
assert dimension > 0
tmp = [":" for _ in range(dimension + 1)]
array = "(" + ", ".join(tmp) + ")"
fptr.write(f"{INDENT*2}{arg_type}, intent(IN) :: {arg}_d{array}\n")
fptr.write(f"{INDENT*2}{arg_type}, intent(INOUT) :: {arg}_d{array}\n")

else:
raise LogicError(f"{arg} of unknown argument class")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ subroutine gpu_tf_hydroFC_Fortran( &
integer, intent(IN) :: tile_lo_d(:, :)
integer, intent(IN) :: tile_hi_d(:, :)
real, intent(IN) :: tile_deltas_d(:, :)
real, intent(INOUT) :: CC_1_d(:, :, :, :, :)
real, intent(INOUT) :: CC_1_d(:, :, :, :, :)
real, intent(OUT) :: FLX_1_d(:, :, :, :, :)
real, intent(OUT) :: FLY_1_d(:, :, :, :, :)
real, intent(OUT) :: FLZ_1_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_auxc_d(:, :, :, :)
real, intent(INOUT) :: hydro_op1_auxc_d(:, :, :, :)

integer :: n

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ subroutine gpu_tf_hydro_Fortran( &
integer, intent(IN) :: tile_hi_d(:, :)
real, intent(IN) :: tile_deltas_d(:, :)
real, intent(INOUT) :: U_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_auxc_d(:, :, :, :)
real, intent(INOUT) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_auxc_d(:, :, :, :)

integer :: n

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ subroutine gpu_tf_hydro_Fortran( &
integer, intent(IN) :: tile_hi_d(:, :)
integer, intent(IN) :: tile_lo_d(:, :)
real, intent(INOUT) :: CC_1_d(:, :, :, :, :)
real, intent(IN) :: scratch_hydro_op1_auxC_d(:, :, :, :)
real, intent(IN) :: scratch_hydro_op1_flX_d(:, :, :, :, :)
real, intent(IN) :: scratch_hydro_op1_flY_d(:, :, :, :, :)
real, intent(IN) :: scratch_hydro_op1_flZ_d(:, :, :, :, :)
real, intent(INOUT) :: scratch_hydro_op1_auxC_d(:, :, :, :)
real, intent(INOUT) :: scratch_hydro_op1_flX_d(:, :, :, :, :)
real, intent(INOUT) :: scratch_hydro_op1_flY_d(:, :, :, :, :)
real, intent(INOUT) :: scratch_hydro_op1_flZ_d(:, :, :, :, :)
integer, intent(IN) :: lbdd_CC_1_d(:, :)
integer, intent(IN) :: lbdd_scratch_hydro_op1_auxC_d(:, :)
integer, intent(IN) :: lbdd_scratch_hydro_op1_flX_d(:, :)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ subroutine gpu_tf_hydro( &
integer, intent(IN) :: tile_hi_d(:, :)
real, intent(IN) :: tile_deltas_d(:, :)
real, intent(INOUT) :: CC_1_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_auxc_d(:, :, :, :)
real, intent(INOUT) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_auxc_d(:, :, :, :)

integer :: n
integer(MILHOJA_INT) :: MH_idx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ subroutine gpu_tf_test2_Fortran( &
integer, intent(IN) :: tile_hi_d(:, :)
real, intent(IN) :: tile_deltas_d(:, :)
real, intent(INOUT) :: CC_1_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_auxc_d(:, :, :, :)
real, intent(INOUT) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_auxc_d(:, :, :, :)

integer :: n

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ subroutine gpu_tf_test_Fortran( &
integer, intent(IN) :: tile_hi_d(:, :)
real, intent(IN) :: tile_deltas_d(:, :)
real, intent(INOUT) :: CC_1_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(IN) :: hydro_op1_auxc_d(:, :, :, :)
real, intent(INOUT) :: hydro_op1_flX_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flY_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_flZ_d(:, :, :, :, :)
real, intent(INOUT) :: hydro_op1_auxc_d(:, :, :, :)

integer :: n

Expand Down

0 comments on commit 871afdf

Please sign in to comment.