Procházet zdrojové kódy

fix WHERE flag the Fortran insert_task API

Olivier Aumage před 4 roky
rodič
revize
0c24e72bd4

+ 5 - 1
examples/native_fortran/nf_vector.f90

@@ -94,7 +94,11 @@ program nf_vector
         !     . . .
         !     C_NULL_PTR
         !   )/
-        call fstarpu_insert_task((/ cl_vec, FSTARPU_R, dh_va, FSTARPU_RW.ior.FSTARPU_LOCALITY, dh_vb, C_NULL_PTR /))
+        call fstarpu_insert_task((/ cl_vec, &
+                FSTARPU_R, dh_va, &
+                FSTARPU_RW.ior.FSTARPU_LOCALITY, dh_vb, &
+                FSTARPU_EXECUTE_WHERE, FSTARPU_CPU, & ! for illustration, not required here
+                C_NULL_PTR /))
 
         ! wait for task completion
         call fstarpu_task_wait_for_all()

+ 1 - 2
src/util/starpu_task_insert_utils.c

@@ -939,9 +939,8 @@ int _fstarpu_task_insert_create(struct starpu_codelet *cl, struct starpu_task *t
 		}
 		else if (arg_type == STARPU_EXECUTE_WHERE)
 		{
-			assert(0);
 			arg_i++;
-			unsigned long long where = *(unsigned long long *)arglist[arg_i];
+			int32_t where = (int32_t)(intptr_t)arglist[arg_i];
 			task->where = where;
 		}
 		else if (arg_type == STARPU_EXECUTE_ON_WORKER)