diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c420b5db604eeb3cb6a40456f2c625e905068cd7..41481fa28a001cdb3fd08791b4cf8352c5d6b96a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -78,6 +78,18 @@ build_quark:
     BUILD_OPTIONS: "-DCHAMELEON_SCHED_QUARK=ON"
     VERSION: quark
 
+build_parsec:
+  <<: *build_script
+  artifacts:
+    name: build_parsec
+    expire_in: 48 hours
+    paths:
+      - build
+      - chameleon_parsec.log
+  variables:
+    BUILD_OPTIONS: "-DCHAMELEON_SCHED_PARSEC=ON"
+    VERSION: parsec
+
 test_starpu_branches:
   <<: *test_script
   variables:
@@ -186,12 +198,49 @@ test_quark_master:
   only:
     - master@solverstack/chameleon
 
+test_parsec_branches:
+  <<: *test_script
+  variables:
+    TESTS_RESTRICTION: "-R \"test_shm_s|test_mpi_s\""
+    VERSION: parsec
+  dependencies:
+    - build_parsec
+  artifacts:
+    name: test_parsec
+    expire_in: 48 hours
+    paths:
+      - build
+      - chameleon_parsec.log
+      - chameleon_parsec.lcov
+  only:
+    - branches
+  except:
+    - master
+
+test_parsec_master:
+  <<: *test_script
+  variables:
+    TESTS_RESTRICTION: "-R \"test_shm_|test_mpi_\""
+    VERSION: parsec
+  dependencies:
+    - build_parsec
+  artifacts:
+    name: test_parsec
+    expire_in: 48 hours
+    paths:
+      - build
+      - chameleon_parsec.log
+      - chameleon_parsec.lcov
+  only:
+    - master@solverstack/chameleon
+
 sonar:
   stage: analysis
   dependencies:
     - test_starpu_master
     - test_starpu_simgrid_master
     - test_quark_master
+    - test_parsec_master
   artifacts:
     name: chameleon_analysis
     expire_in: 1 week
@@ -206,6 +255,7 @@ sonar:
     - lcov -a $PWD/chameleon_starpu.lcov
            -a $PWD/chameleon_starpu_simgrid.lcov
            -a $PWD/chameleon_quark.lcov
+           -a $PWD/chameleon_parsec.lcov
            -o $PWD/chameleon.lcov
     - lcov_cobertura.py chameleon.lcov --output chameleon_coverage.xml
     - ./tools/analysis.sh
diff --git a/compute/ztrsmpl.c b/compute/ztrsmpl.c
index 4ec6fa35fe9e6de530b4dac04df734ca8bd4446d..b29f94acdd1d696d8351e6d06d074b1b86e9db1a 100644
--- a/compute/ztrsmpl.c
+++ b/compute/ztrsmpl.c
@@ -140,6 +140,7 @@ int MORSE_ztrsmpl( int N, int NRHS,
                      MorseDescInput, MorseLower, sequence, &request );
     morse_ztile2lap( morse, &descBl, &descBt,
                      MorseDescInout, MorseUpperLower, sequence, &request );
+    MORSE_Desc_Flush( descL, sequence );
 
     morse_sequence_wait( morse, sequence );
 
diff --git a/control/control.c b/control/control.c
index b478c7eb3a5c39d6a33630559c0ad52df1a81fbd..27169f01697ddf7344313df8c7e4e4fdebcd6350 100644
--- a/control/control.c
+++ b/control/control.c
@@ -104,7 +104,14 @@ int MORSE_InitPar(int ncpus, int ncudas, int nthreads_per_worker)
     }
 #  endif
 #endif
+
     RUNTIME_init( morse, ncpus, ncudas, nthreads_per_worker );
+
+#if defined(CHAMELEON_USE_MPI)
+    morse->my_mpi_rank   = RUNTIME_comm_rank( morse );
+    morse->mpi_comm_size = RUNTIME_comm_size( morse );
+#endif
+
     return MORSE_SUCCESS;
 }
 
diff --git a/runtime/parsec/codelets/codelet_zasum.c b/runtime/parsec/codelets/codelet_zasum.c
index ca99ee59c19abddef2fe8f4ba7314883e1eca822..ac174abab27f1773f7aa23ccab293af717cea8ac 100644
--- a/runtime/parsec/codelets/codelet_zasum.c
+++ b/runtime/parsec/codelets/codelet_zasum.c
@@ -54,8 +54,8 @@ void MORSE_TASK_dzasum(const MORSE_option_t *options,
         sizeof(MORSE_enum),    &uplo,                             VALUE,
         sizeof(int),           &M,                                VALUE,
         sizeof(int),           &N,                                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),     INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zaxpy.c b/runtime/parsec/codelets/codelet_zaxpy.c
index 9fcd774e56a8c87d74a199b9755d30bd2a57a7f8..042d44336185dee5d511dfb56404a89b8e18e81a 100644
--- a/runtime/parsec/codelets/codelet_zaxpy.c
+++ b/runtime/parsec/codelets/codelet_zaxpy.c
@@ -51,9 +51,9 @@ void MORSE_TASK_zaxpy(const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zaxpy_parsec, options->priority,  "axpy",
         sizeof(int),               &M,     VALUE,
         sizeof(MORSE_Complex64_t), &alpha, VALUE,
-        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
+        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),               &incA, VALUE,
-        PASSED_BY_REF,  RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT,
+        PASSED_BY_REF,  RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),               &incB, VALUE,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zbuild.c b/runtime/parsec/codelets/codelet_zbuild.c
index 17015a453d8acf91183f2fa95f032b0e426d2dff..3fd9331de8f746376c9b559e5c42c7c84f0f906d 100644
--- a/runtime/parsec/codelets/codelet_zbuild.c
+++ b/runtime/parsec/codelets/codelet_zbuild.c
@@ -59,7 +59,7 @@ void MORSE_TASK_zbuild( const MORSE_option_t *options,
         sizeof(int),   &row_max,                          VALUE,
         sizeof(int),   &col_min,                          VALUE,
         sizeof(int),   &col_max,                          VALUE,
-        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     OUTPUT,
+        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | OUTPUT | AFFINITY,
         sizeof(int),   &lda,                              VALUE,
         sizeof(void*), &user_data,                        VALUE,
         sizeof(void*), &user_build_callback,              VALUE,
diff --git a/runtime/parsec/codelets/codelet_zgeadd.c b/runtime/parsec/codelets/codelet_zgeadd.c
index b956a76b3c20e1f30e1c9f990ba36db8c5202891..7ef540ff99fabe2119589e150116399e42f0c55b 100644
--- a/runtime/parsec/codelets/codelet_zgeadd.c
+++ b/runtime/parsec/codelets/codelet_zgeadd.c
@@ -114,10 +114,10 @@ void MORSE_TASK_zgeadd(const MORSE_option_t *options,
         sizeof(int),               &m,     VALUE,
         sizeof(int),               &n,     VALUE,
         sizeof(MORSE_Complex64_t), &alpha, VALUE,
-        PASSED_BY_REF,              RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,              RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),               &lda,   VALUE,
         sizeof(MORSE_Complex64_t), &beta,  VALUE,
-        PASSED_BY_REF,              RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INOUT,
+        PASSED_BY_REF,              RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),               &ldb,   VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zgelqt.c b/runtime/parsec/codelets/codelet_zgelqt.c
index bfde58e8ae9e29fc70480cb1f03fd10e679aa895..5bfd12bdffc6251d9deb852d8426c471364b92bc 100644
--- a/runtime/parsec/codelets/codelet_zgelqt.c
+++ b/runtime/parsec/codelets/codelet_zgelqt.c
@@ -116,9 +116,9 @@ void MORSE_TASK_zgelqt(const MORSE_option_t *options,
         sizeof(int),                        &m,     VALUE,
         sizeof(int),                        &n,     VALUE,
         sizeof(int),                        &ib,    VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),           &ldt,                VALUE,
         sizeof(MORSE_Complex64_t)*nb,       NULL,   SCRATCH,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,   SCRATCH,
diff --git a/runtime/parsec/codelets/codelet_zgemm.c b/runtime/parsec/codelets/codelet_zgemm.c
index d79d23cc02c6e0811dcc3b26410c51739de464cf..570f74966dc2271e1f9d03077de9fcaaa56db600 100644
--- a/runtime/parsec/codelets/codelet_zgemm.c
+++ b/runtime/parsec/codelets/codelet_zgemm.c
@@ -72,12 +72,12 @@ void MORSE_TASK_zgemm( const MORSE_option_t *options,
         sizeof(int),           &n,                                VALUE,
         sizeof(int),           &k,                                VALUE,
         sizeof(MORSE_Complex64_t),           &alpha,              VALUE,
-        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | morse_parsec_get_arena_index(A),
+        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                              VALUE,
-        PASSED_BY_REF,     RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INPUT | morse_parsec_get_arena_index(B),
+        PASSED_BY_REF,     RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INPUT,
         sizeof(int),           &ldb,                              VALUE,
         sizeof(MORSE_Complex64_t),           &beta,               VALUE,
-        PASSED_BY_REF,     RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
+        PASSED_BY_REF,     RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),           &ldc,                              VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zgeqrt.c b/runtime/parsec/codelets/codelet_zgeqrt.c
index 9d5901a623983eca522fb918c87ebbf84d290fe3..12992b0376ec67fabc06d3b4a16201bebb0751bb 100644
--- a/runtime/parsec/codelets/codelet_zgeqrt.c
+++ b/runtime/parsec/codelets/codelet_zgeqrt.c
@@ -117,9 +117,9 @@ void MORSE_TASK_zgeqrt(const MORSE_option_t *options,
         sizeof(int),           &m,                             VALUE,
         sizeof(int),           &n,                             VALUE,
         sizeof(int),           &ib,                            VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                           VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),           &ldt,                           VALUE,
         sizeof(MORSE_Complex64_t)*nb,       NULL,                         SCRATCH,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,                         SCRATCH,
diff --git a/runtime/parsec/codelets/codelet_zgessm.c b/runtime/parsec/codelets/codelet_zgessm.c
index ebcf7b6c37cfd0b49fc7342b4d53e616afaca32b..758681299cb306540b9b9fa26dffffc93337471b 100644
--- a/runtime/parsec/codelets/codelet_zgessm.c
+++ b/runtime/parsec/codelets/codelet_zgessm.c
@@ -104,12 +104,14 @@ void MORSE_TASK_zgessm(const MORSE_option_t *options,
         sizeof(int),           &n,                                VALUE,
         sizeof(int),           &k,                                VALUE,
         sizeof(int),           &ib,                               VALUE,
-        sizeof(int)*nb,        IPIV,                              SCRATCH,
-        PASSED_BY_REF,         RTBLKADDR( L, MORSE_Complex64_t, Lm, Ln ),     INPUT,
+        sizeof(int*),          &IPIV,                             VALUE,
+        PASSED_BY_REF,         RTBLKADDR( L, MORSE_Complex64_t, Lm, Ln ), morse_parsec_get_arena_index( L ) | INPUT,
         sizeof(int),           &ldl,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( D, MORSE_Complex64_t, Dm, Dn ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( D, MORSE_Complex64_t, Dm, Dn ), morse_parsec_get_arena_index( D ) | INPUT,
         sizeof(int),           &ldd,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                              VALUE,
         PARSEC_DTD_ARG_END );
+
+    (void)nb;
 }
diff --git a/runtime/parsec/codelets/codelet_zgessq.c b/runtime/parsec/codelets/codelet_zgessq.c
index 71d2425a6e317cf1bf92c63904952100ff65fa0b..77c781847fdde087139fcb06c10190abda81a6ee 100644
--- a/runtime/parsec/codelets/codelet_zgessq.c
+++ b/runtime/parsec/codelets/codelet_zgessq.c
@@ -50,8 +50,8 @@ void MORSE_TASK_zgessq( const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zgessq_parsec, options->priority, "gessq",
         sizeof(int),    &m,            VALUE,
         sizeof(int),    &n,            VALUE,
-        PASSED_BY_REF,   RTBLKADDR( A, MORSE_Complex64_t, Am, An ),                 INPUT,
+        PASSED_BY_REF,   RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),    &lda,          VALUE,
-        PASSED_BY_REF,   RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ), INOUT,
+        PASSED_BY_REF,   RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ), INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zgetrf.c b/runtime/parsec/codelets/codelet_zgetrf.c
index 67e7868200e0c4037b9dd9344e8ec1385e678a3d..7705171d7827e3b35c76262b8551d20f30f0c328 100644
--- a/runtime/parsec/codelets/codelet_zgetrf.c
+++ b/runtime/parsec/codelets/codelet_zgetrf.c
@@ -54,7 +54,7 @@ void MORSE_TASK_zgetrf(const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zgetrf_parsec, options->priority, "getrf",
         sizeof(int),        &m,                          VALUE,
         sizeof(int),        &n,                          VALUE,
-        PASSED_BY_REF,       RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,       RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),        &lda,                        VALUE,
         sizeof(int)*nb,      IPIV,                        SCRATCH,
         sizeof(MORSE_bool), &check_info,                 VALUE,
diff --git a/runtime/parsec/codelets/codelet_zgetrf_incpiv.c b/runtime/parsec/codelets/codelet_zgetrf_incpiv.c
index 38b3405891789b6f8ffb9c9e30eb64ea42ebe52b..80ef2bd4a71ce1e7daf1b3fc70cfde3368a9b32c 100644
--- a/runtime/parsec/codelets/codelet_zgetrf_incpiv.c
+++ b/runtime/parsec/codelets/codelet_zgetrf_incpiv.c
@@ -112,9 +112,9 @@ void MORSE_TASK_zgetrf_incpiv( const MORSE_option_t *options,
         sizeof(int),           &m,                                VALUE,
         sizeof(int),           &n,                                VALUE,
         sizeof(int),           &ib,                               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                              VALUE,
-        sizeof(int)*nb,        IPIV,                              SCRATCH,
+        sizeof(int*),          &IPIV,                             VALUE,
         sizeof(int),           &check_info,                       VALUE,
         sizeof(int),           &iinfo,                            VALUE,
         PARSEC_DTD_ARG_END );
@@ -123,4 +123,5 @@ void MORSE_TASK_zgetrf_incpiv( const MORSE_option_t *options,
     (void)Lm;
     (void)Ln;
     (void)ldl;
+    (void)nb;
 }
diff --git a/runtime/parsec/codelets/codelet_zgetrf_nopiv.c b/runtime/parsec/codelets/codelet_zgetrf_nopiv.c
index d4910970d16260712d7da2ea7b08600684cebb76..f9ff48eb0e700ac311b946b53deac6cd058dc391 100644
--- a/runtime/parsec/codelets/codelet_zgetrf_nopiv.c
+++ b/runtime/parsec/codelets/codelet_zgetrf_nopiv.c
@@ -100,7 +100,7 @@ void MORSE_TASK_zgetrf_nopiv(const MORSE_option_t *options,
         sizeof(int),           &m,                          VALUE,
         sizeof(int),           &n,                          VALUE,
         sizeof(int),           &ib,                         VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                        VALUE,
         sizeof(int),           &iinfo,                      VALUE,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_zhe2ge.c b/runtime/parsec/codelets/codelet_zhe2ge.c
index f8a09c7661c89c451e7074e38166f05e927b1578..18bb9f36500e5a12e511d679626fffcb83308975 100644
--- a/runtime/parsec/codelets/codelet_zhe2ge.c
+++ b/runtime/parsec/codelets/codelet_zhe2ge.c
@@ -61,7 +61,7 @@ void MORSE_TASK_zhe2ge(const MORSE_option_t *options,
         sizeof(int),        &n,      VALUE,
         PASSED_BY_REF,       RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT ,
         sizeof(int),        &lda,    VALUE,
-        PASSED_BY_REF,       RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn), OUTPUT,
+        PASSED_BY_REF,       RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn), OUTPUT | AFFINITY,
         sizeof(int),        &ldb,    VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zhemm.c b/runtime/parsec/codelets/codelet_zhemm.c
index 497a7554600b4064ae8370dafcc9f68b38fd5d97..2e59eff097ed2d9af8f8c37cca3bb2fac87f9d60 100644
--- a/runtime/parsec/codelets/codelet_zhemm.c
+++ b/runtime/parsec/codelets/codelet_zhemm.c
@@ -70,12 +70,12 @@ void MORSE_TASK_zhemm(const MORSE_option_t *options,
         sizeof(int),                       &m,       VALUE,
         sizeof(int),                       &n,       VALUE,
         sizeof(MORSE_Complex64_t),         &alpha,   VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                 VALUE,
-        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INPUT,
         sizeof(int),           &ldb,                 VALUE,
         sizeof(MORSE_Complex64_t),         &beta,    VALUE,
-        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),           &ldc,                 VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zher2k.c b/runtime/parsec/codelets/codelet_zher2k.c
index 9f506af6cd2cef773c5805232314d626ac24b7e6..04b8c964aa472fb2cabf284ebcac4de23f7dd5ef 100644
--- a/runtime/parsec/codelets/codelet_zher2k.c
+++ b/runtime/parsec/codelets/codelet_zher2k.c
@@ -70,12 +70,12 @@ void MORSE_TASK_zher2k(const MORSE_option_t *options,
         sizeof(int),                        &n,        VALUE,
         sizeof(int),                        &k,        VALUE,
         sizeof(MORSE_Complex64_t),          &alpha,    VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | morse_parsec_get_arena_index(A),
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),                        &lda,      VALUE,
-        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INPUT | morse_parsec_get_arena_index(B),
+        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INPUT,
         sizeof(int),                        &ldb,      VALUE,
         sizeof(double),                     &beta,     VALUE,
-        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
+        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),                        &ldc,      VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zherfb.c b/runtime/parsec/codelets/codelet_zherfb.c
index 95aea6bc6575aeca82d303df5626fa610d7c971e..02af0d40491199273c41d7869e6f8e509effd631 100644
--- a/runtime/parsec/codelets/codelet_zherfb.c
+++ b/runtime/parsec/codelets/codelet_zherfb.c
@@ -66,11 +66,11 @@ void MORSE_TASK_zherfb(const MORSE_option_t *options,
         sizeof(int),        &k,    VALUE,
         sizeof(int),        &ib,   VALUE,
         sizeof(int),        &nb,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR(A, MORSE_Complex64_t, Am, An), (uplo == MorseUpper) ? INOUT : INOUT,
+        PASSED_BY_REF,       RTBLKADDR(A, MORSE_Complex64_t, Am, An), INOUT,
         sizeof(int),        &lda,  VALUE,
         PASSED_BY_REF,       RTBLKADDR(T, MORSE_Complex64_t, Tm, Tn), INPUT,
         sizeof(int),        &ldt,  VALUE,
-        PASSED_BY_REF,       RTBLKADDR(C, MORSE_Complex64_t, Cm, Cn), (uplo == MorseUpper) ? INOUT : INOUT,
+        PASSED_BY_REF,       RTBLKADDR(C, MORSE_Complex64_t, Cm, Cn), INOUT | AFFINITY,
         sizeof(int),        &ldc,  VALUE,
         sizeof(MORSE_Complex64_t)*2*nb*nb,  NULL, SCRATCH,
         sizeof(int),        &nb,   VALUE,
diff --git a/runtime/parsec/codelets/codelet_zherk.c b/runtime/parsec/codelets/codelet_zherk.c
index fb3d4f768af06cdfd9328c62be676a55d9f7c561..6e355286d894505ca729a336d697197fb876d409 100644
--- a/runtime/parsec/codelets/codelet_zherk.c
+++ b/runtime/parsec/codelets/codelet_zherk.c
@@ -66,10 +66,10 @@ void MORSE_TASK_zherk(const MORSE_option_t *options,
         sizeof(int),           &n,                                VALUE,
         sizeof(int),           &k,                                VALUE,
         sizeof(double),        &alpha,                            VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | morse_parsec_get_arena_index(A),
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                              VALUE,
         sizeof(double),        &beta,                             VALUE,
-        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
+        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),           &ldc,                              VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zhessq.c b/runtime/parsec/codelets/codelet_zhessq.c
index eb8f30aa43fc02510899feee716f4105cbd84efa..dcd8ba89f2403d3dc5a737d0598e6f3bd2da19c8 100644
--- a/runtime/parsec/codelets/codelet_zhessq.c
+++ b/runtime/parsec/codelets/codelet_zhessq.c
@@ -50,8 +50,8 @@ void MORSE_TASK_zhessq( const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zhessq_parsec, options->priority, "hessq",
         sizeof(int),           &uplo,               VALUE,
         sizeof(int),           &n,                  VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),                    INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ),    INOUT,
+        PASSED_BY_REF,         RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ),    INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zlacpy.c b/runtime/parsec/codelets/codelet_zlacpy.c
index c67a943b1d6e184649d683f28b76ce3187d2042f..af699f181a10b7edd2ca045126043a5a2c52e1cb 100644
--- a/runtime/parsec/codelets/codelet_zlacpy.c
+++ b/runtime/parsec/codelets/codelet_zlacpy.c
@@ -62,10 +62,10 @@ void MORSE_TASK_zlacpyx( const MORSE_option_t *options,
         sizeof(int),           &m,                         VALUE,
         sizeof(int),           &n,                         VALUE,
         sizeof(int),           &displA,                    VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),   INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                       VALUE,
         sizeof(int),           &displB,                    VALUE,
-        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),   OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | OUTPUT | AFFINITY,
         sizeof(int),           &ldb,                       VALUE,
         PARSEC_DTD_ARG_END );
     (void)nb;
diff --git a/runtime/parsec/codelets/codelet_zlag2c.c b/runtime/parsec/codelets/codelet_zlag2c.c
index 3d63b66c00a8fd0f0d979317343c34b21a5bc938..83d17107a6933f98321df578c7c0a4a77b50897b 100644
--- a/runtime/parsec/codelets/codelet_zlag2c.c
+++ b/runtime/parsec/codelets/codelet_zlag2c.c
@@ -56,9 +56,9 @@ void MORSE_TASK_zlag2c(const MORSE_option_t *options,
     parsec_dtd_taskpool_insert_task(PARSEC_dtd_taskpool, CORE_zlag2c_parsec, "lag2c",
         sizeof(int),                        &m,         VALUE,
         sizeof(int),                        &n,         VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),                        &lda,       VALUE,
-        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex32_t, Bm, Bn ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex32_t, Bm, Bn ),     OUTPUT | AFFINITY,
         sizeof(int),                        &ldb,       VALUE,
         PARSEC_DTD_ARG_END );
 }
@@ -100,7 +100,7 @@ void MORSE_TASK_clag2z(const MORSE_option_t *options,
         sizeof(int),                        &n,         VALUE,
         PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex32_t, Am, An ),     INPUT,
         sizeof(int),                        &lda,       VALUE,
-        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | OUTPUT | AFFINITY,
         sizeof(int),                        &ldb,       VALUE,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zlange.c b/runtime/parsec/codelets/codelet_zlange.c
index ad5e8dba521b9d849bd6367ae25fc299b7e7d307..62c427d6e6de76781720b319db482a0560d39c15 100644
--- a/runtime/parsec/codelets/codelet_zlange.c
+++ b/runtime/parsec/codelets/codelet_zlange.c
@@ -55,10 +55,10 @@ void MORSE_TASK_zlange(const MORSE_option_t *options,
         sizeof(MORSE_enum),            &norm,          VALUE,
         sizeof(int),                   &M,             VALUE,
         sizeof(int),                   &N,             VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),                   &LDA,           VALUE,
         sizeof(double)*szeW,           NULL,           SCRATCH,
-        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),            OUTPUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 
     (void)NB;
@@ -91,7 +91,7 @@ void MORSE_TASK_zlange_max(const MORSE_option_t *options,
     parsec_dtd_taskpool_insert_task(
         PARSEC_dtd_taskpool, CORE_zlange_max_parsec, options->priority, "lange_max",
         PASSED_BY_REF,         RTBLKADDR( A, double, Am, An ), INPUT,
-        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ), OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ), OUTPUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
 
diff --git a/runtime/parsec/codelets/codelet_zlanhe.c b/runtime/parsec/codelets/codelet_zlanhe.c
index 52d6009d49f7d310c636be1ddee3e7ecf5f6b00a..a6d0c9d2989197a1999a37029bc7e624439933f3 100644
--- a/runtime/parsec/codelets/codelet_zlanhe.c
+++ b/runtime/parsec/codelets/codelet_zlanhe.c
@@ -55,10 +55,10 @@ void MORSE_TASK_zlanhe(const MORSE_option_t *options,
         sizeof(MORSE_enum),            &norm,          VALUE,
         sizeof(MORSE_enum),            &uplo,          VALUE,
         sizeof(int),                   &N,             VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),                   &LDA,           VALUE,
         sizeof(double)*szeW,           NULL,           SCRATCH,
-        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),            OUTPUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 
     (void)NB;
diff --git a/runtime/parsec/codelets/codelet_zlansy.c b/runtime/parsec/codelets/codelet_zlansy.c
index 2c6a5675effb92e811608ad14b8be1d56944ba23..7435d3de935cd91d77a3365d354f38ab4d24b665 100644
--- a/runtime/parsec/codelets/codelet_zlansy.c
+++ b/runtime/parsec/codelets/codelet_zlansy.c
@@ -55,10 +55,10 @@ void MORSE_TASK_zlansy(const MORSE_option_t *options,
         sizeof(MORSE_enum),            &norm,          VALUE,
         sizeof(MORSE_enum),            &uplo,          VALUE,
         sizeof(int),                   &N,             VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),                   &LDA,           VALUE,
         sizeof(double)*szeW,           NULL,           SCRATCH,
-        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),            OUTPUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 
     (void)NB;
diff --git a/runtime/parsec/codelets/codelet_zlantr.c b/runtime/parsec/codelets/codelet_zlantr.c
index 6616a149da8ac19169ebe4fb457601ef2de02221..65d74eee1ad7faa7cc1ea198a245130e6059d68b 100644
--- a/runtime/parsec/codelets/codelet_zlantr.c
+++ b/runtime/parsec/codelets/codelet_zlantr.c
@@ -58,10 +58,10 @@ void MORSE_TASK_zlantr(const MORSE_option_t *options,
         sizeof(MORSE_enum),            &diag,          VALUE,
         sizeof(int),                   &M,             VALUE,
         sizeof(int),                   &N,             VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),                   &LDA,           VALUE,
         sizeof(double)*szeW,           NULL,           SCRATCH,
-        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),            OUTPUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 
     (void)NB;
diff --git a/runtime/parsec/codelets/codelet_zlascal.c b/runtime/parsec/codelets/codelet_zlascal.c
index 0fc697925111c1c6daeecdb3d0e86de5066e6d13..7be1493ea099120376183caea2bde82995481af2 100644
--- a/runtime/parsec/codelets/codelet_zlascal.c
+++ b/runtime/parsec/codelets/codelet_zlascal.c
@@ -66,7 +66,7 @@ void MORSE_TASK_zlascal(const MORSE_option_t *options,
         sizeof(int),               &m,     VALUE,
         sizeof(int),               &n,     VALUE,
         sizeof(MORSE_Complex64_t), &alpha, VALUE,
-        PASSED_BY_REF,              RTBLKADDR(A, MORSE_Complex64_t, Am, An), INOUT,
+        PASSED_BY_REF,              RTBLKADDR(A, MORSE_Complex64_t, Am, An), INOUT | AFFINITY,
         sizeof(int),               &lda,   VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zlaset.c b/runtime/parsec/codelets/codelet_zlaset.c
index 44c0318e9909a2a4344c1a4a6aa3d9878f73163d..7982eb978f87c98aa9246f60ddfd0d2ac5fd1826 100644
--- a/runtime/parsec/codelets/codelet_zlaset.c
+++ b/runtime/parsec/codelets/codelet_zlaset.c
@@ -90,7 +90,7 @@ void MORSE_TASK_zlaset(const MORSE_option_t *options,
         sizeof(int),                     &N,           VALUE,
         sizeof(MORSE_Complex64_t),       &alpha,       VALUE,
         sizeof(MORSE_Complex64_t),       &beta,        VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | OUTPUT | AFFINITY,
         sizeof(int),                     &LDA,         VALUE,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zlaset2.c b/runtime/parsec/codelets/codelet_zlaset2.c
index 4204df5d0cb7e21742a8ffce04c73d95eb2d32d1..99130b8ca525e83fc157574b5bb9b98ae0be3587 100644
--- a/runtime/parsec/codelets/codelet_zlaset2.c
+++ b/runtime/parsec/codelets/codelet_zlaset2.c
@@ -85,7 +85,7 @@ void MORSE_TASK_zlaset2(const MORSE_option_t *options,
         sizeof(int),                       &M,         VALUE,
         sizeof(int),                       &N,         VALUE,
         sizeof(MORSE_enum),                &alpha,     VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | OUTPUT | AFFINITY,
         sizeof(int),                       &LDA,       VALUE,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zlatro.c b/runtime/parsec/codelets/codelet_zlatro.c
index 791e9f143e987c835c44455fd0ae7c379bfc69b0..5e724a7a49cc4279bb5063bdeaa299319e0f10de 100644
--- a/runtime/parsec/codelets/codelet_zlatro.c
+++ b/runtime/parsec/codelets/codelet_zlatro.c
@@ -61,9 +61,9 @@ void MORSE_TASK_zlatro(const MORSE_option_t *options,
         sizeof(MORSE_enum), &trans, VALUE,
         sizeof(int),        &m,     VALUE,
         sizeof(int),        &n,     VALUE,
-        PASSED_BY_REF,       RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT ,
+        PASSED_BY_REF,       RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT,
         sizeof(int),        &lda,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn), OUTPUT,
+        PASSED_BY_REF,       RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn), OUTPUT | AFFINITY,
         sizeof(int),        &ldb,   VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zlauum.c b/runtime/parsec/codelets/codelet_zlauum.c
index 06627c6ca2b67ddf8832656ddbba69445a747408..164d6d9a748a6ae6389db4dafa1f2d5fb93b6cab 100644
--- a/runtime/parsec/codelets/codelet_zlauum.c
+++ b/runtime/parsec/codelets/codelet_zlauum.c
@@ -53,7 +53,7 @@ void MORSE_TASK_zlauum(const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zlauum_parsec, options->priority, "lauum",
         sizeof(MORSE_enum),    &uplo,                  VALUE,
         sizeof(int),           &n,                     VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                   VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zpamm.c b/runtime/parsec/codelets/codelet_zpamm.c
index 36da673a6c8c7c7214eb9eb7ee164321cf800e2b..066b457dc3eb2e73e1a22df10648ae0c4b69885c 100644
--- a/runtime/parsec/codelets/codelet_zpamm.c
+++ b/runtime/parsec/codelets/codelet_zpamm.c
@@ -212,13 +212,13 @@ MORSE_TASK_zpamm(const MORSE_option_t *options,
         sizeof(int),                        &n,                 VALUE,
         sizeof(int),                        &k,                 VALUE,
         sizeof(int),                        &l,                 VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INPUT,
         sizeof(int),                        &lda1,              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),                        &lda2,              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ),        INPUT,
+        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), morse_parsec_get_arena_index( V ) | INPUT,
         sizeof(int),                        &ldv,               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( W, MORSE_Complex64_t, Wm, Wn ),        INOUT,
+        PASSED_BY_REF,         RTBLKADDR( W, MORSE_Complex64_t, Wm, Wn ), morse_parsec_get_arena_index( W ) | INOUT,
         sizeof(int),                        &ldw,               VALUE,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zplghe.c b/runtime/parsec/codelets/codelet_zplghe.c
index 228aa415f17d46b0dae81a0167780e10fefadb65..d87469a72b5d98556776e65ae4a71d3d28af06e1 100644
--- a/runtime/parsec/codelets/codelet_zplghe.c
+++ b/runtime/parsec/codelets/codelet_zplghe.c
@@ -54,7 +54,7 @@ void MORSE_TASK_zplghe( const MORSE_option_t *options,
         sizeof(double),    &bump,                          VALUE,
         sizeof(int),       &m,                             VALUE,
         sizeof(int),       &n,                             VALUE,
-        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     OUTPUT | morse_parsec_get_arena_index(A) | AFFINITY,
+        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | OUTPUT | AFFINITY,
         sizeof(int),       &lda,                           VALUE,
         sizeof(int),       &bigM,                          VALUE,
         sizeof(int),       &m0,                            VALUE,
diff --git a/runtime/parsec/codelets/codelet_zplgsy.c b/runtime/parsec/codelets/codelet_zplgsy.c
index e1cb2606c30de6b6895c244026d05145116e2279..52666285b1c5bf9d2007b99986fafa76062be640 100644
--- a/runtime/parsec/codelets/codelet_zplgsy.c
+++ b/runtime/parsec/codelets/codelet_zplgsy.c
@@ -54,7 +54,7 @@ void MORSE_TASK_zplgsy( const MORSE_option_t *options,
         sizeof(MORSE_Complex64_t), &bump,                          VALUE,
         sizeof(int),               &m,                             VALUE,
         sizeof(int),               &n,                             VALUE,
-        PASSED_BY_REF,             RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     OUTPUT | morse_parsec_get_arena_index(A) | AFFINITY,
+        PASSED_BY_REF,             RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | OUTPUT | AFFINITY,
         sizeof(int),               &lda,                           VALUE,
         sizeof(int),               &bigM,                          VALUE,
         sizeof(int),               &m0,                            VALUE,
diff --git a/runtime/parsec/codelets/codelet_zplrnt.c b/runtime/parsec/codelets/codelet_zplrnt.c
index b117329d2e9ae033e56fb09d35964de1f814c2c6..305de260a35486336bae3e3bc5356ca6a9049aaa 100644
--- a/runtime/parsec/codelets/codelet_zplrnt.c
+++ b/runtime/parsec/codelets/codelet_zplrnt.c
@@ -52,7 +52,7 @@ void MORSE_TASK_zplrnt( const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zplrnt_parsec, options->priority, "zplrnt",
         sizeof(int),       &m,                          VALUE,
         sizeof(int),       &n,                          VALUE,
-        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     OUTPUT,
+        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | OUTPUT | AFFINITY,
         sizeof(int),       &lda,                        VALUE,
         sizeof(int),       &bigM,                       VALUE,
         sizeof(int),       &m0,                         VALUE,
diff --git a/runtime/parsec/codelets/codelet_zplssq.c b/runtime/parsec/codelets/codelet_zplssq.c
index 39fbc5b5c602002e067fb467d46feb3e4ba3657e..a0b6901cddf7389b76b9249a4bcb9e56deea0d61 100644
--- a/runtime/parsec/codelets/codelet_zplssq.c
+++ b/runtime/parsec/codelets/codelet_zplssq.c
@@ -82,7 +82,7 @@ void MORSE_TASK_zplssq( const MORSE_option_t *options,
     parsec_dtd_taskpool_insert_task(
         PARSEC_dtd_taskpool, CORE_zplssq_parsec, options->priority, "plssq",
         PASSED_BY_REF,         RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ),    INPUT,
-        PASSED_BY_REF,         RTBLKADDR( SCLSSQ, double, SCLSSQm, SCLSSQn ),                INOUT,
+        PASSED_BY_REF,         RTBLKADDR( SCLSSQ, double, SCLSSQm, SCLSSQn ),                INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
 
@@ -108,6 +108,6 @@ void MORSE_TASK_zplssq2( const MORSE_option_t *options,
 
     parsec_dtd_taskpool_insert_task(
         PARSEC_dtd_taskpool, CORE_zplssq2_parsec, options->priority, "plssq2",
-        PASSED_BY_REF,         RTBLKADDR( RESULT, double, RESULTm, RESULTn ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( RESULT, double, RESULTm, RESULTn ),     INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zpotrf.c b/runtime/parsec/codelets/codelet_zpotrf.c
index 434968089184f3b9f21ee77639ecf63a306430ca..2460b999d5308fa5910326906b42228c7c0d9351 100644
--- a/runtime/parsec/codelets/codelet_zpotrf.c
+++ b/runtime/parsec/codelets/codelet_zpotrf.c
@@ -58,7 +58,7 @@ void MORSE_TASK_zpotrf(const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zpotrf_parsec, options->priority, "potrf",
         sizeof(MORSE_enum),    &uplo,                             VALUE,
         sizeof(int),           &n,                                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT | morse_parsec_get_arena_index(A) | AFFINITY,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                              VALUE,
         sizeof(int),           &iinfo,                            VALUE,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_zssssm.c b/runtime/parsec/codelets/codelet_zssssm.c
index be3193ae662886ecd6554075096a6faefbf1e664..29fff34b9a6e209b66f16ec65e700ea63c9bcc85 100644
--- a/runtime/parsec/codelets/codelet_zssssm.c
+++ b/runtime/parsec/codelets/codelet_zssssm.c
@@ -41,7 +41,7 @@ CORE_zssssm_parsec( parsec_execution_stream_t *context,
     int *IPIV;
 
     parsec_dtd_unpack_args(
-        this_task,   &m1,   &n1,   &m2,   &n2,   &k,   &ib, &A1,   &lda1, &A2,   &lda2, &L1,   &ldl1, &L2,   &ldl2, &IPIV );
+        this_task, &m1, &n1, &m2, &n2, &k, &ib, &A1, &lda1, &A2, &lda2, &L1, &ldl1, &L2, &ldl2, &IPIV );
 
     CORE_zssssm( m1, n1, m2, n2, k, ib, A1, lda1, A2, lda2, L1, ldl1, L2, ldl2, IPIV );
 
@@ -67,14 +67,16 @@ void MORSE_TASK_zssssm(const MORSE_option_t *options,
         sizeof(int),           &n2,                                VALUE,
         sizeof(int),           &k,                                 VALUE,
         sizeof(int),           &ib,                                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),           &lda1,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),           &lda2,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( L1, MORSE_Complex64_t, L1m, L1n ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( L1, MORSE_Complex64_t, L1m, L1n ), morse_parsec_get_arena_index( L1 ) | INPUT,
         sizeof(int),           &ldl1,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( L2, MORSE_Complex64_t, L2m, L2n ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( L2, MORSE_Complex64_t, L2m, L2n ), morse_parsec_get_arena_index( L2 ) | INPUT,
         sizeof(int),           &ldl2,                              VALUE,
-        sizeof(int)*nb,        IPIV,                               SCRATCH,
+        sizeof(int*),          &IPIV,                              VALUE,
         PARSEC_DTD_ARG_END );
+
+    (void)nb;
 }
diff --git a/runtime/parsec/codelets/codelet_zsymm.c b/runtime/parsec/codelets/codelet_zsymm.c
index e52418ef12b69e7d68a1cea34dde9ca56fc8886e..b9c8902768277e01cc1755a26ff1834ecaa3bd1f 100644
--- a/runtime/parsec/codelets/codelet_zsymm.c
+++ b/runtime/parsec/codelets/codelet_zsymm.c
@@ -65,12 +65,12 @@ void MORSE_TASK_zsymm(const MORSE_option_t *options,
         sizeof(int),            &m,                 VALUE,
         sizeof(int),            &n,                 VALUE,
         sizeof(MORSE_Complex64_t),  &alpha,         VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),            &lda,               VALUE,
-        PASSED_BY_REF,          RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INPUT,
+        PASSED_BY_REF,          RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INPUT,
         sizeof(int),            &ldb,               VALUE,
         sizeof(MORSE_Complex64_t),  &beta,          VALUE,
-        PASSED_BY_REF,          RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT,
+        PASSED_BY_REF,          RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),            &ldc,               VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zsyr2k.c b/runtime/parsec/codelets/codelet_zsyr2k.c
index cc26d68d54afdfa36f32b32aa3b6299adaac6561..a0be6a3d34415a5170f0b081fe5ef5938b178cf7 100644
--- a/runtime/parsec/codelets/codelet_zsyr2k.c
+++ b/runtime/parsec/codelets/codelet_zsyr2k.c
@@ -65,12 +65,12 @@ void MORSE_TASK_zsyr2k(const MORSE_option_t *options,
         sizeof(int),            &n,                     VALUE,
         sizeof(int),            &k,                     VALUE,
         sizeof(MORSE_Complex64_t), &alpha,              VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | morse_parsec_get_arena_index(A),
+        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),            &lda,                   VALUE,
-        PASSED_BY_REF,          RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INPUT | morse_parsec_get_arena_index(B),
+        PASSED_BY_REF,          RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INPUT,
         sizeof(int),            &ldb,                   VALUE,
         sizeof(MORSE_Complex64_t), &beta,               VALUE,
-        PASSED_BY_REF,          RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
+        PASSED_BY_REF,          RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),            &ldc,                   VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zsyrk.c b/runtime/parsec/codelets/codelet_zsyrk.c
index aef91156fc3d54ae5b0e10f410a637cb17235c34..e765ea4cef3e08e92b49b7528a24fca5da5d91ab 100644
--- a/runtime/parsec/codelets/codelet_zsyrk.c
+++ b/runtime/parsec/codelets/codelet_zsyrk.c
@@ -61,10 +61,10 @@ void MORSE_TASK_zsyrk(const MORSE_option_t *options,
         sizeof(int),           &n,                                 VALUE,
         sizeof(int),           &k,                                 VALUE,
         sizeof(MORSE_Complex64_t),           &alpha,               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | morse_parsec_get_arena_index(A),
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                               VALUE,
         sizeof(MORSE_Complex64_t),           &beta,                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
+        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),           &ldc,                               VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_zsyssq.c b/runtime/parsec/codelets/codelet_zsyssq.c
index b00c92c77ce4be3d13dcdb767a54512227806854..29de13c8d32fad32d0d65d9233b29f2767b2bbf0 100644
--- a/runtime/parsec/codelets/codelet_zsyssq.c
+++ b/runtime/parsec/codelets/codelet_zsyssq.c
@@ -50,8 +50,8 @@ void MORSE_TASK_zsyssq( const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zsyssq_parsec, options->priority, "syssq",
         sizeof(MORSE_enum),     &uplo,                  VALUE,
         sizeof(int),            &n,                     VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ),                               INPUT,
+        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),            &lda,                   VALUE,
-        PASSED_BY_REF,          RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ),    INOUT,
+        PASSED_BY_REF,          RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ),    INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_zsytrf_nopiv.c b/runtime/parsec/codelets/codelet_zsytrf_nopiv.c
index d75061e9844d2a01c889c22b7a19f2dbaba8d959..314529ebf072015570c80376c502f457d4e44531 100644
--- a/runtime/parsec/codelets/codelet_zsytrf_nopiv.c
+++ b/runtime/parsec/codelets/codelet_zsytrf_nopiv.c
@@ -50,7 +50,7 @@ void MORSE_TASK_zsytrf_nopiv(const MORSE_option_t *options,
         PARSEC_dtd_taskpool, CORE_zsytrf_nopiv_parsec, options->priority, "sytrf_nopiv",
         sizeof(MORSE_enum),              &uplo,                VALUE,
         sizeof(int),                     &n,                   VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),                     &lda,                 VALUE,
         sizeof(int),                     &iinfo,               VALUE,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_ztile_zero.c b/runtime/parsec/codelets/codelet_ztile_zero.c
index 14d4b32171c9220bcd4a02097535d7925d62f52e..09a9c18764d0fa6578f143a9015e968ad43cf45f 100644
--- a/runtime/parsec/codelets/codelet_ztile_zero.c
+++ b/runtime/parsec/codelets/codelet_ztile_zero.c
@@ -55,7 +55,7 @@ void MORSE_TASK_ztile_zero( const MORSE_option_t *options,
         sizeof(int),       &X2,                       VALUE,
         sizeof(int),       &Y1,                       VALUE,
         sizeof(int),       &Y2,                       VALUE,
-        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     OUTPUT,
+        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | OUTPUT | AFFINITY,
         sizeof(int),       &lda,                      VALUE,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_ztplqt.c b/runtime/parsec/codelets/codelet_ztplqt.c
index 3c447650d2358ef25e39a3ebce9858fa3df045c1..bdef9d844ee272334f1bbd4c99c7af17bdbb95b8 100644
--- a/runtime/parsec/codelets/codelet_ztplqt.c
+++ b/runtime/parsec/codelets/codelet_ztplqt.c
@@ -61,11 +61,11 @@ void MORSE_TASK_ztplqt( const MORSE_option_t *options,
         sizeof(int),   &N,   VALUE,
         sizeof(int),   &L,   VALUE,
         sizeof(int),   &ib,  VALUE,
-        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT,
+        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT,
         sizeof(int),   &lda, VALUE,
-        PASSED_BY_REF,  RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT,
+        PASSED_BY_REF,  RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),   &ldb, VALUE,
-        PASSED_BY_REF,  RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), OUTPUT,
+        PASSED_BY_REF,  RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),   &ldt, VALUE,
         sizeof(MORSE_Complex64_t)*(ib+1)*nb, NULL, SCRATCH,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_ztpmlqt.c b/runtime/parsec/codelets/codelet_ztpmlqt.c
index 667b63c5ee8ac3d3959db3047779f8a3704298e6..1c3ed165ee863d91b1de410c6c3f7261b6547dca 100644
--- a/runtime/parsec/codelets/codelet_ztpmlqt.c
+++ b/runtime/parsec/codelets/codelet_ztpmlqt.c
@@ -71,13 +71,13 @@ void MORSE_TASK_ztpmlqt( const MORSE_option_t *options,
         sizeof(int),        &K,     VALUE,
         sizeof(int),        &L,     VALUE,
         sizeof(int),        &ib,    VALUE,
-        PASSED_BY_REF,       RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), INPUT,
+        PASSED_BY_REF,       RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), morse_parsec_get_arena_index( V ) | INPUT,
         sizeof(int),        &ldv,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), INPUT,
+        PASSED_BY_REF,       RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),        &ldt,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT,
+        PASSED_BY_REF,       RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT,
         sizeof(int),        &lda,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT,
+        PASSED_BY_REF,       RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),        &ldb,   VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb, NULL, SCRATCH,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_ztpmqrt.c b/runtime/parsec/codelets/codelet_ztpmqrt.c
index 0b3446d61eaea62d728a1bd9683f9c569193893c..665bf6ff3fe10f50ff9a8394ac20eed5173aee20 100644
--- a/runtime/parsec/codelets/codelet_ztpmqrt.c
+++ b/runtime/parsec/codelets/codelet_ztpmqrt.c
@@ -71,13 +71,13 @@ void MORSE_TASK_ztpmqrt( const MORSE_option_t *options,
         sizeof(int),        &K,     VALUE,
         sizeof(int),        &L,     VALUE,
         sizeof(int),        &ib,    VALUE,
-        PASSED_BY_REF,       RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), INPUT,
+        PASSED_BY_REF,       RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), morse_parsec_get_arena_index( V ) | INPUT,
         sizeof(int),        &ldv,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), INPUT,
+        PASSED_BY_REF,       RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),        &ldt,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT,
+        PASSED_BY_REF,       RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT,
         sizeof(int),        &lda,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT,
+        PASSED_BY_REF,       RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),        &ldb,   VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb, NULL, SCRATCH,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_ztpqrt.c b/runtime/parsec/codelets/codelet_ztpqrt.c
index a0f4628ed8c0ebf4899b4e1eb5fe93bbca09882e..76c742cdb0af2f14ee1b4105594c024e1ee6538d 100644
--- a/runtime/parsec/codelets/codelet_ztpqrt.c
+++ b/runtime/parsec/codelets/codelet_ztpqrt.c
@@ -61,11 +61,11 @@ void MORSE_TASK_ztpqrt( const MORSE_option_t *options,
         sizeof(int),   &N,   VALUE,
         sizeof(int),   &L,   VALUE,
         sizeof(int),   &ib,  VALUE,
-        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT,
+        PASSED_BY_REF,  RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT,
         sizeof(int),   &lda, VALUE,
-        PASSED_BY_REF,  RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT,
+        PASSED_BY_REF,  RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),   &ldb, VALUE,
-        PASSED_BY_REF,  RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), OUTPUT,
+        PASSED_BY_REF,  RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),   &ldt, VALUE,
         sizeof(MORSE_Complex64_t)*(ib+1)*nb, NULL, SCRATCH,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_ztradd.c b/runtime/parsec/codelets/codelet_ztradd.c
index 53d9899288a0b173892497fdd6f9c067ed8eae85..a3d2e764e7d7181fb6b73f7d469beb36fd393bbe 100644
--- a/runtime/parsec/codelets/codelet_ztradd.c
+++ b/runtime/parsec/codelets/codelet_ztradd.c
@@ -121,10 +121,10 @@ void MORSE_TASK_ztradd(const MORSE_option_t *options,
         sizeof(int),               &m,     VALUE,
         sizeof(int),               &n,     VALUE,
         sizeof(MORSE_Complex64_t), &alpha, VALUE,
-        PASSED_BY_REF,              RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,              RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),               &lda,   VALUE,
         sizeof(MORSE_Complex64_t), &beta,  VALUE,
-        PASSED_BY_REF,              RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INOUT,
+        PASSED_BY_REF,              RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),               &ldb,   VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_ztrasm.c b/runtime/parsec/codelets/codelet_ztrasm.c
index 5b9b9f6f517a73243ea8ea4394e08bb201ac86d9..9e96531b58858f77fa6dc83a9742fddbbf159744 100644
--- a/runtime/parsec/codelets/codelet_ztrasm.c
+++ b/runtime/parsec/codelets/codelet_ztrasm.c
@@ -56,8 +56,8 @@ void MORSE_TASK_ztrasm(const MORSE_option_t *options,
         sizeof(MORSE_enum),     &diag,                  VALUE,
         sizeof(int),            &M,                     VALUE,
         sizeof(int),            &N,                     VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),            &lda,                   VALUE,
-        PASSED_BY_REF,          RTBLKADDR( B, double, Bm, Bn ),     INOUT,
+        PASSED_BY_REF,          RTBLKADDR( B, double, Bm, Bn ),     INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_ztrmm.c b/runtime/parsec/codelets/codelet_ztrmm.c
index ae2ef47f1385c509e94f4f4d17e95c7893d144e0..73cfa4bb6a9d322db5c6c2834ea4bbb1af2a9e98 100644
--- a/runtime/parsec/codelets/codelet_ztrmm.c
+++ b/runtime/parsec/codelets/codelet_ztrmm.c
@@ -66,9 +66,9 @@ void MORSE_TASK_ztrmm(const MORSE_option_t *options,
         sizeof(int),            &m,                     VALUE,
         sizeof(int),            &n,                     VALUE,
         sizeof(MORSE_Complex64_t),         &alpha,      VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),            &lda,                   VALUE,
-        PASSED_BY_REF,          RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INOUT,
+        PASSED_BY_REF,          RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),            &ldb,                   VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_ztrsm.c b/runtime/parsec/codelets/codelet_ztrsm.c
index 697ac02e806b01ef032d6e36ffbd8303a129e062..11820dd5095e2f14e473726c8b34b5f9527f027b 100644
--- a/runtime/parsec/codelets/codelet_ztrsm.c
+++ b/runtime/parsec/codelets/codelet_ztrsm.c
@@ -58,9 +58,9 @@ void MORSE_TASK_ztrsm(const MORSE_option_t *options,
         sizeof(int),           &m,                        VALUE,
         sizeof(int),           &n,                        VALUE,
         sizeof(MORSE_Complex64_t),           &alpha,      VALUE,
-        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | morse_parsec_get_arena_index(A),
+        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                      VALUE,
-        PASSED_BY_REF,     RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INOUT | morse_parsec_get_arena_index(A) | AFFINITY,
+        PASSED_BY_REF,     RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), morse_parsec_get_arena_index( B ) | INOUT | AFFINITY,
         sizeof(int),           &ldb,                      VALUE,
         PARSEC_DTD_ARG_END );
 
diff --git a/runtime/parsec/codelets/codelet_ztrssq.c b/runtime/parsec/codelets/codelet_ztrssq.c
index fc6428a91f6e242221ba3f155c6e23f1f4efb8ab..6ba994943e3223205f00db03ec5fd138809c57f2 100644
--- a/runtime/parsec/codelets/codelet_ztrssq.c
+++ b/runtime/parsec/codelets/codelet_ztrssq.c
@@ -55,8 +55,8 @@ void MORSE_TASK_ztrssq( const MORSE_option_t *options,
         sizeof(MORSE_enum),     &diag,                  VALUE,
         sizeof(int),            &m,                     VALUE,
         sizeof(int),            &n,                     VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ),                    INPUT,
+        PASSED_BY_REF,          RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),            &lda,                   VALUE,
-        PASSED_BY_REF,          RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ),    INOUT,
+        PASSED_BY_REF,          RTBLKADDR( SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn ),    INOUT | AFFINITY,
         PARSEC_DTD_ARG_END );
 }
diff --git a/runtime/parsec/codelets/codelet_ztrtri.c b/runtime/parsec/codelets/codelet_ztrtri.c
index 4fc0bcf0d2fdf131ac3d0ec317e6bd0c26beeb9e..a3cf89a840397383ddf4a795defe875094117d47 100644
--- a/runtime/parsec/codelets/codelet_ztrtri.c
+++ b/runtime/parsec/codelets/codelet_ztrtri.c
@@ -54,7 +54,7 @@ void MORSE_TASK_ztrtri( const MORSE_option_t *options,
         sizeof(MORSE_enum),         &uplo,                  VALUE,
         sizeof(MORSE_enum),         &diag,                  VALUE,
         sizeof(int),                &n,                     VALUE,
-        PASSED_BY_REF,              RTBLKADDR( A, MORSE_Complex64_t, Am, An ),   INOUT,
+        PASSED_BY_REF,              RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),                &lda,                   VALUE,
         sizeof(int),                &iinfo,                 VALUE,
         PARSEC_DTD_ARG_END );
diff --git a/runtime/parsec/codelets/codelet_ztslqt.c b/runtime/parsec/codelets/codelet_ztslqt.c
index fde0eeeab677c2bd24ee5cca8a2a11719aa169a0..b87667d9044354490d4932693eb219debc31bfaa 100644
--- a/runtime/parsec/codelets/codelet_ztslqt.c
+++ b/runtime/parsec/codelets/codelet_ztslqt.c
@@ -58,11 +58,11 @@ void MORSE_TASK_ztslqt(const MORSE_option_t *options,
         sizeof(int),            &m,                     VALUE,
         sizeof(int),            &n,                     VALUE,
         sizeof(int),            &ib,                    VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),     INOUT,
+        PASSED_BY_REF,          RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),            &lda1,                  VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),     INOUT,
+        PASSED_BY_REF,          RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),            &lda2,                  VALUE,
-        PASSED_BY_REF,          RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),        OUTPUT,
+        PASSED_BY_REF,          RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),                        &ldt,       VALUE,
         sizeof(MORSE_Complex64_t)*nb,       NULL,       SCRATCH,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,       SCRATCH,
diff --git a/runtime/parsec/codelets/codelet_ztsmlq.c b/runtime/parsec/codelets/codelet_ztsmlq.c
index 5642007d9a15be6d99dbcb53e83c215bfe532727..567e82c77e22e5eb0e412673c4a06a59668334dd 100644
--- a/runtime/parsec/codelets/codelet_ztsmlq.c
+++ b/runtime/parsec/codelets/codelet_ztsmlq.c
@@ -75,13 +75,13 @@ void MORSE_TASK_ztsmlq(const MORSE_option_t *options,
         sizeof(int),                        &n2,        VALUE,
         sizeof(int),                        &k,         VALUE,
         sizeof(int),                        &ib,        VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),  INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),           &lda1,                   VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),  INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),           &lda2,                   VALUE,
-        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), morse_parsec_get_arena_index( V ) | INPUT,
         sizeof(int),           &ldv,                    VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),           &ldt,                    VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,       SCRATCH,
         sizeof(int),           &ldwork,                 VALUE,
diff --git a/runtime/parsec/codelets/codelet_ztsmlq_hetra1.c b/runtime/parsec/codelets/codelet_ztsmlq_hetra1.c
index 5f3fa01d35346c70c24f641715b7e7ca272cd685..30377ae166004648dd3103d9f0acd99c5fd558b8 100644
--- a/runtime/parsec/codelets/codelet_ztsmlq_hetra1.c
+++ b/runtime/parsec/codelets/codelet_ztsmlq_hetra1.c
@@ -82,7 +82,7 @@ void MORSE_TASK_ztsmlq_hetra1(const MORSE_option_t *options,
         sizeof(int),        &ib,     VALUE,
         PASSED_BY_REF,       RTBLKADDR(A1, MORSE_Complex64_t, A1m, A1n), INOUT,
         sizeof(int),        &lda1,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR(A2, MORSE_Complex64_t, A2m, A2n), INOUT,
+        PASSED_BY_REF,       RTBLKADDR(A2, MORSE_Complex64_t, A2m, A2n), INOUT | AFFINITY,
         sizeof(int),        &lda2,   VALUE,
         PASSED_BY_REF,       RTBLKADDR(V,  MORSE_Complex64_t, Vm,  Vn),  INPUT,
         sizeof(int),        &ldv,    VALUE,
diff --git a/runtime/parsec/codelets/codelet_ztsmqr.c b/runtime/parsec/codelets/codelet_ztsmqr.c
index 607c58fe311d77160f0cf7fe078fde4685bcfd75..fc010105f963b1a05b7cfa16635bfbaf5c7f645a 100644
--- a/runtime/parsec/codelets/codelet_ztsmqr.c
+++ b/runtime/parsec/codelets/codelet_ztsmqr.c
@@ -75,13 +75,13 @@ void MORSE_TASK_ztsmqr(const MORSE_option_t *options,
         sizeof(int),           &n2,                                VALUE,
         sizeof(int),           &k,                                 VALUE,
         sizeof(int),           &ib,                                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),           &lda1,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),           &lda2,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ),    INPUT,
+        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), morse_parsec_get_arena_index( V ) | INPUT,
         sizeof(int),           &ldv,                               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),    INPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),           &ldt,                               VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,                  SCRATCH,
         sizeof(int),           &ldwork,                            VALUE,
diff --git a/runtime/parsec/codelets/codelet_ztsmqr_hetra1.c b/runtime/parsec/codelets/codelet_ztsmqr_hetra1.c
index a73d1fe46e21004bf8114de9919d1a249d62e4b2..0e7c0e271eb4f4b0270374b892aa5fac78ea8eeb 100644
--- a/runtime/parsec/codelets/codelet_ztsmqr_hetra1.c
+++ b/runtime/parsec/codelets/codelet_ztsmqr_hetra1.c
@@ -82,7 +82,7 @@ void MORSE_TASK_ztsmqr_hetra1(const MORSE_option_t *options,
         sizeof(int),        &ib,     VALUE,
         PASSED_BY_REF,       RTBLKADDR(A1, MORSE_Complex64_t, A1m, A1n), INOUT,
         sizeof(int),        &lda1,   VALUE,
-        PASSED_BY_REF,       RTBLKADDR(A2, MORSE_Complex64_t, A2m, A2n), INOUT,
+        PASSED_BY_REF,       RTBLKADDR(A2, MORSE_Complex64_t, A2m, A2n), INOUT | AFFINITY,
         sizeof(int),        &lda2,   VALUE,
         PASSED_BY_REF,       RTBLKADDR(V,  MORSE_Complex64_t, Vm,  Vn),  INPUT,
         sizeof(int),        &ldv,    VALUE,
diff --git a/runtime/parsec/codelets/codelet_ztsqrt.c b/runtime/parsec/codelets/codelet_ztsqrt.c
index 70e6255ae514492feef1c7b5b327513dadc121e4..dd2d13362f5ffc8ae9e7b36048dafffb0a056772 100644
--- a/runtime/parsec/codelets/codelet_ztsqrt.c
+++ b/runtime/parsec/codelets/codelet_ztsqrt.c
@@ -58,11 +58,11 @@ void MORSE_TASK_ztsqrt(const MORSE_option_t *options,
         sizeof(MORSE_enum),    &m,                                 VALUE,
         sizeof(int),           &n,                                 VALUE,
         sizeof(int),           &ib,                                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),           &lda1,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),           &lda2,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),        OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),           &ldt,                               VALUE,
         sizeof(MORSE_Complex64_t)*nb,       NULL,                  SCRATCH,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,                  SCRATCH,
diff --git a/runtime/parsec/codelets/codelet_ztstrf.c b/runtime/parsec/codelets/codelet_ztstrf.c
index cc52a1203e1a1949cc6978458d93075d81701e0f..75fbd440552ac0d2118c71858ea7ea1b40fc2a76 100644
--- a/runtime/parsec/codelets/codelet_ztstrf.c
+++ b/runtime/parsec/codelets/codelet_ztstrf.c
@@ -43,7 +43,7 @@ CORE_ztstrf_parsec( parsec_execution_stream_t *context,
     int info;
 
     parsec_dtd_unpack_args(
-        this_task,   &m,   &n,   &ib,   &nb, &U,   &ldu, &A,   &lda, &L,   &ldl, &IPIV, &WORK,   &ldwork,   &check_info,   &iinfo );
+        this_task, &m, &n, &ib, &nb, &U, &ldu, &A, &lda, &L, &ldl, &IPIV, &WORK, &ldwork, &check_info, &iinfo );
 
     CORE_ztstrf( m, n, ib, nb, U, ldu, A, lda, L, ldl, IPIV, WORK, ldwork, &info );
 
@@ -67,16 +67,18 @@ void MORSE_TASK_ztstrf(const MORSE_option_t *options,
         sizeof(int),           &n,                                VALUE,
         sizeof(int),           &ib,                               VALUE,
         sizeof(int),           &nb,                               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( U, MORSE_Complex64_t, Um, Un ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( U, MORSE_Complex64_t, Um, Un ), morse_parsec_get_arena_index( U ) | INOUT,
         sizeof(int),           &ldu,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INOUT | AFFINITY,
         sizeof(int),           &lda,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( L, MORSE_Complex64_t, Lm, Ln ),     OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( L, MORSE_Complex64_t, Lm, Ln ), morse_parsec_get_arena_index( L ) | OUTPUT,
         sizeof(int),           &ldl,                              VALUE,
-        sizeof(int)*nb,        IPIV,                              SCRATCH,
+        sizeof(int*),          &IPIV,                             VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,                 SCRATCH,
         sizeof(int),           &nb,                               VALUE,
         sizeof(int),           &check_info,                       VALUE,
         sizeof(int),           &iinfo,                            VALUE,
         PARSEC_DTD_ARG_END );
+
+    (void)nb;
 }
diff --git a/runtime/parsec/codelets/codelet_zttlqt.c b/runtime/parsec/codelets/codelet_zttlqt.c
index 50b58208a5415f588b9ae11d1fc866bad4ead4f1..3197f441b77a7a0451e8643b40009d94d905c891 100644
--- a/runtime/parsec/codelets/codelet_zttlqt.c
+++ b/runtime/parsec/codelets/codelet_zttlqt.c
@@ -59,11 +59,11 @@ void MORSE_TASK_zttlqt(const MORSE_option_t *options,
         sizeof(int),            &m,                     VALUE,
         sizeof(int),            &n,                     VALUE,
         sizeof(int),            &ib,                    VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),    INOUT,
+        PASSED_BY_REF,          RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),            &lda1,                  VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),    INOUT,
+        PASSED_BY_REF,          RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),            &lda2,                  VALUE,
-        PASSED_BY_REF,          RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),       OUTPUT,
+        PASSED_BY_REF,          RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),            &ldt,                   VALUE,
         sizeof(MORSE_Complex64_t)*nb,       NULL,       SCRATCH,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,       SCRATCH,
diff --git a/runtime/parsec/codelets/codelet_zttmlq.c b/runtime/parsec/codelets/codelet_zttmlq.c
index daf10d1a6a30303c11f9894db0b7c6aedf463b16..78fe71ad2b3a60b4a76e282e623e6d82e3c96b56 100644
--- a/runtime/parsec/codelets/codelet_zttmlq.c
+++ b/runtime/parsec/codelets/codelet_zttmlq.c
@@ -75,13 +75,13 @@ void MORSE_TASK_zttmlq(const MORSE_option_t *options,
         sizeof(int),            &n2,                        VALUE,
         sizeof(int),            &k,                         VALUE,
         sizeof(int),            &ib,                        VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),    INOUT,
+        PASSED_BY_REF,          RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),            &lda1,                      VALUE,
-        PASSED_BY_REF,          RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),    INOUT,
+        PASSED_BY_REF,          RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),            &lda2,                      VALUE,
-        PASSED_BY_REF,          RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ),       INPUT,
+        PASSED_BY_REF,          RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), morse_parsec_get_arena_index( V ) | INPUT,
         sizeof(int),            &ldv,                       VALUE,
-        PASSED_BY_REF,          RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),       INPUT,
+        PASSED_BY_REF,          RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),            &ldt,                       VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,           SCRATCH,
         sizeof(int),            &ldwork,                    VALUE,
diff --git a/runtime/parsec/codelets/codelet_zttmqr.c b/runtime/parsec/codelets/codelet_zttmqr.c
index ef3ac2fca74e9115f72df0880a45336af92a6e23..78746614135c49371abdfe8a2f212e36b00f9331 100644
--- a/runtime/parsec/codelets/codelet_zttmqr.c
+++ b/runtime/parsec/codelets/codelet_zttmqr.c
@@ -76,13 +76,13 @@ void MORSE_TASK_zttmqr(const MORSE_option_t *options,
         sizeof(int),           &n2,                               VALUE,
         sizeof(int),           &k,                                VALUE,
         sizeof(int),           &ib,                               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),           &lda1,                             VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),           &lda2,                             VALUE,
-        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ),    INPUT,
+        PASSED_BY_REF,         RTBLKADDR( V, MORSE_Complex64_t, Vm, Vn ), morse_parsec_get_arena_index( V ) | INPUT,
         sizeof(int),           &ldv,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),    INPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),           &ldt,                              VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,                            SCRATCH,
         sizeof(int),           &ldwork,                           VALUE,
diff --git a/runtime/parsec/codelets/codelet_zttqrt.c b/runtime/parsec/codelets/codelet_zttqrt.c
index 498029a535a348ba6e399c942ea27edc37926374..8ed09e01d73b8e4216bd6b2c387cea040f801abb 100644
--- a/runtime/parsec/codelets/codelet_zttqrt.c
+++ b/runtime/parsec/codelets/codelet_zttqrt.c
@@ -37,7 +37,7 @@ CORE_zttqrt_parsec( parsec_execution_stream_t *context,
     MORSE_Complex64_t *WORK;
 
     parsec_dtd_unpack_args(
-        this_task,   &m,   &n,   &ib, &A1,   &lda1, &A2,   &lda2, &T,   &ldt, &TAU, &WORK );
+        this_task, &m, &n, &ib, &A1, &lda1, &A2, &lda2, &T, &ldt, &TAU, &WORK );
 
     CORE_zttqrt( m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK );
 
@@ -58,11 +58,11 @@ void MORSE_TASK_zttqrt(const MORSE_option_t *options,
         sizeof(MORSE_enum),    &m,                                 VALUE,
         sizeof(int),           &n,                                 VALUE,
         sizeof(int),           &ib,                                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A1, MORSE_Complex64_t, A1m, A1n ), morse_parsec_get_arena_index( A1 ) | INOUT,
         sizeof(int),           &lda1,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( A2, MORSE_Complex64_t, A2m, A2n ), morse_parsec_get_arena_index( A2 ) | INOUT | AFFINITY,
         sizeof(int),           &lda2,                              VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),        OUTPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | OUTPUT,
         sizeof(int),           &ldt,                               VALUE,
         sizeof(MORSE_Complex64_t)*nb,       NULL,                  SCRATCH,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,                  SCRATCH,
diff --git a/runtime/parsec/codelets/codelet_zunmlq.c b/runtime/parsec/codelets/codelet_zunmlq.c
index 3e189ad793f1bdb36a35b0adc3985d0c7deb710f..d368d10e4e237202210a59380e966943d814c1df 100644
--- a/runtime/parsec/codelets/codelet_zunmlq.c
+++ b/runtime/parsec/codelets/codelet_zunmlq.c
@@ -66,11 +66,11 @@ void MORSE_TASK_zunmlq(const MORSE_option_t *options,
         sizeof(int),                        &n,                 VALUE,
         sizeof(int),                        &k,                 VALUE,
         sizeof(int),                        &ib,                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),                        &lda,               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ),     INPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),                        &ldt,               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ),     INOUT,
+        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),                        &ldc,               VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,               SCRATCH,
         sizeof(int),                        &nb,                VALUE,
diff --git a/runtime/parsec/codelets/codelet_zunmqr.c b/runtime/parsec/codelets/codelet_zunmqr.c
index 904547eb5d59ef2fbb26f9e2d330216205a2b0c4..a593b55cf80e86ed7abe482467f1bca4a2591293 100644
--- a/runtime/parsec/codelets/codelet_zunmqr.c
+++ b/runtime/parsec/codelets/codelet_zunmqr.c
@@ -66,11 +66,11 @@ void MORSE_TASK_zunmqr(const MORSE_option_t *options,
         sizeof(int),           &n,                                 VALUE,
         sizeof(int),           &k,                                 VALUE,
         sizeof(int),           &ib,                                VALUE,
-        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
+        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ), morse_parsec_get_arena_index( A ) | INPUT,
         sizeof(int),           &lda,                               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), INPUT,
+        PASSED_BY_REF,         RTBLKADDR( T, MORSE_Complex64_t, Tm, Tn ), morse_parsec_get_arena_index( T ) | INPUT,
         sizeof(int),           &ldt,                               VALUE,
-        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT,
+        PASSED_BY_REF,         RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), morse_parsec_get_arena_index( C ) | INOUT | AFFINITY,
         sizeof(int),           &ldc,                               VALUE,
         sizeof(MORSE_Complex64_t)*ib*nb,   NULL,                          SCRATCH,
         sizeof(int),           &nb,                                VALUE,
diff --git a/runtime/parsec/control/runtime_descriptor.c b/runtime/parsec/control/runtime_descriptor.c
index e696248a40b0e8e6a4b45c56b82c9c827b32e0ae..afb3e6ab8d622004cc19bf615076d80ef1aa7f21 100644
--- a/runtime/parsec/control/runtime_descriptor.c
+++ b/runtime/parsec/control/runtime_descriptor.c
@@ -21,10 +21,20 @@
 #include "chameleon_parsec.h"
 #include <parsec/data.h>
 #include <parsec/datatype.h>
-//#include <parsec/data_dist/matrix/matrix.h>
 #include <parsec/arena.h>
 
-static int parsec_global_arena_index = 0;
+/* Variable parsec_dtd_no_of_arenas is private and cannot be changed */
+#define MORSE_PARSEC_DTD_NO_OF_ARENA 16 /**< Number of arenas available per DTD */
+
+typedef struct morse_parsec_arena_s {
+    /* int mb; */
+    /* int nb; */
+    /* MORSE_enum dtype; */
+    size_t size;
+} morse_parsec_arena_t;
+
+static int morse_parsec_nb_arenas = 0;
+static morse_parsec_arena_t morse_parsec_registered_arenas[MORSE_PARSEC_DTD_NO_OF_ARENA] = { { 0 } };
 
 void RUNTIME_comm_set_tag_sizes( int user_tag_width,
                                  int user_tag_sep )
@@ -45,18 +55,6 @@ void RUNTIME_free( void *ptr, size_t size )
     return;
 }
 
-struct morse_parsec_desc_s {
-    parsec_data_collection_t  super;
-    MORSE_desc_t  *desc;
-    parsec_data_t **data_map;
-    int arena_index;
-};
-
-int
-morse_parsec_get_arena_index(const MORSE_desc_t *desc) {
-    return ((morse_parsec_desc_t *)desc->schedopt)->arena_index;
-}
-
 static inline void
 morse_parsec_key_to_coordinates(parsec_data_collection_t *data_collection, parsec_data_key_t key,
                                 int *m, int *n)
@@ -247,23 +245,48 @@ void RUNTIME_desc_create( MORSE_desc_t *mdesc )
 
     /* taskpool init to bypass a requirement of PaRSEC  */
 #if defined(CHAMELEON_USE_MPI)
-    parsec_dtd_taskpool_new();
-    /* Internal limitation of PaRSEC */
-    assert(parsec_global_arena_index < 16);
-    pdesc->arena_index = parsec_global_arena_index++;
-
-    parsec_datatype_t datatype;
-    switch(mdesc->dtyp) {
-    case MorseInteger:       datatype = parsec_datatype_int32_t; break;
-    case MorseRealFloat:     datatype = parsec_datatype_float_t; break;
-    case MorseRealDouble:    datatype = parsec_datatype_double_t; break;
-    case MorseComplexFloat:  datatype = parsec_datatype_complex_t; break;
-    case MorseComplexDouble: datatype = parsec_datatype_double_complex_t; break;
-    default: morse_fatal_error("MORSE_Element_Size", "undefined type"); break;
-    }
+    /* Look if an arena already exists for this descriptor */
+    {
+        morse_parsec_arena_t *arena = morse_parsec_registered_arenas;
+        size_t size = mdesc->mb * mdesc->nb * MORSE_Element_Size(mdesc->dtyp);
+        int i;
 
-    parsec_matrix_add2arena_tile( parsec_dtd_arenas[pdesc->arena_index], datatype,
-                                  mdesc->mb * mdesc->nb * MORSE_Element_Size(mdesc->dtyp) );
+        for(i=0; i<morse_parsec_nb_arenas; i++, arena++) {
+            if ( size == arena->size) {
+                pdesc->arena_index = i;
+                break;
+            }
+        }
+
+        if (i == morse_parsec_nb_arenas) {
+            parsec_datatype_t datatype;
+
+            /* Create a taskpool to make sur the system is initialized */
+            if ( i == 0 ) {
+                parsec_taskpool_t *tp = parsec_dtd_taskpool_new();
+                parsec_taskpool_free( tp );
+            }
+
+            /* Internal limitation of PaRSEC */
+            assert(morse_parsec_nb_arenas < MORSE_PARSEC_DTD_NO_OF_ARENA);
+
+            switch(mdesc->dtyp) {
+            case MorseInteger:       datatype = parsec_datatype_int32_t; break;
+            case MorseRealFloat:     datatype = parsec_datatype_float_t; break;
+            case MorseRealDouble:    datatype = parsec_datatype_double_t; break;
+            case MorseComplexFloat:  datatype = parsec_datatype_complex_t; break;
+            case MorseComplexDouble: datatype = parsec_datatype_double_complex_t; break;
+            default: morse_fatal_error("MORSE_Element_Size", "undefined type"); break;
+            }
+
+            /* Register the new arena */
+            parsec_matrix_add2arena( parsec_dtd_arenas[i], datatype, matrix_UpperLower, 1,
+                                     mdesc->mb, mdesc->nb, mdesc->mb, PARSEC_ARENA_ALIGNMENT_SSE, -1 );
+            arena->size = size;
+            pdesc->arena_index = i;
+            morse_parsec_nb_arenas++;
+        }
+    }
 #endif
     /* /\* Overwrite the leading dimensions to store the padding *\/ */
     /* mdesc->llm = mdesc->mb * mdesc->lmt; */
diff --git a/runtime/parsec/include/chameleon_parsec.h b/runtime/parsec/include/chameleon_parsec.h
index b7cafbcf2f165d1c07baf45fe9cc4652f2ea120a..6238dd0c2d8307fbe9364fe3ffe4bd8bf5d8807b 100644
--- a/runtime/parsec/include/chameleon_parsec.h
+++ b/runtime/parsec/include/chameleon_parsec.h
@@ -22,13 +22,26 @@
 
 #include <parsec.h>
 #include <parsec/insert_function.h>
+#include <parsec/data_dist/matrix/matrix.h>
+
+/* Undefined PaRSEC definition of BLKLDD */
+#undef BLKLDD
 
 #include "control/common.h"
 
-struct morse_parsec_desc_s;
+struct morse_parsec_desc_s {
+    parsec_data_collection_t super;
+    int                      arena_index;
+    MORSE_desc_t            *desc;
+    parsec_data_t          **data_map;
+};
+
 typedef struct morse_parsec_desc_s morse_parsec_desc_t;
 
-int morse_parsec_get_arena_index(const MORSE_desc_t *desc);
+static inline int
+morse_parsec_get_arena_index(const MORSE_desc_t *desc) {
+    return ((morse_parsec_desc_t *)desc->schedopt)->arena_index;
+}
 
 /*
  * Access to block pointer and leading dimension
diff --git a/runtime/starpu/control/runtime_control.c b/runtime/starpu/control/runtime_control.c
index 82ba00606cb2ce1f24666a566461ecd902f50f11..a6980cbb1e64428275019dded927626bd99d164c 100644
--- a/runtime/starpu/control/runtime_control.c
+++ b/runtime/starpu/control/runtime_control.c
@@ -102,8 +102,6 @@ int RUNTIME_init( MORSE_context_t *morse,
         MPI_Initialized( &flag );
 #endif
         starpu_mpi_init(NULL, NULL, !flag);
-        morse->my_mpi_rank = RUNTIME_comm_rank( morse );
-        morse->mpi_comm_size = RUNTIME_comm_size( morse );
     }
 #endif
 
diff --git a/timing/time_zgetri_tile.c b/timing/time_zgetri_tile.c
index 84bace17ff21609ef4d82373fe6dad5c45f4be36..6a32b1897e7e92edcd57112c926e68245c998917 100644
--- a/timing/time_zgetri_tile.c
+++ b/timing/time_zgetri_tile.c
@@ -179,8 +179,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
 
             MORSE_zlaswpc_Tile_Async( descA, 1, descA->m, piv, -1,
                                       sequence, &request[3] );
-            MORSE_Sequence_Wait(sequence);
             MORSE_Desc_Flush( descA, sequence );
+            MORSE_Sequence_Wait(sequence);
             STOP_TIMING();
 
         } else {
@@ -196,8 +196,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
                                       sequence, &request[3] );
 
             /* Wait for everything */
-            MORSE_Sequence_Wait( sequence );
             MORSE_Desc_Flush( descA, sequence );
+            MORSE_Sequence_Wait( sequence );
             STOP_TIMING();
 
         }
@@ -229,8 +229,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
             START_TIMING();
             MORSE_zgetrf_Tile_Async(descA, piv, sequence, &request[0]);
             MORSE_zgetri_Tile_Async(descA, piv, &descW, sequence, &request[1]);
-            MORSE_Sequence_Wait(sequence);
             MORSE_Desc_Flush( descA, sequence );
+            MORSE_Sequence_Wait(sequence);
             STOP_TIMING();
 
             MORSE_Sequence_Destroy(sequence);
diff --git a/timing/time_zpotri_tile.c b/timing/time_zpotri_tile.c
index 906c2de8d0a4b8e47e444c8247fdd3f224d7278f..78f20db8f22fd7895eed70b2640e0f64c75ba892 100644
--- a/timing/time_zpotri_tile.c
+++ b/timing/time_zpotri_tile.c
@@ -61,14 +61,17 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
             START_TIMING();
 
             MORSE_zpotrf_Tile_Async(uplo, descA,               sequence, &request[0]);
+            MORSE_Desc_Flush( descA, sequence );
             MORSE_Sequence_Wait(sequence);
 
             MORSE_ztrtri_Tile_Async(uplo, MorseNonUnit, descA, sequence, &request[1]);
+            MORSE_Desc_Flush( descA, sequence );
             MORSE_Sequence_Wait(sequence);
 
             MORSE_zlauum_Tile_Async(uplo, descA,               sequence, &request[2]);
-            MORSE_Sequence_Wait(sequence);
             MORSE_Desc_Flush( descA, sequence );
+            MORSE_Sequence_Wait(sequence);
+
             STOP_TIMING();
 
         } else {
@@ -78,8 +81,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
             MORSE_ztrtri_Tile_Async(uplo, MorseNonUnit, descA, sequence, &request[1]);
             MORSE_zlauum_Tile_Async(uplo, descA,               sequence, &request[2]);
 
-            MORSE_Sequence_Wait(sequence);
             MORSE_Desc_Flush( descA, sequence );
+            MORSE_Sequence_Wait(sequence);
             STOP_TIMING();
         }
 
@@ -108,8 +111,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
             MORSE_Sequence_Create(&sequence);
             MORSE_zpotrf_Tile_Async(uplo, descA, sequence, &request[0]);
             MORSE_zpotri_Tile_Async(uplo, descA, sequence, &request[1]);
-            MORSE_Sequence_Wait(sequence);
             MORSE_Desc_Flush( descA, sequence );
+            MORSE_Sequence_Wait(sequence);
             STOP_TIMING();
 
             MORSE_Sequence_Destroy(sequence);
diff --git a/tools/analysis.sh b/tools/analysis.sh
index 4635d4d59a1d461d2354a921a5fa9ab787a3d584..9c66eb740735e3ab5a1b448204ffe42b98fcbc05 100755
--- a/tools/analysis.sh
+++ b/tools/analysis.sh
@@ -39,7 +39,7 @@ sonar.sourceEncoding=UTF-8
 sonar.c.compiler.charset=UTF-8
 sonar.c.compiler.parser=GCC
 sonar.c.compiler.regex=^(.*):(\\d+):\\d+: warning: (.*)\\[(.*)\\]$
-sonar.c.compiler.reportPath=chameleon_starpu.log, chameleon_starpu_simgrid.log, chameleon_quark.log
+sonar.c.compiler.reportPath=chameleon_starpu.log, chameleon_starpu_simgrid.log, chameleon_quark.log, chameleon_parsec.log
 sonar.c.coverage.reportPath=chameleon_coverage.xml
 sonar.c.cppcheck.reportPath=chameleon_cppcheck.xml
 sonar.c.rats.reportPath=chameleon_rats.xml