diff --git a/tools/milhoja_pypkg/src/milhoja/TaskFunctionGenerator_OpenACC_F.py b/tools/milhoja_pypkg/src/milhoja/TaskFunctionGenerator_OpenACC_F.py index 6b4b73ab..e1d2738a 100644 --- a/tools/milhoja_pypkg/src/milhoja/TaskFunctionGenerator_OpenACC_F.py +++ b/tools/milhoja_pypkg/src/milhoja/TaskFunctionGenerator_OpenACC_F.py @@ -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: @@ -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") diff --git a/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydroFC_2D.F90 b/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydroFC_2D.F90 index 7dc40cba..c3149757 100644 --- a/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydroFC_2D.F90 +++ b/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydroFC_2D.F90 @@ -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 diff --git a/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_2D.F90 b/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_2D.F90 index d83aae41..73fd8e1c 100644 --- a/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_2D.F90 +++ b/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_2D.F90 @@ -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 diff --git a/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_3D.F90 b/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_3D.F90 index bc9a1ad0..019853b9 100644 --- a/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_3D.F90 +++ b/tools/milhoja_pypkg/src/milhoja/tests/data/FlashX/REF_gpu_tf_hydro_3D.F90 @@ -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(:, :) diff --git a/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_hydro_3D.F90 b/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_hydro_3D.F90 index 5c903b8b..0c34c9f0 100644 --- a/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_hydro_3D.F90 +++ b/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_hydro_3D.F90 @@ -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 diff --git a/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test2_3D.F90 b/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test2_3D.F90 index 67f1a797..c0b555c0 100644 --- a/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test2_3D.F90 +++ b/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test2_3D.F90 @@ -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 diff --git a/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test_3D.F90 b/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test_3D.F90 index c7a2fbe0..0c0e5ef6 100644 --- a/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test_3D.F90 +++ b/tools/milhoja_pypkg/src/milhoja/tests/data/Sedov/REF_gpu_tf_test_3D.F90 @@ -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