diff --git a/runtime/starpu/codelets/codelet_dlag2z.c b/runtime/starpu/codelets/codelet_dlag2z.c
index 6d53318ae34ea56cc14e509865d8f76c695c69dc..50bb0945275e91b7542f58947d182e5979b41d68 100644
--- a/runtime/starpu/codelets/codelet_dlag2z.c
+++ b/runtime/starpu/codelets/codelet_dlag2z.c
@@ -55,7 +55,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_dzasum.c b/runtime/starpu/codelets/codelet_dzasum.c
index 3bf8d3d877632dc3cc237787b4f3513d5476ba5b..1ffee91e4c2b0cb17db846fb57b42837d60b79f9 100644
--- a/runtime/starpu/codelets/codelet_dzasum.c
+++ b/runtime/starpu/codelets/codelet_dzasum.c
@@ -56,7 +56,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_map.c b/runtime/starpu/codelets/codelet_map.c
index 55c2876801ec8ae8ff69cb40e5f5746cacfd2050..0421c1c86888a1f5cf70f8d6efeff0427a5f0de7 100644
--- a/runtime/starpu/codelets/codelet_map.c
+++ b/runtime/starpu/codelets/codelet_map.c
@@ -50,7 +50,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zaxpy.c b/runtime/starpu/codelets/codelet_zaxpy.c
index b57eda1dad716ffe8531a1d3e8ab62184912538a..7c15ae30750525dbb723a7c97fa8a5a961cca965 100644
--- a/runtime/starpu/codelets/codelet_zaxpy.c
+++ b/runtime/starpu/codelets/codelet_zaxpy.c
@@ -52,7 +52,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     if ( alpha == 0. ) {
         return;
diff --git a/runtime/starpu/codelets/codelet_zbuild.c b/runtime/starpu/codelets/codelet_zbuild.c
index 305e6019dc55a90b48879d7e8f46820e9f6f6548..592cbf7e56811b791d50f49651125be561cad523 100644
--- a/runtime/starpu/codelets/codelet_zbuild.c
+++ b/runtime/starpu/codelets/codelet_zbuild.c
@@ -64,7 +64,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int row_min, row_max, col_min, col_max;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zcesca.c b/runtime/starpu/codelets/codelet_zcesca.c
index 1cf87fe7e330d4f636c648cb4a7886378e93a714..ae7345323c357fe5fec622264eb1822141cd1206 100644
--- a/runtime/starpu/codelets/codelet_zcesca.c
+++ b/runtime/starpu/codelets/codelet_zcesca.c
@@ -71,7 +71,7 @@ void INSERT_TASK_zcesca( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int exec = 0;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zgeadd.c b/runtime/starpu/codelets/codelet_zgeadd.c
index 30f4d519eb8989f31782d17b1a2eb10ecf01104d..94f197d96e817e681605dfec1d19a1a70a07b53f 100644
--- a/runtime/starpu/codelets/codelet_zgeadd.c
+++ b/runtime/starpu/codelets/codelet_zgeadd.c
@@ -99,7 +99,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessB = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zgelqt.c b/runtime/starpu/codelets/codelet_zgelqt.c
index 86ad28b6f3319815244b0ae880d407c1c47ff420..07d5134b78eb21d7d7ea780b1f7d64b031169bdf 100644
--- a/runtime/starpu/codelets/codelet_zgelqt.c
+++ b/runtime/starpu/codelets/codelet_zgelqt.c
@@ -69,7 +69,7 @@ void INSERT_TASK_zgelqt(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    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;
diff --git a/runtime/starpu/codelets/codelet_zgemm.c b/runtime/starpu/codelets/codelet_zgemm.c
index cac587414bc35f51eaa6142f57e07e12195b307d..99b3b6d4ac2ef8a84700c970afc00b2b743d6487 100644
--- a/runtime/starpu/codelets/codelet_zgemm.c
+++ b/runtime/starpu/codelets/codelet_zgemm.c
@@ -148,7 +148,7 @@ void INSERT_TASK_zgemm( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zgemm_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Reduce the C access if needed */
     accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
diff --git a/runtime/starpu/codelets/codelet_zgemv.c b/runtime/starpu/codelets/codelet_zgemv.c
index d2220865f2c45d0c0fdd7f86e6a9d8b94fbe3143..8c85f66bbbd99c93b678bf6ed2bde9ee65881092 100644
--- a/runtime/starpu/codelets/codelet_zgemv.c
+++ b/runtime/starpu/codelets/codelet_zgemv.c
@@ -102,7 +102,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessY = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zgeqrt.c b/runtime/starpu/codelets/codelet_zgeqrt.c
index 4f7034bc3cfe065bc36ad1f9cbb95650218d40b4..8396f970e5e0cf1a0909b3ba5dd0b9b122e43694 100644
--- a/runtime/starpu/codelets/codelet_zgeqrt.c
+++ b/runtime/starpu/codelets/codelet_zgeqrt.c
@@ -70,7 +70,7 @@ void INSERT_TASK_zgeqrt(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    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;
diff --git a/runtime/starpu/codelets/codelet_zgessm.c b/runtime/starpu/codelets/codelet_zgessm.c
index 5dad32c9afae12291dbc1729cd3527264d86cac8..490db96343645829f6a6043ba6211909165e5df2 100644
--- a/runtime/starpu/codelets/codelet_zgessm.c
+++ b/runtime/starpu/codelets/codelet_zgessm.c
@@ -64,7 +64,7 @@ void INSERT_TASK_zgessm( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(L, Lm, Ln);
diff --git a/runtime/starpu/codelets/codelet_zgessq.c b/runtime/starpu/codelets/codelet_zgessq.c
index 08d43b41b7a5648f232df6334b59bbc608810d35..dedbe5daa4243faad1f879f7875898c73a0a3b6f 100644
--- a/runtime/starpu/codelets/codelet_zgessq.c
+++ b/runtime/starpu/codelets/codelet_zgessq.c
@@ -55,7 +55,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zgesum.c b/runtime/starpu/codelets/codelet_zgesum.c
index c851c4ef555bc1ee792a712bfaa028795df4252c..3f04e3a7d1eae6954e82441aa3152de8c8397928 100644
--- a/runtime/starpu/codelets/codelet_zgesum.c
+++ b/runtime/starpu/codelets/codelet_zgesum.c
@@ -52,7 +52,7 @@ void INSERT_TASK_zgesum( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int exec = 0;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zgetrf.c b/runtime/starpu/codelets/codelet_zgetrf.c
index 04c8d8a8edd9679db5e3131a809118ff91ff480f..483542808c0206a14243525051684c9bcb7f27d3 100644
--- a/runtime/starpu/codelets/codelet_zgetrf.c
+++ b/runtime/starpu/codelets/codelet_zgetrf.c
@@ -66,7 +66,7 @@ void INSERT_TASK_zgetrf( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zgetrf_incpiv.c b/runtime/starpu/codelets/codelet_zgetrf_incpiv.c
index 9983f5ba3aac1831376f044317ca7137dd3630ee..feab43fd7d0f95b2cd8d17296757984809f71905 100644
--- a/runtime/starpu/codelets/codelet_zgetrf_incpiv.c
+++ b/runtime/starpu/codelets/codelet_zgetrf_incpiv.c
@@ -71,7 +71,7 @@ void INSERT_TASK_zgetrf_incpiv(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_starpu_ws_t *h_work = (CHAMELEON_starpu_ws_t*)(options->ws_host);
 
diff --git a/runtime/starpu/codelets/codelet_zgetrf_nopiv.c b/runtime/starpu/codelets/codelet_zgetrf_nopiv.c
index 74a60c356e9098da9e24063ea2101db1239ab792..e64963859370572394a7f4622914bfe9cbdc09fe 100644
--- a/runtime/starpu/codelets/codelet_zgetrf_nopiv.c
+++ b/runtime/starpu/codelets/codelet_zgetrf_nopiv.c
@@ -66,7 +66,7 @@ void INSERT_TASK_zgetrf_nopiv(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zgram.c b/runtime/starpu/codelets/codelet_zgram.c
index 55f36194c3282db8b8ac7f3cfeb94ec3d45e8225..6afa0186ce514945f2411191a481cafd1175e5b7 100644
--- a/runtime/starpu/codelets/codelet_zgram.c
+++ b/runtime/starpu/codelets/codelet_zgram.c
@@ -56,7 +56,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(Di, Dim, Din);
diff --git a/runtime/starpu/codelets/codelet_zhe2ge.c b/runtime/starpu/codelets/codelet_zhe2ge.c
index 9c918d9ef5c2b37de710f2e766cf448de8bbfe99..a861161d6add27d3410ef71ca728300837b65371 100644
--- a/runtime/starpu/codelets/codelet_zhe2ge.c
+++ b/runtime/starpu/codelets/codelet_zhe2ge.c
@@ -55,7 +55,7 @@ void INSERT_TASK_zhe2ge( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zhemm.c b/runtime/starpu/codelets/codelet_zhemm.c
index 779bb98237f73ce43aaa77b6aed51206a3ad6f5e..f772530cef1239862a221bcd3d7e3a022888c4e0 100644
--- a/runtime/starpu/codelets/codelet_zhemm.c
+++ b/runtime/starpu/codelets/codelet_zhemm.c
@@ -115,7 +115,7 @@ void INSERT_TASK_zhemm(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zher2k.c b/runtime/starpu/codelets/codelet_zher2k.c
index a69868e1df802da2b3fa195b0647852107c908c5..9654ff80e2adbdb96b5bc552454c9cd93dd4b5ad 100644
--- a/runtime/starpu/codelets/codelet_zher2k.c
+++ b/runtime/starpu/codelets/codelet_zher2k.c
@@ -112,7 +112,7 @@ INSERT_TASK_zher2k( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zherfb.c b/runtime/starpu/codelets/codelet_zherfb.c
index 9f62c783c85412edd3dfa20a581c3841ffcbe7b5..391719c02479b4b5f4b7d8aa0dba340b3ee91fe6 100644
--- a/runtime/starpu/codelets/codelet_zherfb.c
+++ b/runtime/starpu/codelets/codelet_zherfb.c
@@ -97,7 +97,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zherk.c b/runtime/starpu/codelets/codelet_zherk.c
index c4b6eedd83e4004783b2f5f00c630aa53707918d..129ce0c5e8c383a848913694f3886d6e617392b7 100644
--- a/runtime/starpu/codelets/codelet_zherk.c
+++ b/runtime/starpu/codelets/codelet_zherk.c
@@ -130,7 +130,7 @@ void INSERT_TASK_zherk( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zherk_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Reduce the C access if needed */
     accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
diff --git a/runtime/starpu/codelets/codelet_zlacpy.c b/runtime/starpu/codelets/codelet_zlacpy.c
index b169055095f5d54d5f825921306f28150b4df275..883fcb2b3dd58b65f84ce98ccd0ba2d7b9676237 100644
--- a/runtime/starpu/codelets/codelet_zlacpy.c
+++ b/runtime/starpu/codelets/codelet_zlacpy.c
@@ -97,7 +97,7 @@ void INSERT_TASK_zlacpyx( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zlacpy_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Insert the task */
     rt_starpu_insert_task(
diff --git a/runtime/starpu/codelets/codelet_zlag2c.c b/runtime/starpu/codelets/codelet_zlag2c.c
index 27358b138066d2344ecedd839fd9239f86fb706f..2814f30f7ec7afba41193fee0e0828ff5c34bd41 100644
--- a/runtime/starpu/codelets/codelet_zlag2c.c
+++ b/runtime/starpu/codelets/codelet_zlag2c.c
@@ -62,7 +62,7 @@ void INSERT_TASK_zlag2c(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -114,7 +114,7 @@ void INSERT_TASK_clag2z(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R( A, Am, An );
diff --git a/runtime/starpu/codelets/codelet_zlange.c b/runtime/starpu/codelets/codelet_zlange.c
index cc2608b479b44e5811ec43bb5c7363dc288fd817..3873cfc289f03a03f090281c61d9855ec227b1d0 100644
--- a/runtime/starpu/codelets/codelet_zlange.c
+++ b/runtime/starpu/codelets/codelet_zlange.c
@@ -60,7 +60,7 @@ void INSERT_TASK_zlange( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
@@ -116,7 +116,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(  A, Am, An );
diff --git a/runtime/starpu/codelets/codelet_zlanhe.c b/runtime/starpu/codelets/codelet_zlanhe.c
index 28820e6d22da6bb8f6f6dea2c8da9ce7100f79ce..3743aa6abd25165599883219d516124994980751 100644
--- a/runtime/starpu/codelets/codelet_zlanhe.c
+++ b/runtime/starpu/codelets/codelet_zlanhe.c
@@ -59,7 +59,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zlansy.c b/runtime/starpu/codelets/codelet_zlansy.c
index f5a40708c0a92a0c5da3f8ecdad54b5f3ca26460..d11013d1b70780f82af2035bc0f88f667954140e 100644
--- a/runtime/starpu/codelets/codelet_zlansy.c
+++ b/runtime/starpu/codelets/codelet_zlansy.c
@@ -60,7 +60,7 @@ void INSERT_TASK_zlansy( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zlantr.c b/runtime/starpu/codelets/codelet_zlantr.c
index b45ca0d1203e7782bef13b2b2bb2edbe5ac974df..6b37410dd0b1474af734823e40149bf8967cc3f2 100644
--- a/runtime/starpu/codelets/codelet_zlantr.c
+++ b/runtime/starpu/codelets/codelet_zlantr.c
@@ -59,7 +59,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zlascal.c b/runtime/starpu/codelets/codelet_zlascal.c
index 0dcaa52d54a4033c6b41629f23e98421a5ed72a5..a8fc1435d0fe8e957d15d7ed56a5b4920d00d17b 100644
--- a/runtime/starpu/codelets/codelet_zlascal.c
+++ b/runtime/starpu/codelets/codelet_zlascal.c
@@ -91,7 +91,7 @@ void INSERT_TASK_zlascal( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zlascal_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Insert the task */
     rt_starpu_insert_task(
diff --git a/runtime/starpu/codelets/codelet_zlaset.c b/runtime/starpu/codelets/codelet_zlaset.c
index 95805c0142f2b966125bac51b9290bcf0f324bdf..17861bb5ba4ad95c8aaef07d071eba0cb4060937 100644
--- a/runtime/starpu/codelets/codelet_zlaset.c
+++ b/runtime/starpu/codelets/codelet_zlaset.c
@@ -86,7 +86,7 @@ void INSERT_TASK_zlaset( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zlaset_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Insert the task */
     rt_starpu_insert_task(
diff --git a/runtime/starpu/codelets/codelet_zlaset2.c b/runtime/starpu/codelets/codelet_zlaset2.c
index c80973145ddb83b7340575cbe078499f8ef47bb9..d826e2be4a56aeee9473fe6635dfc99c405b3bd4 100644
--- a/runtime/starpu/codelets/codelet_zlaset2.c
+++ b/runtime/starpu/codelets/codelet_zlaset2.c
@@ -56,7 +56,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_W(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zlatro.c b/runtime/starpu/codelets/codelet_zlatro.c
index 6ec3e055104fdd2a5c434032bbc8cbbd435be48b..fedce51d899b57e0d006dd3b2631aa1f45ca106c 100644
--- a/runtime/starpu/codelets/codelet_zlatro.c
+++ b/runtime/starpu/codelets/codelet_zlatro.c
@@ -66,7 +66,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zlauum.c b/runtime/starpu/codelets/codelet_zlauum.c
index 31f8012645c2065892434d153151db5f9a6642b8..c365708827d7a98546587c97394b778670a9259a 100644
--- a/runtime/starpu/codelets/codelet_zlauum.c
+++ b/runtime/starpu/codelets/codelet_zlauum.c
@@ -80,7 +80,7 @@ void INSERT_TASK_zlauum( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zlauum_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
diff --git a/runtime/starpu/codelets/codelet_zplghe.c b/runtime/starpu/codelets/codelet_zplghe.c
index 68bf93fc960e44beeed0468da28694d82562fce5..ce5b9c75648b7440f97690fe3def6fb441418b7e 100644
--- a/runtime/starpu/codelets/codelet_zplghe.c
+++ b/runtime/starpu/codelets/codelet_zplghe.c
@@ -90,7 +90,7 @@ void INSERT_TASK_zplghe( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zplghe_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Insert the task */
     rt_starpu_insert_task(
diff --git a/runtime/starpu/codelets/codelet_zplgsy.c b/runtime/starpu/codelets/codelet_zplgsy.c
index 2d342bac33f25e4e3e5ff60be624fe0d81b798c5..4f9a5280e795fbe330fb9f62445f330774eb4a5f 100644
--- a/runtime/starpu/codelets/codelet_zplgsy.c
+++ b/runtime/starpu/codelets/codelet_zplgsy.c
@@ -90,7 +90,7 @@ void INSERT_TASK_zplgsy( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zplgsy_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Insert the task */
     rt_starpu_insert_task(
diff --git a/runtime/starpu/codelets/codelet_zplrnt.c b/runtime/starpu/codelets/codelet_zplrnt.c
index 36191f43e2486467220f6ee4cda694cd857c1d4a..00b2fa3e0829e4a42f15c2da4eb1566ce9656631 100644
--- a/runtime/starpu/codelets/codelet_zplrnt.c
+++ b/runtime/starpu/codelets/codelet_zplrnt.c
@@ -89,7 +89,7 @@ void INSERT_TASK_zplrnt( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zplrnt_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Insert the task */
     rt_starpu_insert_task(
diff --git a/runtime/starpu/codelets/codelet_zplssq.c b/runtime/starpu/codelets/codelet_zplssq.c
index 187ceb3e66270737e4f281cb8d90c9d7d7b32f1c..ae03dea79c691b12df11dfc29575788b09cda78c 100644
--- a/runtime/starpu/codelets/codelet_zplssq.c
+++ b/runtime/starpu/codelets/codelet_zplssq.c
@@ -59,7 +59,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(  IN,  INm,  INn  );
@@ -110,7 +110,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW( RESULT, RESULTm, RESULTn );
diff --git a/runtime/starpu/codelets/codelet_zpotrf.c b/runtime/starpu/codelets/codelet_zpotrf.c
index b0f42d459e51bed0c96b41bdde85256a06ca229a..d755b9e778a82550140053e7acd9b288eebf4a65 100644
--- a/runtime/starpu/codelets/codelet_zpotrf.c
+++ b/runtime/starpu/codelets/codelet_zpotrf.c
@@ -96,7 +96,7 @@ void INSERT_TASK_zpotrf( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zpotrf_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
diff --git a/runtime/starpu/codelets/codelet_zssssm.c b/runtime/starpu/codelets/codelet_zssssm.c
index abad2f5af007c9ded4901b3306bc4912caea355c..2d6c94891c0e21736e9baddbee3bb6d505b1198f 100644
--- a/runtime/starpu/codelets/codelet_zssssm.c
+++ b/runtime/starpu/codelets/codelet_zssssm.c
@@ -70,7 +70,7 @@ void INSERT_TASK_zssssm( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A1, A1m, A1n);
diff --git a/runtime/starpu/codelets/codelet_zsymm.c b/runtime/starpu/codelets/codelet_zsymm.c
index 5391f0da8fc11944e35a5281297bc027ac90fb86..f712b7b1072ffa3ee1161d9227e79d9c1f4bc35d 100644
--- a/runtime/starpu/codelets/codelet_zsymm.c
+++ b/runtime/starpu/codelets/codelet_zsymm.c
@@ -115,7 +115,7 @@ void INSERT_TASK_zsymm(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zsyr2k.c b/runtime/starpu/codelets/codelet_zsyr2k.c
index f26bfd8f4ff0272f39567dbb6dbb5f56cd84ad34..d5861ed4db2a6b1072599614cbfdbcd9ed40bb5b 100644
--- a/runtime/starpu/codelets/codelet_zsyr2k.c
+++ b/runtime/starpu/codelets/codelet_zsyr2k.c
@@ -111,7 +111,7 @@ void INSERT_TASK_zsyr2k(const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
     int accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
diff --git a/runtime/starpu/codelets/codelet_zsyrk.c b/runtime/starpu/codelets/codelet_zsyrk.c
index 49a16f71bbfec0754d540caf48cdd0ed6540a866..acf0ae854f1967d7ef38b5c3fe1eeab40a1c7ca7 100644
--- a/runtime/starpu/codelets/codelet_zsyrk.c
+++ b/runtime/starpu/codelets/codelet_zsyrk.c
@@ -130,7 +130,7 @@ void INSERT_TASK_zsyrk( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_zsyrk_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Reduce the C access if needed */
     accessC = ( beta == 0. ) ? STARPU_W : STARPU_RW;
diff --git a/runtime/starpu/codelets/codelet_zsyssq.c b/runtime/starpu/codelets/codelet_zsyssq.c
index 0d1fe24bb325ca34001d22c3f78d1b0531cfc2e6..8261a35d653b02e1013e02fe8c13ecf9a1762422 100644
--- a/runtime/starpu/codelets/codelet_zsyssq.c
+++ b/runtime/starpu/codelets/codelet_zsyssq.c
@@ -53,7 +53,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zsytrf_nopiv.c b/runtime/starpu/codelets/codelet_zsytrf_nopiv.c
index c8f9eb4798cedef9c98d2d8512aca788e00878ce..422cb39a3369d31485e4b8afa6e6bb95f7e5e251 100644
--- a/runtime/starpu/codelets/codelet_zsytrf_nopiv.c
+++ b/runtime/starpu/codelets/codelet_zsytrf_nopiv.c
@@ -56,7 +56,7 @@ void INSERT_TASK_zsytrf_nopiv( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_ztplqt.c b/runtime/starpu/codelets/codelet_ztplqt.c
index 184857254fbc6efac264eb12addbfed80a08d53a..99cc57589ed1a1845b806cd0330cd99447e62cfb 100644
--- a/runtime/starpu/codelets/codelet_ztplqt.c
+++ b/runtime/starpu/codelets/codelet_ztplqt.c
@@ -60,7 +60,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_ztpmlqt.c b/runtime/starpu/codelets/codelet_ztpmlqt.c
index 52a53739b8538cdaa886e33e320fdf2d55ebde66..62ec9d335624c1e093cbb08d39e265271500433e 100644
--- a/runtime/starpu/codelets/codelet_ztpmlqt.c
+++ b/runtime/starpu/codelets/codelet_ztpmlqt.c
@@ -106,7 +106,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(V, Vm, Vn);
diff --git a/runtime/starpu/codelets/codelet_ztpmqrt.c b/runtime/starpu/codelets/codelet_ztpmqrt.c
index 78eb481dfce1ab0821eb0b981df3c0a831f1b1fd..e234616c6e6ffa401b234ced49eb6d1d46ab907f 100644
--- a/runtime/starpu/codelets/codelet_ztpmqrt.c
+++ b/runtime/starpu/codelets/codelet_ztpmqrt.c
@@ -106,7 +106,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(V, Vm, Vn);
diff --git a/runtime/starpu/codelets/codelet_ztpqrt.c b/runtime/starpu/codelets/codelet_ztpqrt.c
index 3baed4ce743acc143205ce567bd20730268de53e..fb6b5cd20724881526e6c4b4b8fd701b98de36e4 100644
--- a/runtime/starpu/codelets/codelet_ztpqrt.c
+++ b/runtime/starpu/codelets/codelet_ztpqrt.c
@@ -61,7 +61,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_RW(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_ztradd.c b/runtime/starpu/codelets/codelet_ztradd.c
index d59f03a5f3e4e9695c728f4eeb142add91e5192f..b0aaed724836eadebf95c5b6d097af9878926e10 100644
--- a/runtime/starpu/codelets/codelet_ztradd.c
+++ b/runtime/starpu/codelets/codelet_ztradd.c
@@ -96,7 +96,7 @@ void INSERT_TASK_ztradd( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_ztradd_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     /* Reduce the B access if needed */
     accessB = ( beta == 0. ) ? STARPU_W : STARPU_RW;
diff --git a/runtime/starpu/codelets/codelet_ztrasm.c b/runtime/starpu/codelets/codelet_ztrasm.c
index 5eb7835b2f4375118c6578faefce1675d0d4b4d6..5fcb0b9bb6f90faaa2880e2df3d3febec5fdbbd9 100644
--- a/runtime/starpu/codelets/codelet_ztrasm.c
+++ b/runtime/starpu/codelets/codelet_ztrasm.c
@@ -56,7 +56,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_ztrmm.c b/runtime/starpu/codelets/codelet_ztrmm.c
index 887ff71d3c7c237d924afe849858ea8d4ba99979..73da968e15066dfc887b400b62056ad62e94064b 100644
--- a/runtime/starpu/codelets/codelet_ztrmm.c
+++ b/runtime/starpu/codelets/codelet_ztrmm.c
@@ -126,7 +126,7 @@ void INSERT_TASK_ztrmm( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_ztrmm_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
diff --git a/runtime/starpu/codelets/codelet_ztrsm.c b/runtime/starpu/codelets/codelet_ztrsm.c
index 2aa43232e8404cfa31431ba7fb3779d3ff0c9e92..01a95745332ba8b85bf4166d57b22c57f530ede4 100644
--- a/runtime/starpu/codelets/codelet_ztrsm.c
+++ b/runtime/starpu/codelets/codelet_ztrsm.c
@@ -127,7 +127,7 @@ void INSERT_TASK_ztrsm( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_ztrsm_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
diff --git a/runtime/starpu/codelets/codelet_ztrssq.c b/runtime/starpu/codelets/codelet_ztrssq.c
index 07f433a746e687db7c25b25fd196bace31576c82..4c6118f8c91583530ca87d1b7598aba689b5ea1e 100644
--- a/runtime/starpu/codelets/codelet_ztrssq.c
+++ b/runtime/starpu/codelets/codelet_ztrssq.c
@@ -55,7 +55,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_ztrtri.c b/runtime/starpu/codelets/codelet_ztrtri.c
index 9605d034eca04fbced137f051f54b962706c5308..3f09383b8caa6499a594a313f0fdd4db3dceba97 100644
--- a/runtime/starpu/codelets/codelet_ztrtri.c
+++ b/runtime/starpu/codelets/codelet_ztrtri.c
@@ -94,7 +94,7 @@ void INSERT_TASK_ztrtri( const RUNTIME_option_t *options,
     callback = options->profiling ? cl_ztrtri_callback : NULL;
 
     /* Fix the worker id */
-    workerid = (schedopt == NULL) ? -1 : schedopt->workerid;
+    workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
 #if defined(CHAMELEON_KERNELS_TRACE)
     {
diff --git a/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c b/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c
index 882b41c84b2a36e847b9d862235270b8c9fa9ca1..74a8f970bdd1317ed96e59634c626f21791e0da7 100644
--- a/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c
+++ b/runtime/starpu/codelets/codelet_ztsmlq_hetra1.c
@@ -76,7 +76,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     int ldWORK = side == ChamLeft ? ib : nb;
 
diff --git a/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c b/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c
index 586b59e90036c7a90c705fb885def2fd497d4430..7971b3ffbc5798ede77c284168e849c242120d3d 100644
--- a/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c
+++ b/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c
@@ -76,7 +76,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     int ldWORK = side == ChamLeft ? ib : nb;
 
diff --git a/runtime/starpu/codelets/codelet_ztstrf.c b/runtime/starpu/codelets/codelet_ztstrf.c
index 95f47124f93c02fe27c6752c5d367691d9071d69..51f357a43921baafd1e04123eecd865a8f8054d6 100644
--- a/runtime/starpu/codelets/codelet_ztstrf.c
+++ b/runtime/starpu/codelets/codelet_ztstrf.c
@@ -83,7 +83,7 @@ void INSERT_TASK_ztstrf( const RUNTIME_option_t *options,
     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) ? -1 : schedopt->workerid;
+    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;
diff --git a/runtime/starpu/codelets/codelet_zunmlq.c b/runtime/starpu/codelets/codelet_zunmlq.c
index 18a3b661226c808275776221c078818434a0fd84..2e8b861e56f271c609ca45cbd441c47ebddb35c4 100644
--- a/runtime/starpu/codelets/codelet_zunmlq.c
+++ b/runtime/starpu/codelets/codelet_zunmlq.c
@@ -109,7 +109,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);
diff --git a/runtime/starpu/codelets/codelet_zunmqr.c b/runtime/starpu/codelets/codelet_zunmqr.c
index f7f29d45da3be749db83c8d2b6f9a7695d09f575..8b57dc09c1c56e636cf7e4b600ed4b390ae231bb 100644
--- a/runtime/starpu/codelets/codelet_zunmqr.c
+++ b/runtime/starpu/codelets/codelet_zunmqr.c
@@ -108,7 +108,7 @@ 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) ? -1 : schedopt->workerid;
+    int workerid = (schedopt == NULL) ? options->workerid : schedopt->workerid;
 
     CHAMELEON_BEGIN_ACCESS_DECLARATION;
     CHAMELEON_ACCESS_R(A, Am, An);