From 0c738e6b9718d0110497007c0bb0cd7465d1cb12 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Fri, 4 Feb 2022 19:51:18 +0100
Subject: [PATCH] starpu: Factorize the worker id setting through the request

---
 runtime/starpu/codelets/codelet_dlag2z.c        | 4 +---
 runtime/starpu/codelets/codelet_dzasum.c        | 4 +---
 runtime/starpu/codelets/codelet_map.c           | 4 +---
 runtime/starpu/codelets/codelet_zaxpy.c         | 4 +---
 runtime/starpu/codelets/codelet_zbuild.c        | 4 +---
 runtime/starpu/codelets/codelet_zcesca.c        | 4 +---
 runtime/starpu/codelets/codelet_zgeadd.c        | 4 +---
 runtime/starpu/codelets/codelet_zgelqt.c        | 4 +---
 runtime/starpu/codelets/codelet_zgemm.c         | 9 ++-------
 runtime/starpu/codelets/codelet_zgemv.c         | 4 +---
 runtime/starpu/codelets/codelet_zgeqrt.c        | 4 +---
 runtime/starpu/codelets/codelet_zgessm.c        | 4 +---
 runtime/starpu/codelets/codelet_zgessq.c        | 4 +---
 runtime/starpu/codelets/codelet_zgesum.c        | 4 +---
 runtime/starpu/codelets/codelet_zgetrf.c        | 4 +---
 runtime/starpu/codelets/codelet_zgetrf_incpiv.c | 4 +---
 runtime/starpu/codelets/codelet_zgetrf_nopiv.c  | 4 +---
 runtime/starpu/codelets/codelet_zgram.c         | 4 +---
 runtime/starpu/codelets/codelet_zhe2ge.c        | 4 +---
 runtime/starpu/codelets/codelet_zhemm.c         | 4 +---
 runtime/starpu/codelets/codelet_zher2k.c        | 4 +---
 runtime/starpu/codelets/codelet_zherfb.c        | 4 +---
 runtime/starpu/codelets/codelet_zherk.c         | 9 ++-------
 runtime/starpu/codelets/codelet_zlacpy.c        | 8 +-------
 runtime/starpu/codelets/codelet_zlag2c.c        | 8 ++------
 runtime/starpu/codelets/codelet_zlange.c        | 8 ++------
 runtime/starpu/codelets/codelet_zlanhe.c        | 4 +---
 runtime/starpu/codelets/codelet_zlansy.c        | 4 +---
 runtime/starpu/codelets/codelet_zlantr.c        | 4 +---
 runtime/starpu/codelets/codelet_zlascal.c       | 8 +-------
 runtime/starpu/codelets/codelet_zlaset.c        | 8 +-------
 runtime/starpu/codelets/codelet_zlaset2.c       | 4 +---
 runtime/starpu/codelets/codelet_zlatro.c        | 4 +---
 runtime/starpu/codelets/codelet_zlauum.c        | 8 +-------
 runtime/starpu/codelets/codelet_zplghe.c        | 8 +-------
 runtime/starpu/codelets/codelet_zplgsy.c        | 8 +-------
 runtime/starpu/codelets/codelet_zplrnt.c        | 8 +-------
 runtime/starpu/codelets/codelet_zplssq.c        | 8 ++------
 runtime/starpu/codelets/codelet_zpotrf.c        | 8 +-------
 runtime/starpu/codelets/codelet_zssssm.c        | 4 +---
 runtime/starpu/codelets/codelet_zsymm.c         | 4 +---
 runtime/starpu/codelets/codelet_zsyr2k.c        | 4 +---
 runtime/starpu/codelets/codelet_zsyrk.c         | 9 ++-------
 runtime/starpu/codelets/codelet_zsyssq.c        | 4 +---
 runtime/starpu/codelets/codelet_zsytrf_nopiv.c  | 4 +---
 runtime/starpu/codelets/codelet_ztplqt.c        | 4 +---
 runtime/starpu/codelets/codelet_ztpmlqt.c       | 4 +---
 runtime/starpu/codelets/codelet_ztpmqrt.c       | 4 +---
 runtime/starpu/codelets/codelet_ztpqrt.c        | 4 +---
 runtime/starpu/codelets/codelet_ztradd.c        | 9 ++-------
 runtime/starpu/codelets/codelet_ztrasm.c        | 4 +---
 runtime/starpu/codelets/codelet_ztrmm.c         | 8 +-------
 runtime/starpu/codelets/codelet_ztrsm.c         | 8 +-------
 runtime/starpu/codelets/codelet_ztrssq.c        | 4 +---
 runtime/starpu/codelets/codelet_ztrtri.c        | 8 +-------
 runtime/starpu/codelets/codelet_ztsmlq_hetra1.c | 4 +---
 runtime/starpu/codelets/codelet_ztsmqr_hetra1.c | 4 +---
 runtime/starpu/codelets/codelet_ztstrf.c        | 4 +---
 runtime/starpu/codelets/codelet_zunmlq.c        | 4 +---
 runtime/starpu/codelets/codelet_zunmqr.c        | 4 +---
 60 files changed, 67 insertions(+), 249 deletions(-)

diff --git a/runtime/starpu/codelets/codelet_dlag2z.c b/runtime/starpu/codelets/codelet_dlag2z.c
index 50bb09452..3a21d3d57 100644
--- a/runtime/starpu/codelets/codelet_dlag2z.c
+++ b/runtime/starpu/codelets/codelet_dlag2z.c
@@ -54,8 +54,6 @@ void INSERT_TASK_dlag2z( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_dlag2z;
     void (*callback)(void*) = options->profiling ? cl_dlag2z_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -71,7 +69,7 @@ void INSERT_TASK_dlag2z( const RUNTIME_option_t *options,
         STARPU_W,         RTBLKADDR(B, CHAMELEON_Complex64_t, Bm, Bn),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "dlag2z",
 #endif
diff --git a/runtime/starpu/codelets/codelet_dzasum.c b/runtime/starpu/codelets/codelet_dzasum.c
index 1ffee91e4..9eaf10b58 100644
--- a/runtime/starpu/codelets/codelet_dzasum.c
+++ b/runtime/starpu/codelets/codelet_dzasum.c
@@ -55,8 +55,6 @@ void INSERT_TASK_dzasum( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_dzasum;
     void (*callback)(void*) = options->profiling ? cl_dzasum_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -73,7 +71,7 @@ void INSERT_TASK_dzasum( const RUNTIME_option_t *options,
         STARPU_RW,        RTBLKADDR(B, double, Bm, Bn),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-         STARPU_EXECUTE_ON_WORKER, workerid,
+         STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "dzasum",
 #endif
diff --git a/runtime/starpu/codelets/codelet_map.c b/runtime/starpu/codelets/codelet_map.c
index 0421c1c86..9814dd352 100644
--- a/runtime/starpu/codelets/codelet_map.c
+++ b/runtime/starpu/codelets/codelet_map.c
@@ -49,8 +49,6 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
 
     struct starpu_codelet *codelet = &cl_map;
     void (*callback)(void*) = options->profiling ? cl_map_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
@@ -67,7 +65,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
         STARPU_VALUE,    &op_args,                sizeof(void*),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "map",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zaxpy.c b/runtime/starpu/codelets/codelet_zaxpy.c
index 7c15ae307..63cc9fa77 100644
--- a/runtime/starpu/codelets/codelet_zaxpy.c
+++ b/runtime/starpu/codelets/codelet_zaxpy.c
@@ -51,8 +51,6 @@ void INSERT_TASK_zaxpy( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zaxpy;
     void (*callback)(void*) = options->profiling ? cl_zaxpy_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     if ( alpha == 0. ) {
         return;
@@ -73,7 +71,7 @@ void INSERT_TASK_zaxpy( const RUNTIME_option_t *options,
             STARPU_VALUE,    &incB,                        sizeof(int),
             STARPU_PRIORITY, options->priority,
             STARPU_CALLBACK, callback,
-            STARPU_EXECUTE_ON_WORKER, workerid,
+            STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
             STARPU_NAME, "zaxpy",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zbuild.c b/runtime/starpu/codelets/codelet_zbuild.c
index 592cbf7e5..24d237bc8 100644
--- a/runtime/starpu/codelets/codelet_zbuild.c
+++ b/runtime/starpu/codelets/codelet_zbuild.c
@@ -63,8 +63,6 @@ CODELETS_CPU(zbuild, cl_zbuild_cpu_func)
 
     struct starpu_codelet *codelet = &cl_zbuild;
     void (*callback)(void*) = options->profiling ? cl_zbuild_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int row_min, row_max, col_min, col_max;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -86,7 +84,7 @@ CODELETS_CPU(zbuild, cl_zbuild_cpu_func)
         STARPU_VALUE,    &user_build_callback,          sizeof(void*),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zbuild",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zcesca.c b/runtime/starpu/codelets/codelet_zcesca.c
index ae7345323..f7c87937d 100644
--- a/runtime/starpu/codelets/codelet_zcesca.c
+++ b/runtime/starpu/codelets/codelet_zcesca.c
@@ -70,8 +70,6 @@ void INSERT_TASK_zcesca( const RUNTIME_option_t *options,
     struct cl_zcesca_args_s *clargs = NULL;
     struct starpu_codelet *codelet = &cl_zcesca;
     void (*callback)(void*) = options->profiling ? cl_zcesca_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int exec = 0;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -106,7 +104,7 @@ void INSERT_TASK_zcesca( const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zcesca",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgeadd.c b/runtime/starpu/codelets/codelet_zgeadd.c
index 94f197d96..7d7a0045a 100644
--- a/runtime/starpu/codelets/codelet_zgeadd.c
+++ b/runtime/starpu/codelets/codelet_zgeadd.c
@@ -98,8 +98,6 @@ void INSERT_TASK_zgeadd( const RUNTIME_option_t *options,
 
     struct starpu_codelet *codelet = &cl_zgeadd;
     void (*callback)(void*) = options->profiling ? cl_zgeadd_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessB = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -118,7 +116,7 @@ void INSERT_TASK_zgeadd( const RUNTIME_option_t *options,
         accessB,          RTBLKADDR(B, CHAMELEON_Complex64_t, Bm, Bn),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgeadd",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgelqt.c b/runtime/starpu/codelets/codelet_zgelqt.c
index 07d5134b7..fcb9c0059 100644
--- a/runtime/starpu/codelets/codelet_zgelqt.c
+++ b/runtime/starpu/codelets/codelet_zgelqt.c
@@ -68,8 +68,6 @@ void INSERT_TASK_zgelqt(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zgelqt;
     void (*callback)(void*) = options->profiling ? cl_zgelqt_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     CHAMELEON_starpu_ws_t *h_work = (CHAMELEON_starpu_ws_t*)(options->ws_host);
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -90,7 +88,7 @@ void INSERT_TASK_zgelqt(const RUNTIME_option_t *options,
         STARPU_VALUE,    &h_work,            sizeof(CHAMELEON_starpu_ws_t *),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgelqt",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgemm.c b/runtime/starpu/codelets/codelet_zgemm.c
index 99b3b6d4a..a3f584f55 100644
--- a/runtime/starpu/codelets/codelet_zgemm.c
+++ b/runtime/starpu/codelets/codelet_zgemm.c
@@ -116,9 +116,7 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options,
 
     struct cl_zgemm_args_s  *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid, accessC;
+    int                      accessC;
     int                      exec = 0;
     char                    *cl_name = "zgemm";
 
@@ -147,9 +145,6 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options,
     /* Callback for profiling information */
     callback = options->profiling ? cl_zgemm_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Reduce the C access if needed */
     accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
@@ -175,7 +170,7 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgemv.c b/runtime/starpu/codelets/codelet_zgemv.c
index 8c85f66bb..89fdd39f2 100644
--- a/runtime/starpu/codelets/codelet_zgemv.c
+++ b/runtime/starpu/codelets/codelet_zgemv.c
@@ -101,8 +101,6 @@ void INSERT_TASK_zgemv( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zgemv;
     void (*callback)(void*) = options->profiling ? cl_zgemv_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessY = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -125,7 +123,7 @@ void INSERT_TASK_zgemv( const RUNTIME_option_t *options,
         STARPU_VALUE,    &incY,              sizeof(int),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgemv",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgeqrt.c b/runtime/starpu/codelets/codelet_zgeqrt.c
index 8396f970e..14b877772 100644
--- a/runtime/starpu/codelets/codelet_zgeqrt.c
+++ b/runtime/starpu/codelets/codelet_zgeqrt.c
@@ -69,8 +69,6 @@ void INSERT_TASK_zgeqrt(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zgeqrt;
     void (*callback)(void*) = options->profiling ? cl_zgeqrt_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     CHAMELEON_starpu_ws_t *h_work = (CHAMELEON_starpu_ws_t*)(options->ws_host);
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -91,7 +89,7 @@ void INSERT_TASK_zgeqrt(const RUNTIME_option_t *options,
         STARPU_VALUE,    &h_work,            sizeof(CHAMELEON_starpu_ws_t *),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgeqrt",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgessm.c b/runtime/starpu/codelets/codelet_zgessm.c
index 490db9634..352e98d61 100644
--- a/runtime/starpu/codelets/codelet_zgessm.c
+++ b/runtime/starpu/codelets/codelet_zgessm.c
@@ -63,8 +63,6 @@ void INSERT_TASK_zgessm( const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zgessm;
     void (*callback)(void*) = options->profiling ? cl_zgessm_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(L, Lm, Ln);
@@ -84,7 +82,7 @@ void INSERT_TASK_zgessm( const RUNTIME_option_t *options,
         STARPU_RW,            RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgessm",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgessq.c b/runtime/starpu/codelets/codelet_zgessq.c
index dedbe5daa..c2d62fd4c 100644
--- a/runtime/starpu/codelets/codelet_zgessq.c
+++ b/runtime/starpu/codelets/codelet_zgessq.c
@@ -54,8 +54,6 @@ void INSERT_TASK_zgessq( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zgessq;
     void (*callback)(void*) = options->profiling ? cl_zgessq_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -71,7 +69,7 @@ void INSERT_TASK_zgessq( const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgessq",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgesum.c b/runtime/starpu/codelets/codelet_zgesum.c
index 3f04e3a7d..ed0dbbfd6 100644
--- a/runtime/starpu/codelets/codelet_zgesum.c
+++ b/runtime/starpu/codelets/codelet_zgesum.c
@@ -51,8 +51,6 @@ void INSERT_TASK_zgesum( const RUNTIME_option_t *options,
     struct cl_zgesum_args_s *clargs = NULL;
     struct starpu_codelet *codelet = &cl_zgesum;
     void (*callback)(void*) = options->profiling ? cl_zgesum_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int exec = 0;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -75,7 +73,7 @@ void INSERT_TASK_zgesum( const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(SUMS, CHAMELEON_Complex64_t, SUMSm, SUMSn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgesum",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgetrf.c b/runtime/starpu/codelets/codelet_zgetrf.c
index 483542808..79eaa2951 100644
--- a/runtime/starpu/codelets/codelet_zgetrf.c
+++ b/runtime/starpu/codelets/codelet_zgetrf.c
@@ -65,8 +65,6 @@ void INSERT_TASK_zgetrf( const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zgetrf;
     void (*callback)(void*) = options->profiling ? cl_zgetrf_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
@@ -84,7 +82,7 @@ void INSERT_TASK_zgetrf( const RUNTIME_option_t *options,
         STARPU_VALUE,    &(options->request),        sizeof(RUNTIME_request_t*),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgetrf",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgetrf_incpiv.c b/runtime/starpu/codelets/codelet_zgetrf_incpiv.c
index feab43fd7..792849815 100644
--- a/runtime/starpu/codelets/codelet_zgetrf_incpiv.c
+++ b/runtime/starpu/codelets/codelet_zgetrf_incpiv.c
@@ -70,8 +70,6 @@ void INSERT_TASK_zgetrf_incpiv(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zgetrf_incpiv;
     void (*callback)(void*) = options->profiling ? cl_zgetrf_incpiv_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_starpu_ws_t *h_work = (CHAMELEON_starpu_ws_t*)(options->ws_host);
 
@@ -96,7 +94,7 @@ void INSERT_TASK_zgetrf_incpiv(const RUNTIME_option_t *options,
         STARPU_VALUE,    &(options->request),        sizeof(RUNTIME_request_t*),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgetrf_incpiv",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgetrf_nopiv.c b/runtime/starpu/codelets/codelet_zgetrf_nopiv.c
index e64963859..7d84e67ae 100644
--- a/runtime/starpu/codelets/codelet_zgetrf_nopiv.c
+++ b/runtime/starpu/codelets/codelet_zgetrf_nopiv.c
@@ -65,8 +65,6 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zgetrf_nopiv;
     void (*callback)(void*) = options->profiling ? cl_zgetrf_nopiv_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
@@ -83,7 +81,7 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options,
         STARPU_VALUE,    &(options->request),        sizeof(RUNTIME_request_t*),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgetrf_nopiv",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zgram.c b/runtime/starpu/codelets/codelet_zgram.c
index 6afa0186c..77dac818f 100644
--- a/runtime/starpu/codelets/codelet_zgram.c
+++ b/runtime/starpu/codelets/codelet_zgram.c
@@ -55,8 +55,6 @@ void INSERT_TASK_zgram( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zgram;
     void (*callback)(void*) = options->profiling ? cl_zgram_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(Di, Dim, Din);
@@ -78,7 +76,7 @@ void INSERT_TASK_zgram( const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(A, double, Am, An),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zgram",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zhe2ge.c b/runtime/starpu/codelets/codelet_zhe2ge.c
index a861161d6..5f4f4a983 100644
--- a/runtime/starpu/codelets/codelet_zhe2ge.c
+++ b/runtime/starpu/codelets/codelet_zhe2ge.c
@@ -54,8 +54,6 @@ void INSERT_TASK_zhe2ge( const RUNTIME_option_t *options,
     (void)mb;
     struct starpu_codelet *codelet = &cl_zhe2ge;
     void (*callback)(void*) = options->profiling ? cl_zhe2ge_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -71,7 +69,7 @@ void INSERT_TASK_zhe2ge( const RUNTIME_option_t *options,
         STARPU_W,             RTBLKADDR(B, CHAMELEON_Complex64_t, Bm, Bn),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zhe2ge",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zhemm.c b/runtime/starpu/codelets/codelet_zhemm.c
index f772530ce..2b85fbdae 100644
--- a/runtime/starpu/codelets/codelet_zhemm.c
+++ b/runtime/starpu/codelets/codelet_zhemm.c
@@ -114,8 +114,6 @@ void INSERT_TASK_zhemm(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zhemm;
     void (*callback)(void*) = options->profiling ? cl_zhemm_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -137,7 +135,7 @@ void INSERT_TASK_zhemm(const RUNTIME_option_t *options,
         accessC,                RTBLKADDR(C, CHAMELEON_Complex64_t, Cm, Cn),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zhemm",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zher2k.c b/runtime/starpu/codelets/codelet_zher2k.c
index 9654ff80e..a3d12b158 100644
--- a/runtime/starpu/codelets/codelet_zher2k.c
+++ b/runtime/starpu/codelets/codelet_zher2k.c
@@ -111,8 +111,6 @@ INSERT_TASK_zher2k( const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zher2k;
     void (*callback)(void*) = options->profiling ? cl_zher2k_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -134,7 +132,7 @@ INSERT_TASK_zher2k( const RUNTIME_option_t *options,
         accessC,                  RTBLKADDR(C, CHAMELEON_Complex64_t, Cm, Cn),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zher2k",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zherfb.c b/runtime/starpu/codelets/codelet_zherfb.c
index 391719c02..4cc999337 100644
--- a/runtime/starpu/codelets/codelet_zherfb.c
+++ b/runtime/starpu/codelets/codelet_zherfb.c
@@ -96,8 +96,6 @@ void INSERT_TASK_zherfb(const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zherfb;
     void (*callback)(void*) = options->profiling ? cl_zherfb_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -119,7 +117,7 @@ void INSERT_TASK_zherfb(const RUNTIME_option_t *options,
         STARPU_SCRATCH,   options->ws_worker,
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zherfb",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zherk.c b/runtime/starpu/codelets/codelet_zherk.c
index 129ce0c5e..008d1822d 100644
--- a/runtime/starpu/codelets/codelet_zherk.c
+++ b/runtime/starpu/codelets/codelet_zherk.c
@@ -101,9 +101,7 @@ void INSERT_TASK_zherk( const RUNTIME_option_t *options,
 
     struct cl_zherk_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid, accessC;
+    int                      accessC;
     int                      exec = 0;
     char                    *cl_name = "zherk";
 
@@ -129,9 +127,6 @@ void INSERT_TASK_zherk( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zherk_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Reduce the C access if needed */
     accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
@@ -154,7 +149,7 @@ void INSERT_TASK_zherk( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlacpy.c b/runtime/starpu/codelets/codelet_zlacpy.c
index 883fcb2b3..29733a6d3 100644
--- a/runtime/starpu/codelets/codelet_zlacpy.c
+++ b/runtime/starpu/codelets/codelet_zlacpy.c
@@ -69,9 +69,6 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
 {
     struct cl_zlacpy_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zlacpy";
 
@@ -96,9 +93,6 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zlacpy_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Insert the task */
     rt_starpu_insert_task(
         &cl_zlacpy,
@@ -110,7 +104,7 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlag2c.c b/runtime/starpu/codelets/codelet_zlag2c.c
index 2814f30f7..421d97afd 100644
--- a/runtime/starpu/codelets/codelet_zlag2c.c
+++ b/runtime/starpu/codelets/codelet_zlag2c.c
@@ -61,8 +61,6 @@ void INSERT_TASK_zlag2c(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zlag2c;
     void (*callback)(void*) = options->profiling ? cl_zlag2c_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -77,7 +75,7 @@ void INSERT_TASK_zlag2c(const RUNTIME_option_t *options,
         STARPU_W,         RTBLKADDR(B, CHAMELEON_Complex32_t, Bm, Bn),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlag2c",
 #endif
@@ -113,8 +111,6 @@ void INSERT_TASK_clag2z(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_clag2z;
     void (*callback)(void*) = options->profiling ? cl_clag2z_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R( A, Am, An );
@@ -129,7 +125,7 @@ void INSERT_TASK_clag2z(const RUNTIME_option_t *options,
         STARPU_W,         RTBLKADDR(B, CHAMELEON_Complex64_t, Bm, Bn),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "clag2z",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlange.c b/runtime/starpu/codelets/codelet_zlange.c
index 3873cfc28..d8f76aa47 100644
--- a/runtime/starpu/codelets/codelet_zlange.c
+++ b/runtime/starpu/codelets/codelet_zlange.c
@@ -59,8 +59,6 @@ void INSERT_TASK_zlange( const RUNTIME_option_t *options,
     (void)NB;
     struct starpu_codelet *codelet = &cl_zlange;
     void (*callback)(void*) = options->profiling ? cl_zlange_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -77,7 +75,7 @@ void INSERT_TASK_zlange( const RUNTIME_option_t *options,
         STARPU_W,        RTBLKADDR(B, double, Bm, Bn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlange",
 #endif
@@ -115,8 +113,6 @@ void INSERT_TASK_zlange_max(const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zlange_max;
     void (*callback)(void*) = options->profiling ? cl_zlange_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(  A, Am, An );
@@ -129,7 +125,7 @@ void INSERT_TASK_zlange_max(const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(B, double, Bm, Bn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-         STARPU_EXECUTE_ON_WORKER, workerid,
+         STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlange_max",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlanhe.c b/runtime/starpu/codelets/codelet_zlanhe.c
index 3743aa6ab..1f9203fb1 100644
--- a/runtime/starpu/codelets/codelet_zlanhe.c
+++ b/runtime/starpu/codelets/codelet_zlanhe.c
@@ -58,8 +58,6 @@ void INSERT_TASK_zlanhe(const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zlanhe;
     void (*callback)(void*) = options->profiling ? cl_zlange_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -76,7 +74,7 @@ void INSERT_TASK_zlanhe(const RUNTIME_option_t *options,
         STARPU_W,        RTBLKADDR(B, double, Bm, Bn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlanhe",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlansy.c b/runtime/starpu/codelets/codelet_zlansy.c
index d11013d1b..5de3b8e93 100644
--- a/runtime/starpu/codelets/codelet_zlansy.c
+++ b/runtime/starpu/codelets/codelet_zlansy.c
@@ -59,8 +59,6 @@ void INSERT_TASK_zlansy( const RUNTIME_option_t *options,
     (void)NB;
     struct starpu_codelet *codelet = &cl_zlansy;
     void (*callback)(void*) = options->profiling ? cl_zlange_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -77,7 +75,7 @@ void INSERT_TASK_zlansy( const RUNTIME_option_t *options,
         STARPU_W,        RTBLKADDR(B, double, Bm, Bn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlansy",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlantr.c b/runtime/starpu/codelets/codelet_zlantr.c
index 6b37410dd..237e5da16 100644
--- a/runtime/starpu/codelets/codelet_zlantr.c
+++ b/runtime/starpu/codelets/codelet_zlantr.c
@@ -58,8 +58,6 @@ void INSERT_TASK_zlantr( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zlantr;
     void (*callback)(void*) = options->profiling ? cl_zlange_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -78,7 +76,7 @@ void INSERT_TASK_zlantr( const RUNTIME_option_t *options,
         STARPU_W,        RTBLKADDR(B, double, Bm, Bn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlantr",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlascal.c b/runtime/starpu/codelets/codelet_zlascal.c
index a8fc1435d..26fb42fa8 100644
--- a/runtime/starpu/codelets/codelet_zlascal.c
+++ b/runtime/starpu/codelets/codelet_zlascal.c
@@ -66,9 +66,6 @@ void INSERT_TASK_zlascal( const RUNTIME_option_t *options,
 
     struct cl_zlascal_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zlascal";
 
@@ -90,9 +87,6 @@ void INSERT_TASK_zlascal( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zlascal_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Insert the task */
     rt_starpu_insert_task(
         &cl_zlascal,
@@ -103,7 +97,7 @@ void INSERT_TASK_zlascal( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlaset.c b/runtime/starpu/codelets/codelet_zlaset.c
index 17861bb5b..51eb352af 100644
--- a/runtime/starpu/codelets/codelet_zlaset.c
+++ b/runtime/starpu/codelets/codelet_zlaset.c
@@ -60,9 +60,6 @@ void INSERT_TASK_zlaset( const RUNTIME_option_t *options,
 {
     struct cl_zlaset_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zlaset";
 
@@ -85,9 +82,6 @@ void INSERT_TASK_zlaset( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zlaset_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Insert the task */
     rt_starpu_insert_task(
         &cl_zlaset,
@@ -98,7 +92,7 @@ void INSERT_TASK_zlaset( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlaset2.c b/runtime/starpu/codelets/codelet_zlaset2.c
index d826e2be4..6d6eeb6be 100644
--- a/runtime/starpu/codelets/codelet_zlaset2.c
+++ b/runtime/starpu/codelets/codelet_zlaset2.c
@@ -55,8 +55,6 @@ void INSERT_TASK_zlaset2(const RUNTIME_option_t *options,
 
     struct starpu_codelet *codelet = &cl_zlaset2;
     void (*callback)(void*) = options->profiling ? cl_zlaset2_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_W(A, Am, An);
@@ -71,7 +69,7 @@ void INSERT_TASK_zlaset2(const RUNTIME_option_t *options,
         STARPU_W,      RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlaset2",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlatro.c b/runtime/starpu/codelets/codelet_zlatro.c
index fedce51d8..7d81ae476 100644
--- a/runtime/starpu/codelets/codelet_zlatro.c
+++ b/runtime/starpu/codelets/codelet_zlatro.c
@@ -65,8 +65,6 @@ void INSERT_TASK_zlatro( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zlatro;
     void (*callback)(void*) = NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -83,7 +81,7 @@ void INSERT_TASK_zlatro( const RUNTIME_option_t *options,
         STARPU_W,        RTBLKADDR(B, CHAMELEON_Complex64_t, Bm, Bn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zlatro",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zlauum.c b/runtime/starpu/codelets/codelet_zlauum.c
index c36570882..db4ab89ab 100644
--- a/runtime/starpu/codelets/codelet_zlauum.c
+++ b/runtime/starpu/codelets/codelet_zlauum.c
@@ -57,9 +57,6 @@ void INSERT_TASK_zlauum( const RUNTIME_option_t *options,
 {
     struct cl_zlauum_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zlauum";
 
@@ -79,9 +76,6 @@ void INSERT_TASK_zlauum( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zlauum_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
         char *cl_fullname;
@@ -100,7 +94,7 @@ void INSERT_TASK_zlauum( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zplghe.c b/runtime/starpu/codelets/codelet_zplghe.c
index ce5b9c756..b14c32003 100644
--- a/runtime/starpu/codelets/codelet_zplghe.c
+++ b/runtime/starpu/codelets/codelet_zplghe.c
@@ -62,9 +62,6 @@ void INSERT_TASK_zplghe( const RUNTIME_option_t *options,
 {
     struct cl_zplghe_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zplghe";
 
@@ -89,9 +86,6 @@ void INSERT_TASK_zplghe( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zplghe_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Insert the task */
     rt_starpu_insert_task(
         &cl_zplghe,
@@ -102,7 +96,7 @@ void INSERT_TASK_zplghe( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zplgsy.c b/runtime/starpu/codelets/codelet_zplgsy.c
index 4f9a5280e..12f949713 100644
--- a/runtime/starpu/codelets/codelet_zplgsy.c
+++ b/runtime/starpu/codelets/codelet_zplgsy.c
@@ -62,9 +62,6 @@ void INSERT_TASK_zplgsy( const RUNTIME_option_t *options,
 {
     struct cl_zplgsy_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zplgsy";
 
@@ -89,9 +86,6 @@ void INSERT_TASK_zplgsy( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zplgsy_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Insert the task */
     rt_starpu_insert_task(
         &cl_zplgsy,
@@ -102,7 +96,7 @@ void INSERT_TASK_zplgsy( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zplrnt.c b/runtime/starpu/codelets/codelet_zplrnt.c
index 00b2fa3e0..588e25a57 100644
--- a/runtime/starpu/codelets/codelet_zplrnt.c
+++ b/runtime/starpu/codelets/codelet_zplrnt.c
@@ -62,9 +62,6 @@ void INSERT_TASK_zplrnt( const RUNTIME_option_t *options,
 {
     struct cl_zplrnt_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zplrnt";
 
@@ -88,9 +85,6 @@ void INSERT_TASK_zplrnt( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zplrnt_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Insert the task */
     rt_starpu_insert_task(
         &cl_zplrnt,
@@ -101,7 +95,7 @@ void INSERT_TASK_zplrnt( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zplssq.c b/runtime/starpu/codelets/codelet_zplssq.c
index ae03dea79..1f5af5516 100644
--- a/runtime/starpu/codelets/codelet_zplssq.c
+++ b/runtime/starpu/codelets/codelet_zplssq.c
@@ -58,8 +58,6 @@ void INSERT_TASK_zplssq( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zplssq;
     void (*callback)(void*) = options->profiling ? cl_zplssq_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(  IN,  INm,  INn  );
@@ -75,7 +73,7 @@ void INSERT_TASK_zplssq( const RUNTIME_option_t *options,
         STARPU_RW, RTBLKADDR( OUT, double, OUTm, OUTn ),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zplssq",
 #endif
@@ -109,8 +107,6 @@ void INSERT_TASK_zplssq2( const RUNTIME_option_t *options, int N,
 {
     struct starpu_codelet *codelet = &cl_zplssq2;
     void (*callback)(void*) = options->profiling ? cl_zplssq2_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW( RESULT, RESULTm, RESULTn );
@@ -122,7 +118,7 @@ void INSERT_TASK_zplssq2( const RUNTIME_option_t *options, int N,
         STARPU_RW, RTBLKADDR(RESULT, double, RESULTm, RESULTn),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zplssq2",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zpotrf.c b/runtime/starpu/codelets/codelet_zpotrf.c
index d755b9e77..24d2fd7e2 100644
--- a/runtime/starpu/codelets/codelet_zpotrf.c
+++ b/runtime/starpu/codelets/codelet_zpotrf.c
@@ -70,9 +70,6 @@ void INSERT_TASK_zpotrf( const RUNTIME_option_t *options,
 {
     struct cl_zpotrf_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "zpotrf";
 
@@ -95,9 +92,6 @@ void INSERT_TASK_zpotrf( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zpotrf_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
         char *cl_fullname;
@@ -116,7 +110,7 @@ void INSERT_TASK_zpotrf( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zssssm.c b/runtime/starpu/codelets/codelet_zssssm.c
index 2d6c94891..969073034 100644
--- a/runtime/starpu/codelets/codelet_zssssm.c
+++ b/runtime/starpu/codelets/codelet_zssssm.c
@@ -69,8 +69,6 @@ void INSERT_TASK_zssssm( const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zssssm;
     void (*callback)(void*) = options->profiling ? cl_zssssm_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A1, A1m, A1n);
@@ -94,7 +92,7 @@ void INSERT_TASK_zssssm( const RUNTIME_option_t *options,
         STARPU_VALUE,          &IPIV,                      sizeof(int*),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zssssm",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zsymm.c b/runtime/starpu/codelets/codelet_zsymm.c
index f712b7b10..e03e56be3 100644
--- a/runtime/starpu/codelets/codelet_zsymm.c
+++ b/runtime/starpu/codelets/codelet_zsymm.c
@@ -114,8 +114,6 @@ void INSERT_TASK_zsymm(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zsymm;
     void (*callback)(void*) = options->profiling ? cl_zsymm_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -137,7 +135,7 @@ void INSERT_TASK_zsymm(const RUNTIME_option_t *options,
         accessC,                RTBLKADDR(C, CHAMELEON_Complex64_t, Cm, Cn),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zsymm",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zsyr2k.c b/runtime/starpu/codelets/codelet_zsyr2k.c
index d5861ed4d..5a5c54787 100644
--- a/runtime/starpu/codelets/codelet_zsyr2k.c
+++ b/runtime/starpu/codelets/codelet_zsyr2k.c
@@ -110,8 +110,6 @@ void INSERT_TASK_zsyr2k(const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zsyr2k;
     void (*callback)(void*) = options->profiling ? cl_zsyr2k_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -133,7 +131,7 @@ void INSERT_TASK_zsyr2k(const RUNTIME_option_t *options,
         accessC,                  RTBLKADDR(C, CHAMELEON_Complex64_t, Cm, Cn),
         STARPU_PRIORITY,    options->priority,
         STARPU_CALLBACK,    callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zsyr2k",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zsyrk.c b/runtime/starpu/codelets/codelet_zsyrk.c
index acf0ae854..ee6f6aa53 100644
--- a/runtime/starpu/codelets/codelet_zsyrk.c
+++ b/runtime/starpu/codelets/codelet_zsyrk.c
@@ -101,9 +101,7 @@ void INSERT_TASK_zsyrk( const RUNTIME_option_t *options,
 
     struct cl_zsyrk_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid, accessC;
+    int                      accessC;
     int                      exec = 0;
     char                    *cl_name = "zsyrk";
 
@@ -129,9 +127,6 @@ void INSERT_TASK_zsyrk( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_zsyrk_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Reduce the C access if needed */
     accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
@@ -154,7 +149,7 @@ void INSERT_TASK_zsyrk( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_zsyssq.c b/runtime/starpu/codelets/codelet_zsyssq.c
index 8261a35d6..5a0836d0e 100644
--- a/runtime/starpu/codelets/codelet_zsyssq.c
+++ b/runtime/starpu/codelets/codelet_zsyssq.c
@@ -52,8 +52,6 @@ void INSERT_TASK_zsyssq( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zsyssq;
     void (*callback)(void*) = options->profiling ? cl_zgessq_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -69,7 +67,7 @@ void INSERT_TASK_zsyssq( const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zsyssq",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zsytrf_nopiv.c b/runtime/starpu/codelets/codelet_zsytrf_nopiv.c
index 422cb39a3..340d37ada 100644
--- a/runtime/starpu/codelets/codelet_zsytrf_nopiv.c
+++ b/runtime/starpu/codelets/codelet_zsytrf_nopiv.c
@@ -55,8 +55,6 @@ void INSERT_TASK_zsytrf_nopiv( const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_zsytrf_nopiv;
     void (*callback)(void*) = options->profiling ? cl_zsytrf_nopiv_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
@@ -71,7 +69,7 @@ void INSERT_TASK_zsytrf_nopiv( const RUNTIME_option_t *options,
         /* STARPU_SCRATCH,   options->ws_worker, */
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zsytrf_nopiv",
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztplqt.c b/runtime/starpu/codelets/codelet_ztplqt.c
index 99cc57589..90ef69afc 100644
--- a/runtime/starpu/codelets/codelet_ztplqt.c
+++ b/runtime/starpu/codelets/codelet_ztplqt.c
@@ -59,8 +59,6 @@ void INSERT_TASK_ztplqt( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztplqt;
     void (*callback)(void*) = options->profiling ? cl_ztplqt_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
@@ -81,7 +79,7 @@ void INSERT_TASK_ztplqt( const RUNTIME_option_t *options,
         STARPU_SCRATCH,   options->ws_worker,
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_USE_MPI)
         STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztpmlqt.c b/runtime/starpu/codelets/codelet_ztpmlqt.c
index 62ec9d335..076144bc9 100644
--- a/runtime/starpu/codelets/codelet_ztpmlqt.c
+++ b/runtime/starpu/codelets/codelet_ztpmlqt.c
@@ -105,8 +105,6 @@ void INSERT_TASK_ztpmlqt( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztpmlqt;
     void (*callback)(void*) = options->profiling ? cl_ztpmlqt_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(V, Vm, Vn);
@@ -133,7 +131,7 @@ void INSERT_TASK_ztpmlqt( const RUNTIME_option_t *options,
         STARPU_SCRATCH,   options->ws_worker,
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_USE_MPI)
         STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztpmqrt.c b/runtime/starpu/codelets/codelet_ztpmqrt.c
index e234616c6..66461e6c4 100644
--- a/runtime/starpu/codelets/codelet_ztpmqrt.c
+++ b/runtime/starpu/codelets/codelet_ztpmqrt.c
@@ -105,8 +105,6 @@ void INSERT_TASK_ztpmqrt( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztpmqrt;
     void (*callback)(void*) = options->profiling ? cl_ztpmqrt_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(V, Vm, Vn);
@@ -133,7 +131,7 @@ void INSERT_TASK_ztpmqrt( const RUNTIME_option_t *options,
         STARPU_SCRATCH,   options->ws_worker,
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_USE_MPI)
         STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztpqrt.c b/runtime/starpu/codelets/codelet_ztpqrt.c
index fb6b5cd20..aab476553 100644
--- a/runtime/starpu/codelets/codelet_ztpqrt.c
+++ b/runtime/starpu/codelets/codelet_ztpqrt.c
@@ -60,8 +60,6 @@ void INSERT_TASK_ztpqrt( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztpqrt;
     void (*callback)(void*) = options->profiling ? cl_ztpqrt_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
@@ -82,7 +80,7 @@ void INSERT_TASK_ztpqrt( const RUNTIME_option_t *options,
         STARPU_SCRATCH,   options->ws_worker,
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_USE_MPI)
         STARPU_EXECUTE_ON_NODE, B->get_rankof(B, Bm, Bn),
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztradd.c b/runtime/starpu/codelets/codelet_ztradd.c
index b0aaed724..f3c0493a2 100644
--- a/runtime/starpu/codelets/codelet_ztradd.c
+++ b/runtime/starpu/codelets/codelet_ztradd.c
@@ -67,9 +67,7 @@ void INSERT_TASK_ztradd( const RUNTIME_option_t *options,
 
     struct cl_ztradd_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid, accessB;
+    int                      accessB;
     int                      exec = 0;
     char                    *cl_name = "ztradd";
 
@@ -95,9 +93,6 @@ void INSERT_TASK_ztradd( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_ztradd_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
     /* Reduce the B access if needed */
     accessB = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
@@ -112,7 +107,7 @@ void INSERT_TASK_ztradd( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztrasm.c b/runtime/starpu/codelets/codelet_ztrasm.c
index 5fcb0b9bb..8a84b7d4b 100644
--- a/runtime/starpu/codelets/codelet_ztrasm.c
+++ b/runtime/starpu/codelets/codelet_ztrasm.c
@@ -55,8 +55,6 @@ void INSERT_TASK_ztrasm( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztrasm;
     void (*callback)(void*) = options->profiling ? cl_ztrasm_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -74,7 +72,7 @@ void INSERT_TASK_ztrasm( const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(B, double, Bm, Bn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "ztrasm",
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztrmm.c b/runtime/starpu/codelets/codelet_ztrmm.c
index 73da968e1..1c6a2901c 100644
--- a/runtime/starpu/codelets/codelet_ztrmm.c
+++ b/runtime/starpu/codelets/codelet_ztrmm.c
@@ -96,9 +96,6 @@ void INSERT_TASK_ztrmm( const RUNTIME_option_t *options,
 {
     struct cl_ztrmm_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "ztrmm";
 
@@ -125,9 +122,6 @@ void INSERT_TASK_ztrmm( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_ztrmm_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
         char *cl_fullname;
@@ -147,7 +141,7 @@ void INSERT_TASK_ztrmm( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztrsm.c b/runtime/starpu/codelets/codelet_ztrsm.c
index 01a957453..423e95fc9 100644
--- a/runtime/starpu/codelets/codelet_ztrsm.c
+++ b/runtime/starpu/codelets/codelet_ztrsm.c
@@ -97,9 +97,6 @@ void INSERT_TASK_ztrsm( const RUNTIME_option_t *options,
 {
     struct cl_ztrsm_args_s  *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "ztrsm";
 
@@ -126,9 +123,6 @@ void INSERT_TASK_ztrsm( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_ztrsm_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
         char *cl_fullname;
@@ -148,7 +142,7 @@ void INSERT_TASK_ztrsm( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztrssq.c b/runtime/starpu/codelets/codelet_ztrssq.c
index 4c6118f8c..5476bc998 100644
--- a/runtime/starpu/codelets/codelet_ztrssq.c
+++ b/runtime/starpu/codelets/codelet_ztrssq.c
@@ -54,8 +54,6 @@ void INSERT_TASK_ztrssq( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztrssq;
     void (*callback)(void*) = options->profiling ? cl_ztrasm_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -72,7 +70,7 @@ void INSERT_TASK_ztrssq( const RUNTIME_option_t *options,
         STARPU_RW,       RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn),
         STARPU_PRIORITY, options->priority,
         STARPU_CALLBACK, callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "ztrssq",
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztrtri.c b/runtime/starpu/codelets/codelet_ztrtri.c
index 3f09383b8..22b53d92b 100644
--- a/runtime/starpu/codelets/codelet_ztrtri.c
+++ b/runtime/starpu/codelets/codelet_ztrtri.c
@@ -67,9 +67,6 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options,
 {
     struct cl_ztrtri_args_s *clargs = NULL;
     void (*callback)(void*);
-    RUNTIME_request_t       *request  = options->request;
-    starpu_option_request_t *schedopt = (starpu_option_request_t *)(request->schedopt);
-    int                      workerid;
     int                      exec = 0;
     char                    *cl_name = "ztrtri";
 
@@ -93,9 +90,6 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options,
     /* Callback fro profiling information */
     callback = options->profiling ? cl_ztrtri_callback : NULL;
 
-    /* Fix the worker id */
-    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
-
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
         char *cl_fullname;
@@ -114,7 +108,7 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options,
         /* Common task arguments */
         STARPU_PRIORITY,          options->priority,
         STARPU_CALLBACK,          callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME,              cl_name,
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c b/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c
index 74a8f970b..a12c11830 100644
--- a/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c
+++ b/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c
@@ -75,8 +75,6 @@ void INSERT_TASK_ztsmlq_hetra1( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztsmlq_hetra1;
     void (*callback)(void*) = options->profiling ? cl_ztsmlq_hetra1_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     int ldWORK = side == ChamLeft ? ib : nb;
 
@@ -105,7 +103,7 @@ void INSERT_TASK_ztsmlq_hetra1( const RUNTIME_option_t *options,
         STARPU_SCRATCH,   options->ws_worker,
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "ztsmlq_hetra1",
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c b/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c
index 7971b3ffb..b70d4e128 100644
--- a/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c
+++ b/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c
@@ -75,8 +75,6 @@ void INSERT_TASK_ztsmqr_hetra1( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_ztsmqr_hetra1;
     void (*callback)(void*) = options->profiling ? cl_ztsmqr_hetra1_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     int ldWORK = side == ChamLeft ? ib : nb;
 
@@ -105,7 +103,7 @@ void INSERT_TASK_ztsmqr_hetra1( const RUNTIME_option_t *options,
         STARPU_SCRATCH,   options->ws_worker,
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "ztsmqr_hetra1",
 #endif
diff --git a/runtime/starpu/codelets/codelet_ztstrf.c b/runtime/starpu/codelets/codelet_ztstrf.c
index 51f357a43..bd6d49629 100644
--- a/runtime/starpu/codelets/codelet_ztstrf.c
+++ b/runtime/starpu/codelets/codelet_ztstrf.c
@@ -82,8 +82,6 @@ void INSERT_TASK_ztstrf( const RUNTIME_option_t *options,
     (void)nb;
     struct starpu_codelet *codelet = &cl_ztstrf;
     void (*callback)(void*) = options->profiling ? cl_ztstrf_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     CHAMELEON_starpu_ws_t *d_work = (CHAMELEON_starpu_ws_t*)(options->ws_host);
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
@@ -111,7 +109,7 @@ void INSERT_TASK_ztstrf( const RUNTIME_option_t *options,
         STARPU_VALUE,    &(options->request),        sizeof(RUNTIME_request_t*),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "ztstrf",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zunmlq.c b/runtime/starpu/codelets/codelet_zunmlq.c
index 2e8b861e5..e0d55765a 100644
--- a/runtime/starpu/codelets/codelet_zunmlq.c
+++ b/runtime/starpu/codelets/codelet_zunmlq.c
@@ -108,8 +108,6 @@ void INSERT_TASK_zunmlq( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zunmlq;
     void (*callback)(void*) = options->profiling ? cl_zunmlq_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -133,7 +131,7 @@ void INSERT_TASK_zunmlq( const RUNTIME_option_t *options,
         STARPU_VALUE,    &nb,                sizeof(int),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zunmlq",
 #endif
diff --git a/runtime/starpu/codelets/codelet_zunmqr.c b/runtime/starpu/codelets/codelet_zunmqr.c
index 8b57dc09c..58cad3e8a 100644
--- a/runtime/starpu/codelets/codelet_zunmqr.c
+++ b/runtime/starpu/codelets/codelet_zunmqr.c
@@ -107,8 +107,6 @@ void INSERT_TASK_zunmqr( const RUNTIME_option_t *options,
 {
     struct starpu_codelet *codelet = &cl_zunmqr;
     void (*callback)(void*) = options->profiling ? cl_zunmqr_callback : NULL;
-    starpu_option_request_t* schedopt = (starpu_option_request_t *)(options->request->schedopt);
-    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -132,7 +130,7 @@ void INSERT_TASK_zunmqr( const RUNTIME_option_t *options,
         STARPU_VALUE,    &nb,                sizeof(int),
         STARPU_PRIORITY,  options->priority,
         STARPU_CALLBACK,  callback,
-        STARPU_EXECUTE_ON_WORKER, workerid,
+        STARPU_EXECUTE_ON_WORKER, options->workerid,
 #if defined(CHAMELEON_CODELETS_HAVE_NAME)
         STARPU_NAME, "zunmqr",
 #endif
-- 
GitLab