Pārlūkot izejas kodu

fix mode for redux codelet TODO : put in the documentation that reduction codeelet should be RW|COMMUTE ?

Antoine JEGO 4 gadi atpakaļ
vecāks
revīzija
617bbdf1a4

+ 1 - 1
mpi/examples/mpi_redux/mpi_redux.c

@@ -92,7 +92,7 @@ static struct starpu_codelet task_red_cl =
 {
 	.cpu_funcs = { cl_cpu_task_red },
 	.nbuffers = 2,
-	.modes = { STARPU_RW, STARPU_R },
+	.modes = { STARPU_RW|STARPU_COMMUTE, STARPU_R },
 	.name = "task_red"
 };
 

+ 1 - 1
mpi/examples/native_fortran/nf_redux_test.f90

@@ -71,7 +71,7 @@ program main
   task_red_cl = fstarpu_codelet_allocate()
   call fstarpu_codelet_set_name(task_red_cl, namered)
   call fstarpu_codelet_add_cpu_func(task_red_cl,C_FUNLOC(cl_cpu_task_red))
-  call fstarpu_codelet_add_buffer(task_red_cl, FSTARPU_RW)
+  call fstarpu_codelet_add_buffer(task_red_cl, FSTARPU_RW.ior.FSTARPU_COMMUTE)
   call fstarpu_codelet_add_buffer(task_red_cl, FSTARPU_R)
 
   task_ini_cl = fstarpu_codelet_allocate()