diff --git a/runtime/quark/CMakeLists.txt b/runtime/quark/CMakeLists.txt
index e1cff588501ba375e0b5491167bac6084adf6ce5..c535a55a1929c6a4ed525cb56f033574ba5d0386 100644
--- a/runtime/quark/CMakeLists.txt
+++ b/runtime/quark/CMakeLists.txt
@@ -1,10 +1,10 @@
 ###
 #
-# @copyright (c) 2009-2014 The University of Tennessee and The University
+# @copyright (c) 2009-2015 The University of Tennessee and The University
 #                          of Tennessee Research Foundation.
 #                          All rights reserved.
-# @copyright (c) 2012-2016 Inria. All rights reserved.
-# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
+# @copyright (c) 2012-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
+#                          Univ. Bordeaux. All rights reserved.
 #
 ###
 #
@@ -26,72 +26,80 @@
 #  @date 13-07-2012
 #
 ###
-
 cmake_minimum_required(VERSION 2.8)
 
-# Generate the quark headers for all possible precisions
-# ------------------------------------------------------
-set(RUNTIME_HDRS_GENERATED "")
-set(ZHDR
-  include/quark_zblas.h
-  include/quark_zcblas.h
-)
+include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include )
+include_directories( ${CMAKE_CURRENT_BINARY_DIR}/include )
 
-precisions_rules_py(RUNTIME_HDRS_GENERATED "${ZHDR}"
-                    PRECISIONS "s;d;c;z;ds;zc"
-                    TARGETDIR  "include")
+# # Generate headers for all possible precisions
+# # --------------------------------------------
+# set(RUNTIME_HDRS_GENERATED "")
+# set(ZHDR
+# )
+#
+# precisions_rules_py(RUNTIME_HDRS_GENERATED "${ZHDR}"
+#   PRECISIONS "s;d;c;z;ds;zc"
+#   TARGETDIR  "include")
 
 # Define the list of headers
 # --------------------------
 set(RUNTIME_HDRS
-    include/morse_quark.h
-    include/quark_blas.h
-    include/core_blas_dag.h
-    ${RUNTIME_HDRS_GENERATED}
-    )
+  include/chameleon_quark.h
+  include/core_blas_dag.h
+  )
+
+# # Add generated headers
+# # ---------------------
+# foreach( hdr_file ${RUNTIME_HDRS_GENERATED} )
+#   list(APPEND RUNTIME_HDRS ${CMAKE_CURRENT_BINARY_DIR}/${hdr_file})
+# endforeach()
 
 # Force generation of headers
 # ---------------------------
-add_custom_target(runtime_quark_include ALL SOURCES ${RUNTIME_HDRS})
+add_custom_target(
+  runtime_quark_include
+  ALL SOURCES ${RUNTIME_HDRS})
 
-# installation
+# Installation
 # ------------
-#install(FILES ${RUNTIME_HDRS}
-#        DESTINATION include)
+install(
+  FILES ${RUNTIME_HDRS}
+  DESTINATION include/runtime/quark )
 
-# Generate the morse common for all possible precisions
-# -----------------------------------------------------
+# Generate the Chameleon common for all possible precisions
+# ---------------------------------------------------------
 set(RUNTIME_COMMON_GENERATED "")
 set(ZSRC
-    control/runtime_zprofiling.c
-    control/runtime_zlocality.c
-    )
+  control/runtime_zprofiling.c
+  control/runtime_zlocality.c
+  )
 
-precisions_rules_py(RUNTIME_COMMON_GENERATED "${ZSRC}"
-                    PRECISIONS "${CHAMELEON_PRECISION}"
-                    TARGETDIR "control")
+precisions_rules_py(
+  RUNTIME_COMMON_GENERATED "${ZSRC}"
+  PRECISIONS "${CHAMELEON_PRECISION}"
+  TARGETDIR "control")
 
 set(RUNTIME_COMMON
-    control/runtime_async.c
-    control/runtime_context.c
-    control/runtime_control.c
-    control/runtime_descriptor.c
-    control/runtime_options.c
-    control/runtime_profiling.c
-    codelets/codelet_dataflush.c
-    ${RUNTIME_COMMON_GENERATED}
-    )
-
-# Generate the morse sources for all possible precisions
-# ------------------------------------------------------
+  control/runtime_async.c
+  control/runtime_context.c
+  control/runtime_control.c
+  control/runtime_descriptor.c
+  control/runtime_options.c
+  control/runtime_profiling.c
+  codelets/codelet_dataflush.c
+  ${RUNTIME_COMMON_GENERATED}
+  )
+
+# Generate the Chameleon sources for all possible precisions
+# ----------------------------------------------------------
 set(RUNTIME_SRCS_GENERATED "")
 set(ZSRC
-    ${CODELETS_ZSRC}
-    )
+  ${CODELETS_ZSRC}
+  )
 
 precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"
-                    PRECISIONS "${CHAMELEON_PRECISION}"
-                    TARGETDIR "codelets")
+  PRECISIONS "${CHAMELEON_PRECISION}"
+  TARGETDIR "codelets")
 
 set(RUNTIME_SRCS
   ${RUNTIME_COMMON}
@@ -122,7 +130,7 @@ endif()
 # installation
 # ------------
 install(TARGETS chameleon_quark
-        DESTINATION lib)
+  DESTINATION lib)
 
 ###
 ### END CMakeLists.txt
diff --git a/runtime/quark/codelets/codelet_dataflush.c b/runtime/quark/codelets/codelet_dataflush.c
index 1334e8959aed3ce506bb835f52b17013a3b34153..300f335840c00cbf923f2c7b23ebbf2efeb0a8e4 100644
--- a/runtime/quark/codelets/codelet_dataflush.c
+++ b/runtime/quark/codelets/codelet_dataflush.c
@@ -24,7 +24,7 @@
  * @date 2014-02-05
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 void MORSE_TASK_dataflush(const MORSE_option_t *options,
                           const MORSE_desc_t *A, int Am, int An)
diff --git a/runtime/quark/codelets/codelet_zasum.c b/runtime/quark/codelets/codelet_zasum.c
index 4857e086e0b0a94ecd40e9a8bf5d57466b39c6ab..4dde79a0f28560477a5e7946108c466eb6ec7203 100644
--- a/runtime/quark/codelets/codelet_zasum.c
+++ b/runtime/quark/codelets/codelet_zasum.c
@@ -24,7 +24,22 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_dzasum_quark(Quark *quark)
+{
+    MORSE_enum storev;
+    MORSE_enum uplo;
+    int M;
+    int N;
+    MORSE_Complex64_t *A;
+    int lda;
+    double *work;
+
+    quark_unpack_args_7(quark, storev, uplo, M, N, A, lda, work);
+    CORE_dzasum(storev, uplo, M, N, A, lda, work);
+}
 
 void MORSE_TASK_dzasum(const MORSE_option_t *options,
                        MORSE_enum storev, MORSE_enum uplo, int M, int N,
@@ -43,18 +58,3 @@ void MORSE_TASK_dzasum(const MORSE_option_t *options,
         sizeof(double),                   RTBLKADDR(B, double, Bm, Bn), INOUT,
         0);
 }
-
-
-void CORE_dzasum_quark(Quark *quark)
-{
-    MORSE_enum storev;
-    MORSE_enum uplo;
-    int M;
-    int N;
-    MORSE_Complex64_t *A;
-    int lda;
-    double *work;
-
-    quark_unpack_args_7(quark, storev, uplo, M, N, A, lda, work);
-    CORE_dzasum(storev, uplo, M, N, A, lda, work);
-}
diff --git a/runtime/quark/codelets/codelet_zaxpy.c b/runtime/quark/codelets/codelet_zaxpy.c
index 875471e893bde9d5784a203c6816e947ee89a426..36e76787f8f93257d53ce4018b8d16e3f2a6c80b 100644
--- a/runtime/quark/codelets/codelet_zaxpy.c
+++ b/runtime/quark/codelets/codelet_zaxpy.c
@@ -24,7 +24,21 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zaxpy_quark(Quark *quark)
+{
+    int M;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int incA;
+    MORSE_Complex64_t *B;
+    int incB;
+
+    quark_unpack_args_6(quark, M, alpha, A, incA, B, incB);
+    CORE_zaxpy(M, alpha, A, incA, B, incB);
+}
 
 void MORSE_TASK_zaxpy(const MORSE_option_t *options,
                       int M, MORSE_Complex64_t *alpha,
@@ -42,17 +56,3 @@ void MORSE_TASK_zaxpy(const MORSE_option_t *options,
         sizeof(int),                        &incB,      VALUE,
         0);
 }
-
-
-void CORE_zaxpy_quark(Quark *quark)
-{
-    int M;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int incA;
-    MORSE_Complex64_t *B;
-    int incB;
-
-    quark_unpack_args_6(quark, M, alpha, A, incA, B, incB);
-    CORE_zaxpy(M, alpha, A, incA, B, incB);
-}
diff --git a/runtime/quark/codelets/codelet_zbuild.c b/runtime/quark/codelets/codelet_zbuild.c
index 68f115ecf9af21ba47d73bcb20a9186558be3def..7e88fd1a172570585644e4605db82c1c412518c0 100644
--- a/runtime/quark/codelets/codelet_zbuild.c
+++ b/runtime/quark/codelets/codelet_zbuild.c
@@ -29,9 +29,21 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
+void CORE_zbuild_quark(Quark *quark)
+{
+    MORSE_Complex64_t *A;
+    int lda;
+    void *user_data;
+    void (*user_build_callback)(int row_min, int row_max, int col_min, int col_max, void *buffer, int ld, void *user_data) ;
+    int row_min, row_max, col_min, col_max;
 
+    quark_unpack_args_8( quark, row_min, row_max, col_min, col_max, A, lda, user_data, user_build_callback);
+
+    user_build_callback(row_min, row_max, col_min, col_max, A, lda, user_data);
+}
 
 void MORSE_TASK_zbuild( const MORSE_option_t *options,
                         const MORSE_desc_t *A, int Am, int An, int lda,
@@ -46,28 +58,13 @@ void MORSE_TASK_zbuild( const MORSE_option_t *options,
     col_max = An == A->nt-1 ? A->n-1 : col_min+A->nb-1 ;
 
     QUARK_Insert_Task(opt->quark, CORE_zbuild_quark, (Quark_Task_Flags*)opt,
-        sizeof(int),                      &row_min,    VALUE,
-        sizeof(int),                      &row_max,    VALUE,
-        sizeof(int),                      &col_min,    VALUE,
-        sizeof(int),                      &col_max,    VALUE,
-        sizeof(MORSE_Complex64_t)*lda*A->nb, RTBLKADDR(A, MORSE_Complex64_t, Am, An),         OUTPUT,
-        sizeof(int),                      &lda,  VALUE,
-        sizeof(void*),                    &user_data,  VALUE,
-        sizeof(void*),                    &user_build_callback,   VALUE,
-        0);
-}
-
-
-void CORE_zbuild_quark(Quark *quark)
-{
-    MORSE_Complex64_t *A;
-    int lda;
-    void *user_data;
-    void (*user_build_callback)(int row_min, int row_max, int col_min, int col_max, void *buffer, int ld, void *user_data) ;
-    int row_min, row_max, col_min, col_max;
-
-    quark_unpack_args_8( quark, row_min, row_max, col_min, col_max, A, lda, user_data, user_build_callback);
-
-    user_build_callback(row_min, row_max, col_min, col_max, A, lda, user_data);
+                      sizeof(int),                      &row_min,    VALUE,
+                      sizeof(int),                      &row_max,    VALUE,
+                      sizeof(int),                      &col_min,    VALUE,
+                      sizeof(int),                      &col_max,    VALUE,
+                      sizeof(MORSE_Complex64_t)*lda*A->nb, RTBLKADDR(A, MORSE_Complex64_t, Am, An),         OUTPUT,
+                      sizeof(int),                      &lda,  VALUE,
+                      sizeof(void*),                    &user_data,  VALUE,
+                      sizeof(void*),                    &user_build_callback,   VALUE,
+                      0);
 }
-
diff --git a/runtime/quark/codelets/codelet_zgeadd.c b/runtime/quark/codelets/codelet_zgeadd.c
index 4fc1c22cf51d29cebf820a9b39442e753686dc5e..f97921b5b91b8912ff50ffbb8e14cce6b80cc5da 100644
--- a/runtime/quark/codelets/codelet_zgeadd.c
+++ b/runtime/quark/codelets/codelet_zgeadd.c
@@ -26,7 +26,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_zgeadd_quark(Quark *quark)
 {
diff --git a/runtime/quark/codelets/codelet_zgelqt.c b/runtime/quark/codelets/codelet_zgelqt.c
index a0cc3b1f88ceb70d2c13dea1bd613d1384a742c0..e41d566f6cc1f92bba0cbdc3cc6a456110852d21 100644
--- a/runtime/quark/codelets/codelet_zgelqt.c
+++ b/runtime/quark/codelets/codelet_zgelqt.c
@@ -29,7 +29,24 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zgelqt_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *TAU;
+    MORSE_Complex64_t *WORK;
+
+    quark_unpack_args_9(quark, m, n, ib, A, lda, T, ldt, TAU, WORK);
+    CORE_zgelqt(m, n, ib, A, lda, T, ldt, TAU, WORK);
+}
 
 /**
  *
@@ -92,7 +109,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zgelqt(const MORSE_option_t *options,
                        int m, int n, int ib, int nb,
                        const MORSE_desc_t *A, int Am, int An, int lda,
@@ -112,20 +128,3 @@ void MORSE_TASK_zgelqt(const MORSE_option_t *options,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,          SCRATCH,
         0);
 }
-
-
-void CORE_zgelqt_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *TAU;
-    MORSE_Complex64_t *WORK;
-
-    quark_unpack_args_9(quark, m, n, ib, A, lda, T, ldt, TAU, WORK);
-    CORE_zgelqt(m, n, ib, A, lda, T, ldt, TAU, WORK);
-}
diff --git a/runtime/quark/codelets/codelet_zgemm.c b/runtime/quark/codelets/codelet_zgemm.c
index b83bee0aaf36bc5831ba01fbbacf18c30e340857..0e06cef9c6097f18a49cb3e6ef59eefea15efabc 100644
--- a/runtime/quark/codelets/codelet_zgemm.c
+++ b/runtime/quark/codelets/codelet_zgemm.c
@@ -28,41 +28,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
-
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
-
-void MORSE_TASK_zgemm(const MORSE_option_t *options,
-                      MORSE_enum transA, int transB,
-                      int m, int n, int k, int nb,
-                      MORSE_Complex64_t alpha, const MORSE_desc_t *A, int Am, int An, int lda,
-                                                const MORSE_desc_t *B, int Bm, int Bn, int ldb,
-                      MORSE_Complex64_t beta, const MORSE_desc_t *C, int Cm, int Cn, int ldc)
-{
-    quark_option_t *opt = (quark_option_t*)(options->schedopt);
-    DAG_CORE_GEMM;
-    QUARK_Insert_Task(opt->quark, CORE_zgemm_quark, (Quark_Task_Flags*)opt,
-        sizeof(MORSE_enum),                &transA,    VALUE,
-        sizeof(MORSE_enum),                &transB,    VALUE,
-        sizeof(int),                        &m,         VALUE,
-        sizeof(int),                        &n,         VALUE,
-        sizeof(int),                        &k,         VALUE,
-        sizeof(MORSE_Complex64_t),         &alpha,     VALUE,
-        sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex64_t, Am, An),                 INPUT,
-        sizeof(int),                        &lda,       VALUE,
-        sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn),                 INPUT,
-        sizeof(int),                        &ldb,       VALUE,
-        sizeof(MORSE_Complex64_t),         &beta,      VALUE,
-        sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(C, MORSE_Complex64_t, Cm, Cn),                 INOUT,
-        sizeof(int),                        &ldc,       VALUE,
-        0);
-}
-
-
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_zgemm_quark(Quark *quark)
 {
@@ -82,16 +49,34 @@ void CORE_zgemm_quark(Quark *quark)
 
     quark_unpack_args_13(quark, transA, transB, m, n, k, alpha, A, lda, B, ldb, beta, C, ldc);
     CORE_zgemm(transA, transB,
-        m, n, k,
-        alpha, A, lda,
-        B, ldb,
-        beta, C, ldc);
+               m, n, k,
+               alpha, A, lda,
+               B, ldb,
+               beta, C, ldc);
 }
 
-
-
-
-
-
-
-
+void MORSE_TASK_zgemm(const MORSE_option_t *options,
+                      MORSE_enum transA, int transB,
+                      int m, int n, int k, int nb,
+                      MORSE_Complex64_t alpha, const MORSE_desc_t *A, int Am, int An, int lda,
+                      const MORSE_desc_t *B, int Bm, int Bn, int ldb,
+                      MORSE_Complex64_t beta, const MORSE_desc_t *C, int Cm, int Cn, int ldc)
+{
+    quark_option_t *opt = (quark_option_t*)(options->schedopt);
+    DAG_CORE_GEMM;
+    QUARK_Insert_Task(opt->quark, CORE_zgemm_quark, (Quark_Task_Flags*)opt,
+                      sizeof(MORSE_enum),                &transA,    VALUE,
+                      sizeof(MORSE_enum),                &transB,    VALUE,
+                      sizeof(int),                        &m,         VALUE,
+                      sizeof(int),                        &n,         VALUE,
+                      sizeof(int),                        &k,         VALUE,
+                      sizeof(MORSE_Complex64_t),         &alpha,     VALUE,
+                      sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex64_t, Am, An),                 INPUT,
+                      sizeof(int),                        &lda,       VALUE,
+                      sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn),                 INPUT,
+                      sizeof(int),                        &ldb,       VALUE,
+                      sizeof(MORSE_Complex64_t),         &beta,      VALUE,
+                      sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(C, MORSE_Complex64_t, Cm, Cn),                 INOUT,
+                      sizeof(int),                        &ldc,       VALUE,
+                      0);
+}
diff --git a/runtime/quark/codelets/codelet_zgeqrt.c b/runtime/quark/codelets/codelet_zgeqrt.c
index d1906b28da022d7e311541ae8d25b8caf9b3ca8f..1b8680211f9ef82136bea8316b11b1c90098ac0c 100644
--- a/runtime/quark/codelets/codelet_zgeqrt.c
+++ b/runtime/quark/codelets/codelet_zgeqrt.c
@@ -28,8 +28,24 @@
  * @precisions normal z -> c d s
  *
  **/
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_zgeqrt_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *TAU;
+    MORSE_Complex64_t *WORK;
+
+    quark_unpack_args_9(quark, m, n, ib, A, lda, T, ldt, TAU, WORK);
+    CORE_zgeqrt(m, n, ib, A, lda, T, ldt, TAU, WORK);
+}
 
 /**
  *
@@ -93,7 +109,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zgeqrt(const MORSE_option_t *options,
                        int m, int n, int ib, int nb,
                        const MORSE_desc_t *A, int Am, int An, int lda,
@@ -113,20 +128,3 @@ void MORSE_TASK_zgeqrt(const MORSE_option_t *options,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,          SCRATCH,
         0);
 }
-
-
-void CORE_zgeqrt_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *TAU;
-    MORSE_Complex64_t *WORK;
-
-    quark_unpack_args_9(quark, m, n, ib, A, lda, T, ldt, TAU, WORK);
-    CORE_zgeqrt(m, n, ib, A, lda, T, ldt, TAU, WORK);
-}
diff --git a/runtime/quark/codelets/codelet_zgessm.c b/runtime/quark/codelets/codelet_zgessm.c
index e4e767a7b079a5aa99158e1621128c23c86300c2..9ce245661aa49bd3967f76bbf5044abcba9f4690 100644
--- a/runtime/quark/codelets/codelet_zgessm.c
+++ b/runtime/quark/codelets/codelet_zgessm.c
@@ -29,8 +29,26 @@
  *
  **/
 #include "coreblas/cblas.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_zgessm_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int k;
+    int ib;
+    int *IPIV;
+    MORSE_Complex64_t *L;
+    int ldl;
+    MORSE_Complex64_t *D;
+    int ldd;
+    MORSE_Complex64_t *A;
+    int lda;
+
+    quark_unpack_args_11(quark, m, n, k, ib, IPIV, L, ldl, D, ldd, A, lda);
+    CORE_zgessm(m, n, k, ib, IPIV, D, ldd, A, lda);
+}
 
 /***************************************************************************//**
  *
@@ -77,7 +95,6 @@
  *         \retval <0 if INFO = -k, the k-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zgessm(const MORSE_option_t *options,
                        int m, int n, int k, int ib, int nb,
                        int *IPIV,
@@ -101,22 +118,3 @@ void MORSE_TASK_zgessm(const MORSE_option_t *options,
         sizeof(int),                        &lda,   VALUE,
         0);
 }
-
-
-void CORE_zgessm_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int k;
-    int ib;
-    int *IPIV;
-    MORSE_Complex64_t *L;
-    int ldl;
-    MORSE_Complex64_t *D;
-    int ldd;
-    MORSE_Complex64_t *A;
-    int lda;
-
-    quark_unpack_args_11(quark, m, n, k, ib, IPIV, L, ldl, D, ldd, A, lda);
-    CORE_zgessm(m, n, k, ib, IPIV, D, ldd, A, lda);
-}
diff --git a/runtime/quark/codelets/codelet_zgessq.c b/runtime/quark/codelets/codelet_zgessq.c
index 546dad02a51104e5c630938ad9e39d16025450d7..632c18b1cbcef1893adfe189abaa19fafe7dd1ee 100644
--- a/runtime/quark/codelets/codelet_zgessq.c
+++ b/runtime/quark/codelets/codelet_zgessq.c
@@ -24,23 +24,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
-
-void MORSE_TASK_zgessq( const MORSE_option_t *options,
-                        int m, int n,
-                        const MORSE_desc_t *A, int Am, int An, int lda,
-                        const MORSE_desc_t *SCALESUMSQ, int SCALESUMSQm, int SCALESUMSQn )
-{
-    quark_option_t *opt = (quark_option_t*)(options->schedopt);
-    QUARK_Insert_Task(opt->quark, CORE_zgessq_quark, (Quark_Task_Flags*)opt,
-        sizeof(int),                     &m,    VALUE,
-        sizeof(int),                     &n,    VALUE,
-        sizeof(MORSE_Complex64_t)*lda*n, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT,
-        sizeof(int),                     &lda,  VALUE,
-        sizeof(double)*2,                RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn), INOUT,
-        0);
-}
-
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_zgessq_quark(Quark *quark)
 {
@@ -53,3 +38,18 @@ void CORE_zgessq_quark(Quark *quark)
     quark_unpack_args_5( quark, m, n, A, lda, SCALESUMSQ );
     CORE_zgessq( m, n, A, lda, &SCALESUMSQ[0], &SCALESUMSQ[1]);
 }
+
+void MORSE_TASK_zgessq( const MORSE_option_t *options,
+                        int m, int n,
+                        const MORSE_desc_t *A, int Am, int An, int lda,
+                        const MORSE_desc_t *SCALESUMSQ, int SCALESUMSQm, int SCALESUMSQn )
+{
+    quark_option_t *opt = (quark_option_t*)(options->schedopt);
+    QUARK_Insert_Task(opt->quark, CORE_zgessq_quark, (Quark_Task_Flags*)opt,
+                      sizeof(int),                     &m,    VALUE,
+                      sizeof(int),                     &n,    VALUE,
+                      sizeof(MORSE_Complex64_t)*lda*n, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT,
+                      sizeof(int),                     &lda,  VALUE,
+                      sizeof(double)*2,                RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn), INOUT,
+                      0);
+}
diff --git a/runtime/quark/codelets/codelet_zgetrf.c b/runtime/quark/codelets/codelet_zgetrf.c
index e9e62c4ce1c6a49bb2a7a6d3cd381be1d628ea8d..5888529c6a8a5b784d2fc48299ed0de91a774256 100644
--- a/runtime/quark/codelets/codelet_zgetrf.c
+++ b/runtime/quark/codelets/codelet_zgetrf.c
@@ -27,7 +27,27 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zgetrf_quark(Quark *quark)
+{
+    int m;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    int *IPIV;
+    MORSE_sequence_t *sequence;
+    MORSE_request_t *request;
+    MORSE_bool check_info;
+    int iinfo;
+    int info;
+
+    quark_unpack_args_9(quark, m, n, A, lda, IPIV, sequence, request, check_info, iinfo);
+    CORE_zgetrf( m, n, A, lda, IPIV, &info );
+    if (info != MORSE_SUCCESS && check_info)
+        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
+}
 
 void MORSE_TASK_zgetrf(const MORSE_option_t *options,
                        int m, int n, int nb,
@@ -49,23 +69,3 @@ void MORSE_TASK_zgetrf(const MORSE_option_t *options,
         sizeof(int),                        &iinfo,         VALUE,
         0);
 }
-
-
-void CORE_zgetrf_quark(Quark *quark)
-{
-    int m;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    int *IPIV;
-    MORSE_sequence_t *sequence;
-    MORSE_request_t *request;
-    MORSE_bool check_info;
-    int iinfo;
-    int info;
-
-    quark_unpack_args_9(quark, m, n, A, lda, IPIV, sequence, request, check_info, iinfo);
-    CORE_zgetrf( m, n, A, lda, IPIV, &info );
-    if (info != MORSE_SUCCESS && check_info)
-        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
-}
diff --git a/runtime/quark/codelets/codelet_zgetrf_incpiv.c b/runtime/quark/codelets/codelet_zgetrf_incpiv.c
index d383dd2f5e0f66239cfdc6b4c298a688d79a8836..2c1b8388a4f4627f8d0712900fe75cb2cb72c37c 100644
--- a/runtime/quark/codelets/codelet_zgetrf_incpiv.c
+++ b/runtime/quark/codelets/codelet_zgetrf_incpiv.c
@@ -28,8 +28,29 @@
  * @precisions normal z -> c d s
  *
  **/
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_zgetrf_incpiv_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A;
+    int lda;
+    int *IPIV;
+    MORSE_sequence_t *sequence;
+    MORSE_request_t *request;
+    MORSE_bool check_info;
+    int iinfo;
+
+    int info;
+
+    quark_unpack_args_10(quark, m, n, ib, A, lda, IPIV, sequence, request, check_info, iinfo);
+    CORE_zgetrf_incpiv(m, n, ib, A, lda, IPIV, &info);
+    if (info != MORSE_SUCCESS && check_info)
+        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
+}
 
 /***************************************************************************//**
  *
@@ -85,7 +106,6 @@
  *              to solve a system of equations.
  *
  ******************************************************************************/
-
 void MORSE_TASK_zgetrf_incpiv(const MORSE_option_t *options,
                               int m, int n, int ib, int nb,
                               const MORSE_desc_t *A, int Am, int An, int lda,
@@ -110,25 +130,3 @@ void MORSE_TASK_zgetrf_incpiv(const MORSE_option_t *options,
 
     (void)L; (void)Lm; (void)Ln; (void)ldl;
 }
-
-
-void CORE_zgetrf_incpiv_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A;
-    int lda;
-    int *IPIV;
-    MORSE_sequence_t *sequence;
-    MORSE_request_t *request;
-    MORSE_bool check_info;
-    int iinfo;
-
-    int info;
-
-    quark_unpack_args_10(quark, m, n, ib, A, lda, IPIV, sequence, request, check_info, iinfo);
-    CORE_zgetrf_incpiv(m, n, ib, A, lda, IPIV, &info);
-    if (info != MORSE_SUCCESS && check_info)
-        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
-}
diff --git a/runtime/quark/codelets/codelet_zgetrf_nopiv.c b/runtime/quark/codelets/codelet_zgetrf_nopiv.c
index 19bb17f1b35252020c395d1d7fde0cde2f8980e9..10f0310522a247c3b7bba9e839aa2f78418511f7 100644
--- a/runtime/quark/codelets/codelet_zgetrf_nopiv.c
+++ b/runtime/quark/codelets/codelet_zgetrf_nopiv.c
@@ -25,7 +25,26 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zgetrf_nopiv_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_sequence_t *sequence;
+    MORSE_request_t *request;
+    int iinfo;
+    int info;
+
+    quark_unpack_args_8(quark, m, n, ib, A, lda, sequence, request, iinfo);
+    CORE_zgetrf_nopiv(m, n, ib, A, lda, &info);
+    if (info != MORSE_SUCCESS)
+        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
+}
 
 /***************************************************************************//**
  *
@@ -74,7 +93,6 @@
  *              to solve a system of equations.
  *
  ******************************************************************************/
-
 void MORSE_TASK_zgetrf_nopiv(const MORSE_option_t *options,
                              int m, int n, int ib, int nb,
                              const MORSE_desc_t *A, int Am, int An, int lda,
@@ -94,22 +112,3 @@ void MORSE_TASK_zgetrf_nopiv(const MORSE_option_t *options,
         sizeof(int),                        &iinfo,         VALUE,
         0);
 }
-
-
-void CORE_zgetrf_nopiv_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_sequence_t *sequence;
-    MORSE_request_t *request;
-    int iinfo;
-    int info;
-
-    quark_unpack_args_8(quark, m, n, ib, A, lda, sequence, request, iinfo);
-    CORE_zgetrf_nopiv(m, n, ib, A, lda, &info);
-    if (info != MORSE_SUCCESS)
-        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
-}
diff --git a/runtime/quark/codelets/codelet_zhe2ge.c b/runtime/quark/codelets/codelet_zhe2ge.c
index 474ea51dc999960f1652babf576802616000efa8..702a86eb5ee67a62da44b862259412bba5db8ccd 100644
--- a/runtime/quark/codelets/codelet_zhe2ge.c
+++ b/runtime/quark/codelets/codelet_zhe2ge.c
@@ -20,7 +20,8 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 /**
  *
diff --git a/runtime/quark/codelets/codelet_zhemm.c b/runtime/quark/codelets/codelet_zhemm.c
index b814fe2322ef7c50df98ee04d7144fce80d5607c..77461f1d051b8715699017d9b8de2edfd37cb3c8 100644
--- a/runtime/quark/codelets/codelet_zhemm.c
+++ b/runtime/quark/codelets/codelet_zhemm.c
@@ -28,16 +28,31 @@
  * @precisions normal z -> c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#undef REAL
-#define COMPLEX
-#ifdef COMPLEX
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_zhemm_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum uplo;
+    int M;
+    int N;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int LDA;
+    MORSE_Complex64_t *B;
+    int LDB;
+    MORSE_Complex64_t beta;
+    MORSE_Complex64_t *C;
+    int LDC;
+
+    quark_unpack_args_12(quark, side, uplo, M, N, alpha, A, LDA, B, LDB, beta, C, LDC);
+    CORE_zhemm(side, uplo,
+        M, N,
+        alpha, A, LDA,
+        B, LDB,
+        beta, C, LDC);
+}
 
 void MORSE_TASK_zhemm(const MORSE_option_t *options,
                       MORSE_enum side, MORSE_enum uplo,
@@ -64,27 +79,3 @@ void MORSE_TASK_zhemm(const MORSE_option_t *options,
         0);
 }
 
-
-void CORE_zhemm_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum uplo;
-    int M;
-    int N;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int LDA;
-    MORSE_Complex64_t *B;
-    int LDB;
-    MORSE_Complex64_t beta;
-    MORSE_Complex64_t *C;
-    int LDC;
-
-    quark_unpack_args_12(quark, side, uplo, M, N, alpha, A, LDA, B, LDB, beta, C, LDC);
-    CORE_zhemm(side, uplo,
-        M, N,
-        alpha, A, LDA,
-        B, LDB,
-        beta, C, LDC);
-}
-#endif
diff --git a/runtime/quark/codelets/codelet_zher2k.c b/runtime/quark/codelets/codelet_zher2k.c
index bb4c07e431f5a505db44327e31a420bcf7f721dc..b78a8c1e19cd447af3fc08fe5876392cd548ffaa 100644
--- a/runtime/quark/codelets/codelet_zher2k.c
+++ b/runtime/quark/codelets/codelet_zher2k.c
@@ -28,16 +28,28 @@
  * @precisions normal z -> c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#undef REAL
-#define COMPLEX
-#ifdef COMPLEX
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_zher2k_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    MORSE_enum trans;
+    int n;
+    int k;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *B;
+    int ldb;
+    double beta;
+    MORSE_Complex64_t *C;
+    int ldc;
+
+    quark_unpack_args_12(quark, uplo, trans, n, k, alpha, A, lda, B, ldb, beta, C, ldc);
+    CORE_zher2k(uplo, trans,
+                n, k, alpha, A, lda, B, ldb, beta, C, ldc);
+}
 
 void MORSE_TASK_zher2k(const MORSE_option_t *options,
                        MORSE_enum uplo, MORSE_enum trans,
@@ -63,25 +75,3 @@ void MORSE_TASK_zher2k(const MORSE_option_t *options,
         sizeof(int),                        &ldc,       VALUE,
         0);
 }
-
-
-void CORE_zher2k_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    MORSE_enum trans;
-    int n;
-    int k;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *B;
-    int ldb;
-    double beta;
-    MORSE_Complex64_t *C;
-    int ldc;
-
-    quark_unpack_args_12(quark, uplo, trans, n, k, alpha, A, lda, B, ldb, beta, C, ldc);
-    CORE_zher2k(uplo, trans,
-                n, k, alpha, A, lda, B, ldb, beta, C, ldc);
-}
-#endif
diff --git a/runtime/quark/codelets/codelet_zherfb.c b/runtime/quark/codelets/codelet_zherfb.c
index b254c1ed1439c342fce00883fac2b9d384e92cb1..7d4224f905fc21b199d4d38cf3776048f9da7da9 100644
--- a/runtime/quark/codelets/codelet_zherfb.c
+++ b/runtime/quark/codelets/codelet_zherfb.c
@@ -22,7 +22,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_zherfb_quark(Quark *quark)
 {
diff --git a/runtime/quark/codelets/codelet_zherk.c b/runtime/quark/codelets/codelet_zherk.c
index 27cb1df902d35bfa491e56b244f4d121d88539c5..4911c7132aa12234ea59e6f7398412bed88f1af3 100644
--- a/runtime/quark/codelets/codelet_zherk.c
+++ b/runtime/quark/codelets/codelet_zherk.c
@@ -28,16 +28,28 @@
  * @precisions normal z -> c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#undef REAL
-#define COMPLEX
-#ifdef COMPLEX
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_zherk_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    MORSE_enum trans;
+    int n;
+    int k;
+    double alpha;
+    MORSE_Complex64_t *A;
+    int lda;
+    double beta;
+    MORSE_Complex64_t *C;
+    int ldc;
+
+    quark_unpack_args_10(quark, uplo, trans, n, k, alpha, A, lda, beta, C, ldc);
+    CORE_zherk(uplo, trans,
+        n, k,
+        alpha, A, lda,
+        beta, C, ldc);
+}
 
 void MORSE_TASK_zherk(const MORSE_option_t *options,
                       MORSE_enum uplo, MORSE_enum trans,
@@ -60,25 +72,3 @@ void MORSE_TASK_zherk(const MORSE_option_t *options,
         sizeof(int),                        &ldc,       VALUE,
         0);
 }
-
-
-void CORE_zherk_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    MORSE_enum trans;
-    int n;
-    int k;
-    double alpha;
-    MORSE_Complex64_t *A;
-    int lda;
-    double beta;
-    MORSE_Complex64_t *C;
-    int ldc;
-
-    quark_unpack_args_10(quark, uplo, trans, n, k, alpha, A, lda, beta, C, ldc);
-    CORE_zherk(uplo, trans,
-        n, k,
-        alpha, A, lda,
-        beta, C, ldc);
-}
-#endif
diff --git a/runtime/quark/codelets/codelet_zhessq.c b/runtime/quark/codelets/codelet_zhessq.c
index 34d026a9458fc50ed6c0587b5b3d79c8b142faca..f7fc02d9aaaaf6663acf5b549c5cc5c680701357 100644
--- a/runtime/quark/codelets/codelet_zhessq.c
+++ b/runtime/quark/codelets/codelet_zhessq.c
@@ -24,7 +24,20 @@
  * @precisions normal z -> c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zhessq_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    double *SCALESUMSQ;
+
+    quark_unpack_args_5( quark, uplo, n, A, lda, SCALESUMSQ );
+    CORE_zhessq( uplo, n, A, lda, &SCALESUMSQ[0], &SCALESUMSQ[1]);
+}
 
 void MORSE_TASK_zhessq( const MORSE_option_t *options,
                         MORSE_enum uplo, int n,
@@ -40,16 +53,3 @@ void MORSE_TASK_zhessq( const MORSE_option_t *options,
         sizeof(double)*2,                RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn), INOUT,
         0);
 }
-
-
-void CORE_zhessq_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    double *SCALESUMSQ;
-
-    quark_unpack_args_5( quark, uplo, n, A, lda, SCALESUMSQ );
-    CORE_zhessq( uplo, n, A, lda, &SCALESUMSQ[0], &SCALESUMSQ[1]);
-}
diff --git a/runtime/quark/codelets/codelet_zlacpy.c b/runtime/quark/codelets/codelet_zlacpy.c
index ee78ca67bd681bda611b3543afef8ec423573cd9..11d6dc67fb58ef8e28484ec3c6e42949624e4777 100644
--- a/runtime/quark/codelets/codelet_zlacpy.c
+++ b/runtime/quark/codelets/codelet_zlacpy.c
@@ -29,13 +29,9 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
 static inline void CORE_zlacpy_quark(Quark *quark)
 {
     MORSE_enum uplo;
diff --git a/runtime/quark/codelets/codelet_zlag2c.c b/runtime/quark/codelets/codelet_zlag2c.c
index 0267ddc258d5384f1eb962bdf8e34b8d0d671f05..6e04898194e498fb2ca791f12a52b70968930516 100644
--- a/runtime/quark/codelets/codelet_zlag2c.c
+++ b/runtime/quark/codelets/codelet_zlag2c.c
@@ -27,33 +27,8 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
-
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
-void MORSE_TASK_zlag2c(const MORSE_option_t *options,
-                       int m, int n, int nb,
-                       const MORSE_desc_t *A, int Am, int An, int lda,
-                       const MORSE_desc_t *B, int Bm, int Bn, int ldb)
-{
-    quark_option_t *opt = (quark_option_t*)(options->schedopt);
-    DAG_CORE_LAG2C;
-    QUARK_Insert_Task(opt->quark, CORE_zlag2c_quark, (Quark_Task_Flags*)opt,
-        sizeof(int),                        &m,         VALUE,
-        sizeof(int),                        &n,         VALUE,
-        sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex64_t, Am, An),                 INPUT,
-        sizeof(int),                        &lda,       VALUE,
-        sizeof(MORSE_Complex32_t)*nb*nb,    RTBLKADDR(B, MORSE_Complex32_t, Bm, Bn),                 OUTPUT,
-        sizeof(int),                        &ldb,       VALUE,
-        sizeof(MORSE_sequence_t*),           &(options->sequence),  VALUE,
-        sizeof(MORSE_request_t*),            &(options->request),   VALUE,
-        0);
-}
-
-
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_zlag2c_quark(Quark *quark)
 {
@@ -73,28 +48,25 @@ void CORE_zlag2c_quark(Quark *quark)
         RUNTIME_sequence_flush(quark, sequence, request, info);
 }
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
-
-void MORSE_TASK_clag2z(const MORSE_option_t *options,
+void MORSE_TASK_zlag2c(const MORSE_option_t *options,
                        int m, int n, int nb,
                        const MORSE_desc_t *A, int Am, int An, int lda,
                        const MORSE_desc_t *B, int Bm, int Bn, int ldb)
 {
-    QUARK_Insert_Task(opt->quark, CORE_clag2z_quark, (Quark_Task_Flags*)opt,
-        sizeof(int),                        &m,     VALUE,
-        sizeof(int),                        &n,     VALUE,
-        sizeof(MORSE_Complex32_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex32_t, Am, An),             INPUT,
-        sizeof(int),                        &lda,   VALUE,
-        sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn),             INOUT,
-        sizeof(int),                        &ldb,   VALUE,
-        0);
+    quark_option_t *opt = (quark_option_t*)(options->schedopt);
+    DAG_CORE_LAG2C;
+    QUARK_Insert_Task(opt->quark, CORE_zlag2c_quark, (Quark_Task_Flags*)opt,
+                      sizeof(int),                        &m,         VALUE,
+                      sizeof(int),                        &n,         VALUE,
+                      sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex64_t, Am, An),                 INPUT,
+                      sizeof(int),                        &lda,       VALUE,
+                      sizeof(MORSE_Complex32_t)*nb*nb,    RTBLKADDR(B, MORSE_Complex32_t, Bm, Bn),                 OUTPUT,
+                      sizeof(int),                        &ldb,       VALUE,
+                      sizeof(MORSE_sequence_t*),           &(options->sequence),  VALUE,
+                      sizeof(MORSE_request_t*),            &(options->request),   VALUE,
+                      0);
 }
 
-
 void CORE_clag2z_quark(Quark *quark)
 {
     int m;
@@ -108,3 +80,17 @@ void CORE_clag2z_quark(Quark *quark)
     CORE_clag2z( m, n, A, lda, B, ldb);
 }
 
+void MORSE_TASK_clag2z(const MORSE_option_t *options,
+                       int m, int n, int nb,
+                       const MORSE_desc_t *A, int Am, int An, int lda,
+                       const MORSE_desc_t *B, int Bm, int Bn, int ldb)
+{
+    QUARK_Insert_Task(opt->quark, CORE_clag2z_quark, (Quark_Task_Flags*)opt,
+                      sizeof(int),                        &m,     VALUE,
+                      sizeof(int),                        &n,     VALUE,
+                      sizeof(MORSE_Complex32_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex32_t, Am, An),             INPUT,
+                      sizeof(int),                        &lda,   VALUE,
+                      sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(B, MORSE_Complex64_t, Bm, Bn),             INOUT,
+                      sizeof(int),                        &ldb,   VALUE,
+                      0);
+}
diff --git a/runtime/quark/codelets/codelet_zlange.c b/runtime/quark/codelets/codelet_zlange.c
index e3a6b92ec1453b0ddb2c284cfb70f15f60674bfd..f492d7eaaaa181d8bd6c4516b03a988d87b9e1ab 100644
--- a/runtime/quark/codelets/codelet_zlange.c
+++ b/runtime/quark/codelets/codelet_zlange.c
@@ -27,7 +27,22 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zlange_quark(Quark *quark)
+{
+    double *normA;
+    MORSE_enum norm;
+    int M;
+    int N;
+    MORSE_Complex64_t *A;
+    int LDA;
+    double *work;
+
+    quark_unpack_args_7(quark, norm, M, N, A, LDA, work, normA);
+    CORE_zlange( norm, M, N, A, LDA, work, normA);
+}
 
 void MORSE_TASK_zlange(const MORSE_option_t *options,
                        MORSE_enum norm, int M, int N, int NB,
@@ -49,21 +64,16 @@ void MORSE_TASK_zlange(const MORSE_option_t *options,
         0);
 }
 
-void CORE_zlange_quark(Quark *quark)
+void CORE_zlange_max_quark(Quark *quark)
 {
+    double *A;
     double *normA;
-    MORSE_enum norm;
-    int M;
-    int N;
-    MORSE_Complex64_t *A;
-    int LDA;
-    double *work;
 
-    quark_unpack_args_7(quark, norm, M, N, A, LDA, work, normA);
-    CORE_zlange( norm, M, N, A, LDA, work, normA);
+    quark_unpack_args_2(quark, A, normA);
+    if ( A[0] > *normA )
+        *normA = A[0];
 }
 
-
 void MORSE_TASK_zlange_max(const MORSE_option_t *options,
                            const MORSE_desc_t *A, int Am, int An,
                            const MORSE_desc_t *B, int Bm, int Bn)
@@ -77,14 +87,3 @@ void MORSE_TASK_zlange_max(const MORSE_option_t *options,
         0);
 }
 
-
-void CORE_zlange_max_quark(Quark *quark)
-{
-    double *A;
-    double *normA;
-
-    quark_unpack_args_2(quark, A, normA);
-    if ( A[0] > *normA )
-        *normA = A[0];
-}
-
diff --git a/runtime/quark/codelets/codelet_zlanhe.c b/runtime/quark/codelets/codelet_zlanhe.c
index 70ab4cf8f7d4cf9b266fd5426c914b1ced81b211..82e6bbdd2d16de8808bbfbe3e243903d04230df2 100644
--- a/runtime/quark/codelets/codelet_zlanhe.c
+++ b/runtime/quark/codelets/codelet_zlanhe.c
@@ -27,7 +27,22 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zlanhe_quark(Quark *quark)
+{
+    double *normA;
+    MORSE_enum norm;
+    MORSE_enum uplo;
+    int N;
+    MORSE_Complex64_t *A;
+    int LDA;
+    double *work;
+
+    quark_unpack_args_7(quark, norm, uplo, N, A, LDA, work, normA);
+    CORE_zlanhe( norm, uplo, N, A, LDA, work, normA);
+}
 
 void MORSE_TASK_zlanhe(const MORSE_option_t *options,
                        MORSE_enum norm, MORSE_enum uplo, int N, int NB,
@@ -48,17 +63,3 @@ void MORSE_TASK_zlanhe(const MORSE_option_t *options,
         sizeof(double),                  RTBLKADDR(B, double, Bm, Bn), OUTPUT,
         0);
 }
-
-void CORE_zlanhe_quark(Quark *quark)
-{
-    double *normA;
-    MORSE_enum norm;
-    MORSE_enum uplo;
-    int N;
-    MORSE_Complex64_t *A;
-    int LDA;
-    double *work;
-
-    quark_unpack_args_7(quark, norm, uplo, N, A, LDA, work, normA);
-    CORE_zlanhe( norm, uplo, N, A, LDA, work, normA);
-}
diff --git a/runtime/quark/codelets/codelet_zlansy.c b/runtime/quark/codelets/codelet_zlansy.c
index 43e2132e17912a2bc6823195910b0119b1ac734c..c1d7f5020efc193b83918013c85bbe7baa7a0109 100644
--- a/runtime/quark/codelets/codelet_zlansy.c
+++ b/runtime/quark/codelets/codelet_zlansy.c
@@ -27,7 +27,22 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zlansy_quark(Quark *quark)
+{
+    double *normA;
+    int norm;
+    MORSE_enum uplo;
+    int N;
+    MORSE_Complex64_t *A;
+    int LDA;
+    double *work;
+
+    quark_unpack_args_7(quark, norm, uplo, N, A, LDA, work, normA);
+    CORE_zlansy( norm, uplo, N, A, LDA, work, normA);
+}
 
 void MORSE_TASK_zlansy(const MORSE_option_t *options,
                        MORSE_enum norm, MORSE_enum uplo, int N, int NB,
@@ -48,17 +63,3 @@ void MORSE_TASK_zlansy(const MORSE_option_t *options,
         sizeof(double),                  RTBLKADDR(B, double, Bm, Bn), OUTPUT,
         0);
 }
-
-void CORE_zlansy_quark(Quark *quark)
-{
-    double *normA;
-    int norm;
-    MORSE_enum uplo;
-    int N;
-    MORSE_Complex64_t *A;
-    int LDA;
-    double *work;
-
-    quark_unpack_args_7(quark, norm, uplo, N, A, LDA, work, normA);
-    CORE_zlansy( norm, uplo, N, A, LDA, work, normA);
-}
diff --git a/runtime/quark/codelets/codelet_zlantr.c b/runtime/quark/codelets/codelet_zlantr.c
index a6d0009b5481a8784cd908c9ede233c7a5d32839..839692464155e3d3728ed13d1539bea4f46101cf 100644
--- a/runtime/quark/codelets/codelet_zlantr.c
+++ b/runtime/quark/codelets/codelet_zlantr.c
@@ -24,7 +24,22 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zlantr_quark(Quark *quark)
+{
+    double *normA;
+    MORSE_enum norm, uplo, diag;
+    int M;
+    int N;
+    MORSE_Complex64_t *A;
+    int LDA;
+    double *work;
+
+    quark_unpack_args_9(quark, norm, uplo, diag, M, N, A, LDA, work, normA);
+    CORE_zlantr( norm, uplo, diag, M, N, A, LDA, work, normA);
+}
 
 void MORSE_TASK_zlantr(const MORSE_option_t *options,
                        MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
@@ -48,17 +63,3 @@ void MORSE_TASK_zlantr(const MORSE_option_t *options,
         sizeof(double),                  RTBLKADDR(B, double, Bm, Bn), OUTPUT,
         0);
 }
-
-void CORE_zlantr_quark(Quark *quark)
-{
-    double *normA;
-    MORSE_enum norm, uplo, diag;
-    int M;
-    int N;
-    MORSE_Complex64_t *A;
-    int LDA;
-    double *work;
-
-    quark_unpack_args_9(quark, norm, uplo, diag, M, N, A, LDA, work, normA);
-    CORE_zlantr( norm, uplo, diag, M, N, A, LDA, work, normA);
-}
diff --git a/runtime/quark/codelets/codelet_zlascal.c b/runtime/quark/codelets/codelet_zlascal.c
index 747695ef445633a4f61dcbf54da76ab3faba6d92..0ec86aebb36ebaeedc43aad44ffcc965b82e1aa0 100644
--- a/runtime/quark/codelets/codelet_zlascal.c
+++ b/runtime/quark/codelets/codelet_zlascal.c
@@ -29,13 +29,9 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
 static inline void CORE_zlascal_quark(Quark *quark)
 {
     MORSE_enum uplo;
diff --git a/runtime/quark/codelets/codelet_zlaset.c b/runtime/quark/codelets/codelet_zlaset.c
index dfa4b027938ad99570953eccc3d19d315ff7c198..ee4da1eba5cc5c4f086cabd308c91ead8d28d8ed 100644
--- a/runtime/quark/codelets/codelet_zlaset.c
+++ b/runtime/quark/codelets/codelet_zlaset.c
@@ -28,8 +28,22 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
+void CORE_zlaset_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    int M;
+    int N;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t beta;
+    MORSE_Complex64_t *A;
+    int LDA;
+
+    quark_unpack_args_7(quark, uplo, M, N, alpha, beta, A, LDA);
+    CORE_zlaset(uplo, M, N, alpha, beta, A, LDA);
+}
 
 /**
  *
@@ -66,7 +80,6 @@
  *         The leading dimension of the array A.  LDA >= max(1,M).
  *
  **/
-
 void MORSE_TASK_zlaset(const MORSE_option_t *options,
                        MORSE_enum uplo, int M, int N,
                        MORSE_Complex64_t alpha, MORSE_Complex64_t beta,
@@ -84,18 +97,3 @@ void MORSE_TASK_zlaset(const MORSE_option_t *options,
         sizeof(int),                        &LDA,   VALUE,
         0);
 }
-
-
-void CORE_zlaset_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    int M;
-    int N;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t beta;
-    MORSE_Complex64_t *A;
-    int LDA;
-
-    quark_unpack_args_7(quark, uplo, M, N, alpha, beta, A, LDA);
-    CORE_zlaset(uplo, M, N, alpha, beta, A, LDA);
-}
diff --git a/runtime/quark/codelets/codelet_zlaset2.c b/runtime/quark/codelets/codelet_zlaset2.c
index 4195739b1649070b9a47fb1722e35a8a57400f7c..c816bcadcedf01e3d11b945e1a9b16f643ccd4be 100644
--- a/runtime/quark/codelets/codelet_zlaset2.c
+++ b/runtime/quark/codelets/codelet_zlaset2.c
@@ -28,8 +28,21 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
+void CORE_zlaset2_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    int M;
+    int N;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int LDA;
+
+    quark_unpack_args_6(quark, uplo, M, N, alpha, A, LDA);
+    CORE_zlaset2(uplo, M, N, alpha, A, LDA);
+}
 
 /**
  *
@@ -80,17 +93,3 @@ void MORSE_TASK_zlaset2(const MORSE_option_t *options,
         sizeof(int),                        &LDA,   VALUE,
         0);
 }
-
-
-void CORE_zlaset2_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    int M;
-    int N;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int LDA;
-
-    quark_unpack_args_6(quark, uplo, M, N, alpha, A, LDA);
-    CORE_zlaset2(uplo, M, N, alpha, A, LDA);
-}
diff --git a/runtime/quark/codelets/codelet_zlatro.c b/runtime/quark/codelets/codelet_zlatro.c
index 342f1b430b1d4c3e60eae7a363e8144b508f4044..c6e4406fca1e3c9a8396243d7b0f8c06e3e4c71b 100644
--- a/runtime/quark/codelets/codelet_zlatro.c
+++ b/runtime/quark/codelets/codelet_zlatro.c
@@ -21,8 +21,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
-
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_zlatro_quark(Quark *quark)
 {
@@ -39,9 +39,6 @@ void CORE_zlatro_quark(Quark *quark)
     CORE_zlatro(uplo, trans, M, N, A, LDA, B, LDB);
 }
 
-/***************************************************************************//**
- *
- **/
 void MORSE_TASK_zlatro(const MORSE_option_t *options,
                        MORSE_enum uplo, MORSE_enum trans,
                        int m, int n, int mb,
diff --git a/runtime/quark/codelets/codelet_zlauum.c b/runtime/quark/codelets/codelet_zlauum.c
index 1a47efcec3a914eea19779bcf5b7caf3d6169b17..1437ad52aa341a29ba0b345c90839cf52c9372aa 100644
--- a/runtime/quark/codelets/codelet_zlauum.c
+++ b/runtime/quark/codelets/codelet_zlauum.c
@@ -29,13 +29,19 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_zlauum_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    int N;
+    MORSE_Complex64_t *A;
+    int LDA;
+
+    quark_unpack_args_4(quark, uplo, N, A, LDA);
+    CORE_zlauum(uplo, N, A, LDA);
+}
 
 void MORSE_TASK_zlauum(const MORSE_option_t *options,
                        MORSE_enum uplo, int n, int nb,
@@ -50,15 +56,3 @@ void MORSE_TASK_zlauum(const MORSE_option_t *options,
         sizeof(int),                        &lda,   VALUE,
         0);
 }
-
-
-void CORE_zlauum_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    int N;
-    MORSE_Complex64_t *A;
-    int LDA;
-
-    quark_unpack_args_4(quark, uplo, N, A, LDA);
-    CORE_zlauum(uplo, N, A, LDA);
-}
diff --git a/runtime/quark/codelets/codelet_zpamm.c b/runtime/quark/codelets/codelet_zpamm.c
index dcf944d4f5136e898d5b29c3cca2d453aeb1a602..830f78d8da4bdbc470aca13723edb0e16acd25a6 100644
--- a/runtime/quark/codelets/codelet_zpamm.c
+++ b/runtime/quark/codelets/codelet_zpamm.c
@@ -28,10 +28,35 @@
  *
  **/
 #include "coreblas/cblas.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void
+CORE_zpamm_quark(Quark *quark)
+{
+    int op;
+    MORSE_enum side;
+    int storev;
+    int M;
+    int N;
+    int K;
+    int L;
+    MORSE_Complex64_t *A1;
+    int LDA1;
+    MORSE_Complex64_t *A2;
+    int LDA2;
+    MORSE_Complex64_t *V;
+    int LDV;
+    MORSE_Complex64_t *W;
+    int LDW;
+
+    quark_unpack_args_15(quark, op, side, storev, M, N, K, L,
+            A1, LDA1, A2, LDA2, V, LDV, W, LDW);
 
-/***************************************************************************//**
+    CORE_zpamm( op, side, storev, M, N, K, L, A1, LDA1, A2, LDA2, V, LDV, W, LDW);
+}
+
+/**
  *
  * @ingroup CORE_MORSE_Complex64_t
  *
@@ -171,11 +196,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
-
-/***************************************************************************/
-
-
 void
 MORSE_TASK_zpamm(const MORSE_option_t *options,
                  int op, MORSE_enum side, int storev,
@@ -203,29 +223,3 @@ MORSE_TASK_zpamm(const MORSE_option_t *options,
         sizeof(int),                        &ldw,     VALUE,
         0);
 }
-
-void
-CORE_zpamm_quark(Quark *quark)
-{
-    int op;
-    MORSE_enum side;
-    int storev;
-    int M;
-    int N;
-    int K;
-    int L;
-    MORSE_Complex64_t *A1;
-    int LDA1;
-    MORSE_Complex64_t *A2;
-    int LDA2;
-    MORSE_Complex64_t *V;
-    int LDV;
-    MORSE_Complex64_t *W;
-    int LDW;
-
-    quark_unpack_args_15(quark, op, side, storev, M, N, K, L,
-            A1, LDA1, A2, LDA2, V, LDV, W, LDW);
-
-    CORE_zpamm( op, side, storev, M, N, K, L, A1, LDA1, A2, LDA2, V, LDV, W, LDW);
-}
-
diff --git a/runtime/quark/codelets/codelet_zplghe.c b/runtime/quark/codelets/codelet_zplghe.c
index 42f7f353bc4d9df75510ed913693b907021e60bd..7b861fcac4ceb345b4ab52c4e2aaa5357cd1c6d6 100644
--- a/runtime/quark/codelets/codelet_zplghe.c
+++ b/runtime/quark/codelets/codelet_zplghe.c
@@ -28,9 +28,24 @@
  * @precisions normal z -> c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
+void CORE_zplghe_quark(Quark *quark)
+{
+    double bump;
+    int m;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    int bigM;
+    int m0;
+    int n0;
+    unsigned long long int seed;
 
+    quark_unpack_args_9( quark, bump, m, n, A, lda, bigM, m0, n0, seed );
+    CORE_zplghe( bump, m, n, A, lda, bigM, m0, n0, seed );
+}
 
 void MORSE_TASK_zplghe( const MORSE_option_t *options,
                         double bump, int m, int n, const MORSE_desc_t *A, int Am, int An, int lda,
@@ -50,21 +65,3 @@ void MORSE_TASK_zplghe( const MORSE_option_t *options,
         sizeof(unsigned long long int),   &seed, VALUE,
         0);
 }
-
-
-void CORE_zplghe_quark(Quark *quark)
-{
-    double bump;
-    int m;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    int bigM;
-    int m0;
-    int n0;
-    unsigned long long int seed;
-
-    quark_unpack_args_9( quark, bump, m, n, A, lda, bigM, m0, n0, seed );
-    CORE_zplghe( bump, m, n, A, lda, bigM, m0, n0, seed );
-}
-
diff --git a/runtime/quark/codelets/codelet_zplgsy.c b/runtime/quark/codelets/codelet_zplgsy.c
index f454988bdb15428a084258b7bcdd2f252f30c01a..46dd487ceebd921770ea2291c962c60a70bcf618 100644
--- a/runtime/quark/codelets/codelet_zplgsy.c
+++ b/runtime/quark/codelets/codelet_zplgsy.c
@@ -28,9 +28,24 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
+void CORE_zplgsy_quark(Quark *quark)
+{
+    MORSE_Complex64_t bump;
+    int m;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    int bigM;
+    int m0;
+    int n0;
+    unsigned long long int seed;
 
+    quark_unpack_args_9( quark, bump, m, n, A, lda, bigM, m0, n0, seed );
+    CORE_zplgsy( bump, m, n, A, lda, bigM, m0, n0, seed );
+}
 
 void MORSE_TASK_zplgsy( const MORSE_option_t *options,
                         MORSE_Complex64_t bump, int m, int n, const MORSE_desc_t *A, int Am, int An, int lda,
@@ -50,21 +65,3 @@ void MORSE_TASK_zplgsy( const MORSE_option_t *options,
         sizeof(unsigned long long int),   &seed, VALUE,
         0);
 }
-
-
-void CORE_zplgsy_quark(Quark *quark)
-{
-    MORSE_Complex64_t bump;
-    int m;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    int bigM;
-    int m0;
-    int n0;
-    unsigned long long int seed;
-
-    quark_unpack_args_9( quark, bump, m, n, A, lda, bigM, m0, n0, seed );
-    CORE_zplgsy( bump, m, n, A, lda, bigM, m0, n0, seed );
-}
-
diff --git a/runtime/quark/codelets/codelet_zplrnt.c b/runtime/quark/codelets/codelet_zplrnt.c
index 3c01d78c277a62f9c5811aad5031a18611e415c7..5f5288493206a7cfa86d104f53cfe76fb9f1067f 100644
--- a/runtime/quark/codelets/codelet_zplrnt.c
+++ b/runtime/quark/codelets/codelet_zplrnt.c
@@ -28,9 +28,23 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
+void CORE_zplrnt_quark(Quark *quark)
+{
+    int m;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    int bigM;
+    int m0;
+    int n0;
+    unsigned long long int seed;
 
+    quark_unpack_args_8( quark, m, n, A, lda, bigM, m0, n0, seed );
+    CORE_zplrnt( m, n, A, lda, bigM, m0, n0, seed );
+}
 
 void MORSE_TASK_zplrnt( const MORSE_option_t *options,
                         int m, int n, const MORSE_desc_t *A, int Am, int An, int lda,
@@ -49,20 +63,3 @@ void MORSE_TASK_zplrnt( const MORSE_option_t *options,
         sizeof(unsigned long long int),   &seed, VALUE,
         0);
 }
-
-
-void CORE_zplrnt_quark(Quark *quark)
-{
-    int m;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    int bigM;
-    int m0;
-    int n0;
-    unsigned long long int seed;
-
-    quark_unpack_args_8( quark, m, n, A, lda, bigM, m0, n0, seed );
-    CORE_zplrnt( m, n, A, lda, bigM, m0, n0, seed );
-}
-
diff --git a/runtime/quark/codelets/codelet_zplssq.c b/runtime/quark/codelets/codelet_zplssq.c
index a838cbbf06f96de4df65bb953d7960527c9d05f9..e08ea2b0e4fb209a841664204777e23c70ddbdae 100644
--- a/runtime/quark/codelets/codelet_zplssq.c
+++ b/runtime/quark/codelets/codelet_zplssq.c
@@ -25,7 +25,23 @@
  *
  **/
 #include <math.h>
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zplssq_quark(Quark *quark)
+{
+    double *SCALESUMSQ;
+    double *SCLSSQ;
+
+    quark_unpack_args_2( quark, SCALESUMSQ, SCLSSQ );
+
+    if( SCLSSQ[0] < SCALESUMSQ[0] ) {
+        SCLSSQ[1] = SCALESUMSQ[1] + (SCLSSQ[1]     * (( SCLSSQ[0] / SCALESUMSQ[0] ) * ( SCLSSQ[0] / SCALESUMSQ[0] )));
+        SCLSSQ[0] = SCALESUMSQ[0];
+    } else {
+        SCLSSQ[1] = SCLSSQ[1]     + (SCALESUMSQ[1] * (( SCALESUMSQ[0] / SCLSSQ[0] ) * ( SCALESUMSQ[0] / SCLSSQ[0] )));
+    }
+}
 
 /*****************************************************************************
  *
@@ -70,19 +86,12 @@ void MORSE_TASK_zplssq( const MORSE_option_t *options,
 }
 
 
-void CORE_zplssq_quark(Quark *quark)
+void CORE_zplssq2_quark(Quark *quark)
 {
-    double *SCALESUMSQ;
-    double *SCLSSQ;
-
-    quark_unpack_args_2( quark, SCALESUMSQ, SCLSSQ );
+    double *RESULT;
 
-    if( SCLSSQ[0] < SCALESUMSQ[0] ) {
-        SCLSSQ[1] = SCALESUMSQ[1] + (SCLSSQ[1]     * (( SCLSSQ[0] / SCALESUMSQ[0] ) * ( SCLSSQ[0] / SCALESUMSQ[0] )));
-        SCLSSQ[0] = SCALESUMSQ[0];
-    } else {
-        SCLSSQ[1] = SCLSSQ[1]     + (SCALESUMSQ[1] * (( SCALESUMSQ[0] / SCLSSQ[0] ) * ( SCALESUMSQ[0] / SCLSSQ[0] )));
-    }
+    quark_unpack_args_1( quark, RESULT );
+    RESULT[0] = RESULT[0] * sqrt( RESULT[1] );
 }
 
 void MORSE_TASK_zplssq2( const MORSE_option_t *options,
@@ -93,12 +102,3 @@ void MORSE_TASK_zplssq2( const MORSE_option_t *options,
         sizeof(double)*2, RTBLKADDR(RESULT, double, RESULTm, RESULTn), INOUT,
         0);
 }
-
-
-void CORE_zplssq2_quark(Quark *quark)
-{
-    double *RESULT;
-
-    quark_unpack_args_1( quark, RESULT );
-    RESULT[0] = RESULT[0] * sqrt( RESULT[1] );
-}
diff --git a/runtime/quark/codelets/codelet_zpotrf.c b/runtime/quark/codelets/codelet_zpotrf.c
index e90669e836db9ba466e762452e621e07f12e4ddb..6b09e1575821ae34a314b1b5dee93943ee1fde2f 100644
--- a/runtime/quark/codelets/codelet_zpotrf.c
+++ b/runtime/quark/codelets/codelet_zpotrf.c
@@ -28,33 +28,8 @@
  * @precisions normal z -> c d s
  *
  **/
-
-#include "runtime/quark/include/morse_quark.h"
-
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
-
-void MORSE_TASK_zpotrf(const MORSE_option_t *options,
-                       MORSE_enum uplo, int n, int nb,
-                       const MORSE_desc_t *A, int Am, int An, int lda,
-                       int iinfo)
-{
-    quark_option_t *opt = (quark_option_t*)(options->schedopt);
-    DAG_CORE_POTRF;
-    QUARK_Insert_Task(opt->quark, CORE_zpotrf_quark, (Quark_Task_Flags*)opt,
-        sizeof(MORSE_enum),                &uplo,      VALUE,
-        sizeof(int),                        &n,         VALUE,
-        sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex64_t, Am, An),                 INOUT,
-        sizeof(int),                        &lda,       VALUE,
-        sizeof(MORSE_sequence_t*),           &(options->sequence),  VALUE,
-        sizeof(MORSE_request_t*),            &(options->request),   VALUE,
-        sizeof(int),                        &iinfo,     VALUE,
-        0);
-}
-
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_zpotrf_quark(Quark *quark)
 {
@@ -73,3 +48,21 @@ void CORE_zpotrf_quark(Quark *quark)
     if (sequence->status == MORSE_SUCCESS && info != 0)
         RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
 }
+
+void MORSE_TASK_zpotrf(const MORSE_option_t *options,
+                       MORSE_enum uplo, int n, int nb,
+                       const MORSE_desc_t *A, int Am, int An, int lda,
+                       int iinfo)
+{
+    quark_option_t *opt = (quark_option_t*)(options->schedopt);
+    DAG_CORE_POTRF;
+    QUARK_Insert_Task(opt->quark, CORE_zpotrf_quark, (Quark_Task_Flags*)opt,
+                      sizeof(MORSE_enum),                &uplo,      VALUE,
+                      sizeof(int),                        &n,         VALUE,
+                      sizeof(MORSE_Complex64_t)*nb*nb,    RTBLKADDR(A, MORSE_Complex64_t, Am, An),                 INOUT,
+                      sizeof(int),                        &lda,       VALUE,
+                      sizeof(MORSE_sequence_t*),           &(options->sequence),  VALUE,
+                      sizeof(MORSE_request_t*),            &(options->request),   VALUE,
+                      sizeof(int),                        &iinfo,     VALUE,
+                      0);
+}
diff --git a/runtime/quark/codelets/codelet_zssssm.c b/runtime/quark/codelets/codelet_zssssm.c
index 25466a851e2cbf8920123f661256022feacb9ef9..33289267d8bc66053adfa28ef0022a5c84898de2 100644
--- a/runtime/quark/codelets/codelet_zssssm.c
+++ b/runtime/quark/codelets/codelet_zssssm.c
@@ -29,7 +29,30 @@
  *
  **/
 #include "coreblas/cblas.h"
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zssssm_quark(Quark *quark)
+{
+    int m1;
+    int n1;
+    int m2;
+    int n2;
+    int k;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *L1;
+    int ldl1;
+    MORSE_Complex64_t *L2;
+    int ldl2;
+    int *IPIV;
+
+    quark_unpack_args_15(quark, 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);
+}
 
 /***************************************************************************//**
  *
@@ -101,7 +124,6 @@
  *         \retval <0 if INFO = -k, the k-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zssssm(const MORSE_option_t *options,
                        int m1, int n1, int m2, int n2, int k, int ib, int nb,
                        const MORSE_desc_t *A1, int A1m, int A1n, int lda1,
@@ -130,26 +152,3 @@ void MORSE_TASK_zssssm(const MORSE_option_t *options,
         sizeof(int)*nb,                      IPIV,          INPUT,
         0);
 }
-
-
-void CORE_zssssm_quark(Quark *quark)
-{
-    int m1;
-    int n1;
-    int m2;
-    int n2;
-    int k;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *L1;
-    int ldl1;
-    MORSE_Complex64_t *L2;
-    int ldl2;
-    int *IPIV;
-
-    quark_unpack_args_15(quark, 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);
-}
diff --git a/runtime/quark/codelets/codelet_zsymm.c b/runtime/quark/codelets/codelet_zsymm.c
index ff980afb285f2f90ddc262d88d852683210d8eae..eb05b3ccb8ebbc84e93769608ee9a426e2a2da69 100644
--- a/runtime/quark/codelets/codelet_zsymm.c
+++ b/runtime/quark/codelets/codelet_zsymm.c
@@ -28,13 +28,31 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_zsymm_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum uplo;
+    int M;
+    int N;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int LDA;
+    MORSE_Complex64_t *B;
+    int LDB;
+    MORSE_Complex64_t beta;
+    MORSE_Complex64_t *C;
+    int LDC;
+
+    quark_unpack_args_12(quark, side, uplo, M, N, alpha, A, LDA, B, LDB, beta, C, LDC);
+    CORE_zsymm(side, uplo,
+        M, N,
+        alpha, A, LDA,
+        B, LDB,
+        beta, C, LDC);
+}
 
 void MORSE_TASK_zsymm(const MORSE_option_t *options,
                       MORSE_enum side, MORSE_enum uplo,
@@ -60,27 +78,3 @@ void MORSE_TASK_zsymm(const MORSE_option_t *options,
         sizeof(int),                        &ldc,     VALUE,
         0);
 }
-
-
-void CORE_zsymm_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum uplo;
-    int M;
-    int N;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int LDA;
-    MORSE_Complex64_t *B;
-    int LDB;
-    MORSE_Complex64_t beta;
-    MORSE_Complex64_t *C;
-    int LDC;
-
-    quark_unpack_args_12(quark, side, uplo, M, N, alpha, A, LDA, B, LDB, beta, C, LDC);
-    CORE_zsymm(side, uplo,
-        M, N,
-        alpha, A, LDA,
-        B, LDB,
-        beta, C, LDC);
-}
diff --git a/runtime/quark/codelets/codelet_zsyr2k.c b/runtime/quark/codelets/codelet_zsyr2k.c
index dac5ea842d14d80a63a08af10f3ae607ce35c382..1286c95fd6ef5c074b39856e1252b27c56ab7a79 100644
--- a/runtime/quark/codelets/codelet_zsyr2k.c
+++ b/runtime/quark/codelets/codelet_zsyr2k.c
@@ -28,13 +28,28 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_zsyr2k_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    MORSE_enum trans;
+    int n;
+    int k;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *B;
+    int ldb;
+    MORSE_Complex64_t beta;
+    MORSE_Complex64_t *C;
+    int ldc;
+
+    quark_unpack_args_12(quark, uplo, trans, n, k, alpha, A, lda, B, ldb, beta, C, ldc);
+    CORE_zsyr2k(uplo, trans,
+                n, k, alpha, A, lda, B, ldb, beta, C, ldc);
+}
 
 void MORSE_TASK_zsyr2k(const MORSE_option_t *options,
                        MORSE_enum uplo, MORSE_enum trans,
@@ -60,24 +75,3 @@ void MORSE_TASK_zsyr2k(const MORSE_option_t *options,
         sizeof(int),                        &ldc,       VALUE,
         0);
 }
-
-
-void CORE_zsyr2k_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    MORSE_enum trans;
-    int n;
-    int k;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *B;
-    int ldb;
-    MORSE_Complex64_t beta;
-    MORSE_Complex64_t *C;
-    int ldc;
-
-    quark_unpack_args_12(quark, uplo, trans, n, k, alpha, A, lda, B, ldb, beta, C, ldc);
-    CORE_zsyr2k(uplo, trans,
-                n, k, alpha, A, lda, B, ldb, beta, C, ldc);
-}
diff --git a/runtime/quark/codelets/codelet_zsyrk.c b/runtime/quark/codelets/codelet_zsyrk.c
index 8621679e65abdbee97e012387fab62091c4d7941..6483481ff8065934344b82c2e823f665a50e5357 100644
--- a/runtime/quark/codelets/codelet_zsyrk.c
+++ b/runtime/quark/codelets/codelet_zsyrk.c
@@ -28,13 +28,28 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_zsyrk_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    MORSE_enum trans;
+    int n;
+    int k;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t beta;
+    MORSE_Complex64_t *C;
+    int ldc;
+
+    quark_unpack_args_10(quark, uplo, trans, n, k, alpha, A, lda, beta, C, ldc);
+    CORE_zsyrk(uplo, trans,
+        n, k,
+        alpha, A, lda,
+        beta, C, ldc);
+}
 
 void MORSE_TASK_zsyrk(const MORSE_option_t *options,
                       MORSE_enum uplo, MORSE_enum trans,
@@ -57,24 +72,3 @@ void MORSE_TASK_zsyrk(const MORSE_option_t *options,
         sizeof(int),                        &ldc,       VALUE,
         0);
 }
-
-
-void CORE_zsyrk_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    MORSE_enum trans;
-    int n;
-    int k;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t beta;
-    MORSE_Complex64_t *C;
-    int ldc;
-
-    quark_unpack_args_10(quark, uplo, trans, n, k, alpha, A, lda, beta, C, ldc);
-    CORE_zsyrk(uplo, trans,
-        n, k,
-        alpha, A, lda,
-        beta, C, ldc);
-}
diff --git a/runtime/quark/codelets/codelet_zsyssq.c b/runtime/quark/codelets/codelet_zsyssq.c
index 5eab60ccc83d3bd98fc202fecd5a189e83fec413..d919213a57c7be80a12a9b43a50c140984e12a8d 100644
--- a/runtime/quark/codelets/codelet_zsyssq.c
+++ b/runtime/quark/codelets/codelet_zsyssq.c
@@ -24,7 +24,20 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zsyssq_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    double *SCALESUMSQ;
+
+    quark_unpack_args_5( quark, uplo, n, A, lda, SCALESUMSQ );
+    CORE_zsyssq( uplo, n, A, lda, &SCALESUMSQ[0], &SCALESUMSQ[1]);
+}
 
 void MORSE_TASK_zsyssq( const MORSE_option_t *options,
                         MORSE_enum uplo, int n,
@@ -40,16 +53,3 @@ void MORSE_TASK_zsyssq( const MORSE_option_t *options,
         sizeof(double)*2,                RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn), INOUT,
         0);
 }
-
-
-void CORE_zsyssq_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    double *SCALESUMSQ;
-
-    quark_unpack_args_5( quark, uplo, n, A, lda, SCALESUMSQ );
-    CORE_zsyssq( uplo, n, A, lda, &SCALESUMSQ[0], &SCALESUMSQ[1]);
-}
diff --git a/runtime/quark/codelets/codelet_zsytrf_nopiv.c b/runtime/quark/codelets/codelet_zsytrf_nopiv.c
index 421cbae163e97fc81ad0a2f0eb1de298ed484d15..f2821e798d2159a7dfe1794dde7dc18d914a38da 100644
--- a/runtime/quark/codelets/codelet_zsytrf_nopiv.c
+++ b/runtime/quark/codelets/codelet_zsytrf_nopiv.c
@@ -28,8 +28,25 @@
  * @precisions normal z -> c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
+void CORE_zsytrf_nopiv_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_sequence_t *sequence;
+    MORSE_request_t *request;
+    int iinfo;
+    int info = 0;
+
+    quark_unpack_args_7(quark, uplo, n, A, lda, sequence, request, iinfo);
+    info = CORE_zsytf2_nopiv(uplo, n, A, lda);
+    if (sequence->status == MORSE_SUCCESS && info != 0)
+        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
+}
 
 void MORSE_TASK_zsytrf_nopiv(const MORSE_option_t *options,
                              MORSE_enum uplo, int n, int nb,
@@ -48,21 +65,3 @@ void MORSE_TASK_zsytrf_nopiv(const MORSE_option_t *options,
         sizeof(int),                     &iinfo,               VALUE,
         0);
 }
-
-
-void CORE_zsytrf_nopiv_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_sequence_t *sequence;
-    MORSE_request_t *request;
-    int iinfo;
-    int info = 0;
-
-    quark_unpack_args_7(quark, uplo, n, A, lda, sequence, request, iinfo);
-    info = CORE_zsytf2_nopiv(uplo, n, A, lda);
-    if (sequence->status == MORSE_SUCCESS && info != 0)
-        RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
-}
diff --git a/runtime/quark/codelets/codelet_ztile_zero.c b/runtime/quark/codelets/codelet_ztile_zero.c
index 19beb4362201b07071454867594cbf1bef787f75..f1f77319ef64607ec13c52ba020bef70e20af5a5 100644
--- a/runtime/quark/codelets/codelet_ztile_zero.c
+++ b/runtime/quark/codelets/codelet_ztile_zero.c
@@ -24,29 +24,9 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/*****************************************************************************
- *
- **/
-void MORSE_TASK_ztile_zero(const const MORSE_option_t *options,
-                           int X1, int X2, int Y1, int Y2,
-                           const MORSE_desc_t *A, int Am, int An, int lda)
-{
-    quark_option_t *opt = (quark_option_t*)(options->schedopt);
-    QUARK_Insert_Task(opt->quark, CORE_ztile_zero_quark, (Quark_Task_Flags*)opt,
-        sizeof(int),                       &X1,                                       VALUE,
-        sizeof(int),                       &X2,                                       VALUE,
-        sizeof(int),                       &Y1,                                       VALUE,
-        sizeof(int),                       &Y2,                                       VALUE,
-        sizeof(MORSE_Complex64_t)*A->bsiz,  RTBLKADDR(A, MORSE_Complex64_t, Am, An),  OUTPUT | LOCALITY,
-        sizeof(int),                       &lda,                                      VALUE,
-        0);
-}
-
-/*****************************************************************************
- *
- **/
 void CORE_ztile_zero_quark(Quark *quark)
 {
     int X1;
@@ -65,3 +45,18 @@ void CORE_ztile_zero_quark(Quark *quark)
             A[lda*x+y] = 0.0;
 
 }
+
+void MORSE_TASK_ztile_zero(const const MORSE_option_t *options,
+                           int X1, int X2, int Y1, int Y2,
+                           const MORSE_desc_t *A, int Am, int An, int lda)
+{
+    quark_option_t *opt = (quark_option_t*)(options->schedopt);
+    QUARK_Insert_Task(opt->quark, CORE_ztile_zero_quark, (Quark_Task_Flags*)opt,
+        sizeof(int),                       &X1,                                       VALUE,
+        sizeof(int),                       &X2,                                       VALUE,
+        sizeof(int),                       &Y1,                                       VALUE,
+        sizeof(int),                       &Y2,                                       VALUE,
+        sizeof(MORSE_Complex64_t)*A->bsiz,  RTBLKADDR(A, MORSE_Complex64_t, Am, An),  OUTPUT | LOCALITY,
+        sizeof(int),                       &lda,                                      VALUE,
+        0);
+}
diff --git a/runtime/quark/codelets/codelet_ztpmqrt.c b/runtime/quark/codelets/codelet_ztpmqrt.c
index 25bd5ac83089cc9147b1dbab07a17b95772d982c..20bddecdc12da81e068c1e0e76744a2f84983752 100644
--- a/runtime/quark/codelets/codelet_ztpmqrt.c
+++ b/runtime/quark/codelets/codelet_ztpmqrt.c
@@ -22,7 +22,8 @@
  * @precisions normal z -> s d c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 static void
 CORE_ztpmqrt_quark( Quark *quark )
diff --git a/runtime/quark/codelets/codelet_ztpqrt.c b/runtime/quark/codelets/codelet_ztpqrt.c
index 9b7e098767dc5c11ab35c630d0c2a0125cacf420..4a3a8d957dd1a95011aeb8051f38601886dba0ea 100644
--- a/runtime/quark/codelets/codelet_ztpqrt.c
+++ b/runtime/quark/codelets/codelet_ztpqrt.c
@@ -22,7 +22,8 @@
  * @precisions normal z -> s d c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 static void
 CORE_ztpqrt_quark( Quark *quark )
diff --git a/runtime/quark/codelets/codelet_ztradd.c b/runtime/quark/codelets/codelet_ztradd.c
index f5b566b5188bf75634fe121d09d97a333076a380..b75ea4010d6faac0d6e8b36df61f85893903e37d 100644
--- a/runtime/quark/codelets/codelet_ztradd.c
+++ b/runtime/quark/codelets/codelet_ztradd.c
@@ -24,7 +24,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_ztradd_quark(Quark *quark)
 {
diff --git a/runtime/quark/codelets/codelet_ztrasm.c b/runtime/quark/codelets/codelet_ztrasm.c
index bb2a2e3bf200cd986f8baa06032a4a3506a6d845..d2a7823411f8a942d99c09fc98c828200a86cc02 100644
--- a/runtime/quark/codelets/codelet_ztrasm.c
+++ b/runtime/quark/codelets/codelet_ztrasm.c
@@ -24,7 +24,23 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_ztrasm_quark(Quark *quark)
+{
+    MORSE_enum storev;
+    MORSE_enum uplo;
+    MORSE_enum diag;
+    int M;
+    int N;
+    MORSE_Complex64_t *A;
+    int lda;
+    double *work;
+
+    quark_unpack_args_8(quark, storev, uplo, diag, M, N, A, lda, work);
+    CORE_ztrasm(storev, uplo, diag, M, N, A, lda, work);
+}
 
 void MORSE_TASK_ztrasm(const MORSE_option_t *options,
                        MORSE_enum storev, MORSE_enum uplo, MORSE_enum diag, int M, int N,
@@ -44,19 +60,3 @@ void MORSE_TASK_ztrasm(const MORSE_option_t *options,
         sizeof(double)*szeW,             RTBLKADDR(B, double, Bm, Bn), INOUT,
         0);
 }
-
-
-void CORE_ztrasm_quark(Quark *quark)
-{
-    MORSE_enum storev;
-    MORSE_enum uplo;
-    MORSE_enum diag;
-    int M;
-    int N;
-    MORSE_Complex64_t *A;
-    int lda;
-    double *work;
-
-    quark_unpack_args_8(quark, storev, uplo, diag, M, N, A, lda, work);
-    CORE_ztrasm(storev, uplo, diag, M, N, A, lda, work);
-}
diff --git a/runtime/quark/codelets/codelet_ztrmm.c b/runtime/quark/codelets/codelet_ztrmm.c
index c11a2d245d3b9a2c6dd34701fcb8ebbd3c76bb73..b85c0740c1dd05fc352c2b8728c7a447d8d1e131 100644
--- a/runtime/quark/codelets/codelet_ztrmm.c
+++ b/runtime/quark/codelets/codelet_ztrmm.c
@@ -28,13 +28,30 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_ztrmm_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum uplo;
+    MORSE_enum transA;
+    MORSE_enum diag;
+    int M;
+    int N;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int LDA;
+    MORSE_Complex64_t *B;
+    int LDB;
+
+    quark_unpack_args_11(quark, side, uplo, transA, diag, M, N, alpha, A, LDA, B, LDB);
+    CORE_ztrmm(side, uplo,
+        transA, diag,
+        M, N,
+        alpha, A, LDA,
+        B, LDB);
+}
 
 void MORSE_TASK_ztrmm(const MORSE_option_t *options,
                       MORSE_enum side, MORSE_enum uplo, MORSE_enum transA, MORSE_enum diag,
@@ -58,28 +75,3 @@ void MORSE_TASK_ztrmm(const MORSE_option_t *options,
         sizeof(int),                        &ldb,       VALUE,
         0);
 }
-
-
-void CORE_ztrmm_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum uplo;
-    MORSE_enum transA;
-    MORSE_enum diag;
-    int M;
-    int N;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int LDA;
-    MORSE_Complex64_t *B;
-    int LDB;
-
-    quark_unpack_args_11(quark, side, uplo, transA, diag, M, N, alpha, A, LDA, B, LDB);
-    CORE_ztrmm(side, uplo,
-        transA, diag,
-        M, N,
-        alpha, A, LDA,
-        B, LDB);
-}
-
-
diff --git a/runtime/quark/codelets/codelet_ztrsm.c b/runtime/quark/codelets/codelet_ztrsm.c
index c8e52c2b11916e540e90465b0f94ccc06d4d3d7c..5b57184eb6354dd438ae5382caa5206e9f3322c6 100644
--- a/runtime/quark/codelets/codelet_ztrsm.c
+++ b/runtime/quark/codelets/codelet_ztrsm.c
@@ -28,13 +28,30 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_ztrsm_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum uplo;
+    MORSE_enum transA;
+    MORSE_enum diag;
+    int m;
+    int n;
+    MORSE_Complex64_t alpha;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *B;
+    int ldb;
+
+    quark_unpack_args_11(quark, side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb);
+    CORE_ztrsm(side, uplo,
+        transA, diag,
+        m, n,
+        alpha, A, lda,
+        B, ldb);
+}
 
 void MORSE_TASK_ztrsm(const MORSE_option_t *options,
                       MORSE_enum side, MORSE_enum uplo, MORSE_enum transA, MORSE_enum diag,
@@ -58,26 +75,3 @@ void MORSE_TASK_ztrsm(const MORSE_option_t *options,
         sizeof(int),                        &ldb,       VALUE,
         0);
 }
-
-
-void CORE_ztrsm_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum uplo;
-    MORSE_enum transA;
-    MORSE_enum diag;
-    int m;
-    int n;
-    MORSE_Complex64_t alpha;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *B;
-    int ldb;
-
-    quark_unpack_args_11(quark, side, uplo, transA, diag, m, n, alpha, A, lda, B, ldb);
-    CORE_ztrsm(side, uplo,
-        transA, diag,
-        m, n,
-        alpha, A, lda,
-        B, ldb);
-}
diff --git a/runtime/quark/codelets/codelet_ztrssq.c b/runtime/quark/codelets/codelet_ztrssq.c
index 4492dbe874307d3e39521ccfdfe6e534b32a2e2a..df70c22016a250b823b96c7d4b5aa66f65136445 100644
--- a/runtime/quark/codelets/codelet_ztrssq.c
+++ b/runtime/quark/codelets/codelet_ztrssq.c
@@ -24,7 +24,22 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_ztrssq_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    MORSE_enum diag;
+    int m;
+    int n;
+    MORSE_Complex64_t *A;
+    int lda;
+    double *SCALESUMSQ;
+
+    quark_unpack_args_7( quark, uplo, diag, m, n, A, lda, SCALESUMSQ );
+    CORE_ztrssq( uplo, diag, m, n, A, lda, &SCALESUMSQ[0], &SCALESUMSQ[1]);
+}
 
 void MORSE_TASK_ztrssq( const MORSE_option_t *options,
                         MORSE_enum uplo, MORSE_enum diag,
@@ -43,18 +58,3 @@ void MORSE_TASK_ztrssq( const MORSE_option_t *options,
         sizeof(double)*2,                RTBLKADDR(SCALESUMSQ, double, SCALESUMSQm, SCALESUMSQn), INOUT,
         0);
 }
-
-
-void CORE_ztrssq_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    MORSE_enum diag;
-    int m;
-    int n;
-    MORSE_Complex64_t *A;
-    int lda;
-    double *SCALESUMSQ;
-
-    quark_unpack_args_7( quark, uplo, diag, m, n, A, lda, SCALESUMSQ );
-    CORE_ztrssq( uplo, diag, m, n, A, lda, &SCALESUMSQ[0], &SCALESUMSQ[1]);
-}
diff --git a/runtime/quark/codelets/codelet_ztrtri.c b/runtime/quark/codelets/codelet_ztrtri.c
index 963ae940eaa483c5d3c55117f3d399595eeadcc3..1a9d8a6c632bd5bd5fd8f761e9bf44cbdc3b22d9 100644
--- a/runtime/quark/codelets/codelet_ztrtri.c
+++ b/runtime/quark/codelets/codelet_ztrtri.c
@@ -29,13 +29,27 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-/***************************************************************************//**
- *
- * @ingroup CORE_MORSE_Complex64_t
- *
- **/
+void CORE_ztrtri_quark(Quark *quark)
+{
+    MORSE_enum uplo;
+    MORSE_enum diag;
+    int N;
+    MORSE_Complex64_t *A;
+    int LDA;
+    MORSE_sequence_t *sequence;
+    MORSE_request_t *request;
+    int iinfo;
+
+    int info;
+
+    quark_unpack_args_8(quark, uplo, diag, N, A, LDA, sequence, request, iinfo);
+    CORE_ztrtri(uplo, diag, N, A, LDA, &info);
+    if ((sequence->status == MORSE_SUCCESS) && (info > 0))
+        RUNTIME_sequence_flush(quark, sequence, request, iinfo + info);
+}
 
 void MORSE_TASK_ztrtri(const MORSE_option_t *options,
                        MORSE_enum uplo, MORSE_enum diag,
@@ -56,23 +70,3 @@ void MORSE_TASK_ztrtri(const MORSE_option_t *options,
         sizeof(int),                        &iinfo,     VALUE,
         0);
 }
-
-
-void CORE_ztrtri_quark(Quark *quark)
-{
-    MORSE_enum uplo;
-    MORSE_enum diag;
-    int N;
-    MORSE_Complex64_t *A;
-    int LDA;
-    MORSE_sequence_t *sequence;
-    MORSE_request_t *request;
-    int iinfo;
-
-    int info;
-
-    quark_unpack_args_8(quark, uplo, diag, N, A, LDA, sequence, request, iinfo);
-    CORE_ztrtri(uplo, diag, N, A, LDA, &info);
-    if ((sequence->status == MORSE_SUCCESS) && (info > 0))
-        RUNTIME_sequence_flush(quark, sequence, request, iinfo + info);
-}
diff --git a/runtime/quark/codelets/codelet_ztslqt.c b/runtime/quark/codelets/codelet_ztslqt.c
index 1f2e181b7e360ac03ecd406e934d9522937e6452..af82add0edb420a993b77b1d3fec7a55dbf99d6b 100644
--- a/runtime/quark/codelets/codelet_ztslqt.c
+++ b/runtime/quark/codelets/codelet_ztslqt.c
@@ -28,8 +28,26 @@
  * @precisions normal z -> c d s
  *
  **/
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_ztslqt_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *TAU;
+    MORSE_Complex64_t *WORK;
+
+    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+    CORE_ztslqt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+}
 
 /**
  *
@@ -127,22 +145,3 @@ void MORSE_TASK_ztslqt(const MORSE_option_t *options,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,          SCRATCH,
         0);
 }
-
-
-void CORE_ztslqt_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *TAU;
-    MORSE_Complex64_t *WORK;
-
-    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-    CORE_ztslqt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-}
diff --git a/runtime/quark/codelets/codelet_ztsmlq.c b/runtime/quark/codelets/codelet_ztsmlq.c
index 81dc27110abc0f7c761542fba7e4adafd2c395cf..fad50baaf05d270c7c2b86067f4b4617a1407829 100644
--- a/runtime/quark/codelets/codelet_ztsmlq.c
+++ b/runtime/quark/codelets/codelet_ztsmlq.c
@@ -30,7 +30,35 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_ztsmlq_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum trans;
+    int m1;
+    int n1;
+    int m2;
+    int n2;
+    int k;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *V;
+    int ldv;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *WORK;
+    int ldwork;
+
+    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
+                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+    CORE_ztsmlq(side, trans, m1, n1, m2, n2, k, ib,
+                A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+}
 
 /**
  *
@@ -131,7 +159,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_ztsmlq(const MORSE_option_t *options,
                        MORSE_enum side, MORSE_enum trans,
                        int m1, int n1, int m2, int n2, int k, int ib, int nb,
@@ -165,31 +192,3 @@ void MORSE_TASK_ztsmlq(const MORSE_option_t *options,
         sizeof(int),                        &ldwork, VALUE,
         0);
 }
-
-
-void CORE_ztsmlq_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum trans;
-    int m1;
-    int n1;
-    int m2;
-    int n2;
-    int k;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *V;
-    int ldv;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *WORK;
-    int ldwork;
-
-    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
-                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-    CORE_ztsmlq(side, trans, m1, n1, m2, n2, k, ib,
-                A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-}
diff --git a/runtime/quark/codelets/codelet_ztsmlq_hetra1.c b/runtime/quark/codelets/codelet_ztsmlq_hetra1.c
index b381e12e2ae9762c283be3d6a081c29affa709f9..3b358ea005676daebd69787aec1e87f702421288 100644
--- a/runtime/quark/codelets/codelet_ztsmlq_hetra1.c
+++ b/runtime/quark/codelets/codelet_ztsmlq_hetra1.c
@@ -25,7 +25,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_ztsmlq_hetra1_quark(Quark *quark)
 {
diff --git a/runtime/quark/codelets/codelet_ztsmqr.c b/runtime/quark/codelets/codelet_ztsmqr.c
index aaff66e2830d3a352d9858a652025ce14e88d4d5..b29f61561fa1be124f1a499caf3aab659cda2ba8 100644
--- a/runtime/quark/codelets/codelet_ztsmqr.c
+++ b/runtime/quark/codelets/codelet_ztsmqr.c
@@ -30,7 +30,35 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_ztsmqr_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum trans;
+    int m1;
+    int n1;
+    int m2;
+    int n2;
+    int k;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *V;
+    int ldv;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *WORK;
+    int ldwork;
+
+    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
+                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+    CORE_ztsmqr(side, trans, m1, n1, m2, n2, k, ib,
+                A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+}
 
 /**
  *
@@ -131,7 +159,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_ztsmqr(const MORSE_option_t *options,
                        MORSE_enum side, MORSE_enum trans,
                        int m1, int n1, int m2, int n2, int k, int ib, int nb,
@@ -165,31 +192,3 @@ void MORSE_TASK_ztsmqr(const MORSE_option_t *options,
         sizeof(int),                        &ldwork, VALUE,
         0);
 }
-
-
-void CORE_ztsmqr_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum trans;
-    int m1;
-    int n1;
-    int m2;
-    int n2;
-    int k;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *V;
-    int ldv;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *WORK;
-    int ldwork;
-
-    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
-                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-    CORE_ztsmqr(side, trans, m1, n1, m2, n2, k, ib,
-                A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-}
diff --git a/runtime/quark/codelets/codelet_ztsmqr_hetra1.c b/runtime/quark/codelets/codelet_ztsmqr_hetra1.c
index 5e7277eef07f5a26ff0d7608c59cd71da4c6425e..df680204cb9a407fb9e545814f8619369355ec18 100644
--- a/runtime/quark/codelets/codelet_ztsmqr_hetra1.c
+++ b/runtime/quark/codelets/codelet_ztsmqr_hetra1.c
@@ -25,7 +25,8 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
 void CORE_ztsmqr_hetra1_quark(Quark *quark)
 {
diff --git a/runtime/quark/codelets/codelet_ztsqrt.c b/runtime/quark/codelets/codelet_ztsqrt.c
index 76546d31e37c9a07f8e77ab1a2f61ffddbf52d13..73858e63400b5e3bb64818508bb7003d7d4c27ab 100644
--- a/runtime/quark/codelets/codelet_ztsqrt.c
+++ b/runtime/quark/codelets/codelet_ztsqrt.c
@@ -28,8 +28,26 @@
  * @precisions normal z -> c d s
  *
  **/
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_ztsqrt_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *TAU;
+    MORSE_Complex64_t *WORK;
+
+    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+    CORE_ztsqrt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+}
 
 /**
  *
@@ -93,7 +111,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_ztsqrt(const MORSE_option_t *options,
                        int m, int n, int ib, int nb,
                        const MORSE_desc_t *A1, int A1m, int A1n, int lda1,
@@ -116,22 +133,3 @@ void MORSE_TASK_ztsqrt(const MORSE_option_t *options,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,          SCRATCH,
         0);
 }
-
-
-void CORE_ztsqrt_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *TAU;
-    MORSE_Complex64_t *WORK;
-
-    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-    CORE_ztsqrt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-}
diff --git a/runtime/quark/codelets/codelet_ztstrf.c b/runtime/quark/codelets/codelet_ztstrf.c
index 6243a2aa9a0a98c711707049964c544fb905adba..c035d2cac36aa037fd7ad74d8591639b46b9cba4 100644
--- a/runtime/quark/codelets/codelet_ztstrf.c
+++ b/runtime/quark/codelets/codelet_ztstrf.c
@@ -28,10 +28,39 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 #include "coreblas/cblas.h"
 #include <math.h>
 
+void CORE_ztstrf_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    int nb;
+    MORSE_Complex64_t *U;
+    int ldu;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *L;
+    int ldl;
+    int *IPIV;
+    MORSE_Complex64_t *WORK;
+    int ldwork;
+    MORSE_sequence_t *sequence;
+    MORSE_request_t *request;
+    MORSE_bool check_info;
+    int iinfo;
+
+    int info;
+
+    quark_unpack_args_17(quark, m, n, ib, nb, U, ldu, A, lda, L, ldl, IPIV, WORK, ldwork, sequence, request, check_info, iinfo);
+    CORE_ztstrf(m, n, ib, nb, U, ldu, A, lda, L, ldl, IPIV, WORK, ldwork, &info);
+    if (info != MORSE_SUCCESS && check_info)
+        RUNTIME_sequence_flush(quark, sequence, request, iinfo + info);
+}
+
 /***************************************************************************//**
  *
  * @ingroup CORE_MORSE_Complex64_t
@@ -98,7 +127,6 @@
  *              to solve a system of equations.
  *
  ******************************************************************************/
-
 void MORSE_TASK_ztstrf(const MORSE_option_t *options,
                        int m, int n, int ib, int nb,
                        const MORSE_desc_t *U, int Um, int Un, int ldu,
@@ -129,32 +157,3 @@ void MORSE_TASK_ztstrf(const MORSE_option_t *options,
         sizeof(int),                        &iinfo,         VALUE,
         0);
 }
-
-
-void CORE_ztstrf_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    int nb;
-    MORSE_Complex64_t *U;
-    int ldu;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *L;
-    int ldl;
-    int *IPIV;
-    MORSE_Complex64_t *WORK;
-    int ldwork;
-    MORSE_sequence_t *sequence;
-    MORSE_request_t *request;
-    MORSE_bool check_info;
-    int iinfo;
-
-    int info;
-
-    quark_unpack_args_17(quark, m, n, ib, nb, U, ldu, A, lda, L, ldl, IPIV, WORK, ldwork, sequence, request, check_info, iinfo);
-    CORE_ztstrf(m, n, ib, nb, U, ldu, A, lda, L, ldl, IPIV, WORK, ldwork, &info);
-    if (info != MORSE_SUCCESS && check_info)
-        RUNTIME_sequence_flush(quark, sequence, request, iinfo + info);
-}
diff --git a/runtime/quark/codelets/codelet_zttlqt.c b/runtime/quark/codelets/codelet_zttlqt.c
index 98b42550badcdc8053a720b467e32b04562ca32f..2113531dea161a2e15fda48dfc53400d57eb2212 100644
--- a/runtime/quark/codelets/codelet_zttlqt.c
+++ b/runtime/quark/codelets/codelet_zttlqt.c
@@ -28,8 +28,26 @@
  * @precisions normal z -> c d s
  *
  **/
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_zttlqt_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *TAU;
+    MORSE_Complex64_t *WORK;
+
+    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+    CORE_zttlqt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+}
 
 /**
  *
@@ -105,7 +123,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zttlqt(const MORSE_option_t *options,
                        int m, int n, int ib, int nb,
                        const MORSE_desc_t *A1, int A1m, int A1n, int lda1,
@@ -128,22 +145,3 @@ void MORSE_TASK_zttlqt(const MORSE_option_t *options,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,          SCRATCH,
         0);
 }
-
-
-void CORE_zttlqt_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *TAU;
-    MORSE_Complex64_t *WORK;
-
-    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-    CORE_zttlqt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-}
diff --git a/runtime/quark/codelets/codelet_zttmlq.c b/runtime/quark/codelets/codelet_zttmlq.c
index cab48f44c9701c937ceeb596b87498a3bd4a7bdf..3900a4fb984e9b1062e6af0a87bafe50db8df0e4 100644
--- a/runtime/quark/codelets/codelet_zttmlq.c
+++ b/runtime/quark/codelets/codelet_zttmlq.c
@@ -28,7 +28,35 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zttmlq_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum trans;
+    int m1;
+    int n1;
+    int m2;
+    int n2;
+    int k;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *V;
+    int ldv;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *WORK;
+    int ldwork;
+
+    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
+                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+    CORE_zttmlq(side, trans, m1, n1, m2, n2, k, ib, A1, lda1,
+                A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+}
 
 /**
  *
@@ -123,7 +151,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zttmlq(const MORSE_option_t *options,
                        MORSE_enum side, MORSE_enum trans,
                        int m1, int n1, int m2, int n2, int k, int ib, int nb,
@@ -157,31 +184,3 @@ void MORSE_TASK_zttmlq(const MORSE_option_t *options,
         sizeof(int),                        &ldwork,    VALUE,
         0);
 }
-
-
-void CORE_zttmlq_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum trans;
-    int m1;
-    int n1;
-    int m2;
-    int n2;
-    int k;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *V;
-    int ldv;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *WORK;
-    int ldwork;
-
-    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
-                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-    CORE_zttmlq(side, trans, m1, n1, m2, n2, k, ib, A1, lda1,
-                A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-}
diff --git a/runtime/quark/codelets/codelet_zttmqr.c b/runtime/quark/codelets/codelet_zttmqr.c
index 849a5454d18cd3961205a47d95cf08cd63552314..ed3a77323aa1f6de9657905e6dd5fd1ddc07e263 100644
--- a/runtime/quark/codelets/codelet_zttmqr.c
+++ b/runtime/quark/codelets/codelet_zttmqr.c
@@ -28,7 +28,35 @@
  * @precisions normal z -> c d s
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zttmqr_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum trans;
+    int m1;
+    int n1;
+    int m2;
+    int n2;
+    int k;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *V;
+    int ldv;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *WORK;
+    int ldwork;
+
+    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
+                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+    CORE_zttmqr(side, trans, m1, n1, m2, n2, k, ib,
+                A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
+}
 
 /**
  *
@@ -123,7 +151,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zttmqr(const MORSE_option_t *options,
                        MORSE_enum side, MORSE_enum trans,
                        int m1, int n1, int m2, int n2, int k, int ib, int nb,
@@ -157,31 +184,3 @@ void MORSE_TASK_zttmqr(const MORSE_option_t *options,
         sizeof(int),                        &ldwork,    VALUE,
         0);
 }
-
-
-void CORE_zttmqr_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum trans;
-    int m1;
-    int n1;
-    int m2;
-    int n2;
-    int k;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *V;
-    int ldv;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *WORK;
-    int ldwork;
-
-    quark_unpack_args_18(quark, side, trans, m1, n1, m2, n2, k, ib,
-                         A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-    CORE_zttmqr(side, trans, m1, n1, m2, n2, k, ib,
-                A1, lda1, A2, lda2, V, ldv, T, ldt, WORK, ldwork);
-}
diff --git a/runtime/quark/codelets/codelet_zttqrt.c b/runtime/quark/codelets/codelet_zttqrt.c
index 06106fc5a84299a1874116eb04670662470ecd69..8c3f9c4f54d9c1ed54d6473ba4fb789072a4b924 100644
--- a/runtime/quark/codelets/codelet_zttqrt.c
+++ b/runtime/quark/codelets/codelet_zttqrt.c
@@ -28,8 +28,26 @@
  * @precisions normal z -> c d s
  *
  **/
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_zttqrt_quark(Quark *quark)
+{
+    int m;
+    int n;
+    int ib;
+    MORSE_Complex64_t *A1;
+    int lda1;
+    MORSE_Complex64_t *A2;
+    int lda2;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *TAU;
+    MORSE_Complex64_t *WORK;
+
+    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+    CORE_zttqrt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
+}
 
 /**
  *
@@ -105,7 +123,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zttqrt(const MORSE_option_t *options,
                        int m, int n, int ib, int nb,
                        const MORSE_desc_t *A1, int A1m, int A1n, int lda1,
@@ -128,22 +145,3 @@ void MORSE_TASK_zttqrt(const MORSE_option_t *options,
         sizeof(MORSE_Complex64_t)*ib*nb,    NULL,          SCRATCH,
         0);
 }
-
-
-void CORE_zttqrt_quark(Quark *quark)
-{
-    int m;
-    int n;
-    int ib;
-    MORSE_Complex64_t *A1;
-    int lda1;
-    MORSE_Complex64_t *A2;
-    int lda2;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *TAU;
-    MORSE_Complex64_t *WORK;
-
-    quark_unpack_args_11(quark, m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-    CORE_zttqrt(m, n, ib, A1, lda1, A2, lda2, T, ldt, TAU, WORK);
-}
diff --git a/runtime/quark/codelets/codelet_zunmlq.c b/runtime/quark/codelets/codelet_zunmlq.c
index 1ae6b0899667469aad7ca8ba0376430622e50af2..774acb280fabcaebbf03d2997fef5c261ead8d15 100644
--- a/runtime/quark/codelets/codelet_zunmlq.c
+++ b/runtime/quark/codelets/codelet_zunmlq.c
@@ -30,7 +30,31 @@
  *
  **/
 
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
+
+void CORE_zunmlq_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum trans;
+    int m;
+    int n;
+    int k;
+    int ib;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *C;
+    int ldc;
+    MORSE_Complex64_t *WORK;
+    int ldwork;
+
+    quark_unpack_args_14(quark, side, trans, m, n, k, ib,
+                         A, lda, T, ldt, C, ldc, WORK, ldwork);
+    CORE_zunmlq(side, trans, m, n, k, ib,
+                A, lda, T, ldt, C, ldc, WORK, ldwork);
+}
 
 /**
  *
@@ -115,7 +139,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zunmlq(const MORSE_option_t *options,
                        MORSE_enum side, MORSE_enum trans,
                        int m, int n, int k, int ib, int nb,
@@ -142,27 +165,3 @@ void MORSE_TASK_zunmlq(const MORSE_option_t *options,
         sizeof(int),                     &nb,    VALUE,
         0);
 }
-
-
-void CORE_zunmlq_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum trans;
-    int m;
-    int n;
-    int k;
-    int ib;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *C;
-    int ldc;
-    MORSE_Complex64_t *WORK;
-    int ldwork;
-
-    quark_unpack_args_14(quark, side, trans, m, n, k, ib,
-                         A, lda, T, ldt, C, ldc, WORK, ldwork);
-    CORE_zunmlq(side, trans, m, n, k, ib,
-                A, lda, T, ldt, C, ldc, WORK, ldwork);
-}
diff --git a/runtime/quark/codelets/codelet_zunmqr.c b/runtime/quark/codelets/codelet_zunmqr.c
index 01e9f150b909659302bd941f3cca8d80edc79154..ce8e8ea12b8293034f3c26ff49efed66d1247551 100644
--- a/runtime/quark/codelets/codelet_zunmqr.c
+++ b/runtime/quark/codelets/codelet_zunmqr.c
@@ -28,8 +28,31 @@
  * @precisions normal z -> c d s
  *
  **/
+#include "chameleon_quark.h"
+#include "chameleon/morse_tasks_z.h"
 
-#include "runtime/quark/include/morse_quark.h"
+void CORE_zunmqr_quark(Quark *quark)
+{
+    MORSE_enum side;
+    MORSE_enum trans;
+    int m;
+    int n;
+    int k;
+    int ib;
+    MORSE_Complex64_t *A;
+    int lda;
+    MORSE_Complex64_t *T;
+    int ldt;
+    MORSE_Complex64_t *C;
+    int ldc;
+    MORSE_Complex64_t *WORK;
+    int ldwork;
+
+    quark_unpack_args_14(quark, side, trans, m, n, k, ib,
+                         A, lda, T, ldt, C, ldc, WORK, ldwork);
+    CORE_zunmqr(side, trans, m, n, k, ib,
+                A, lda, T, ldt, C, ldc, WORK, ldwork);
+}
 
 /**
  *
@@ -115,7 +138,6 @@
  *          \retval <0 if -i, the i-th argument had an illegal value
  *
  ******************************************************************************/
-
 void MORSE_TASK_zunmqr(const MORSE_option_t *options,
                        MORSE_enum side, MORSE_enum trans,
                        int m, int n, int k, int ib, int nb,
@@ -142,27 +164,3 @@ void MORSE_TASK_zunmqr(const MORSE_option_t *options,
         sizeof(int),                     &nb,    VALUE,
         0);
 }
-
-
-void CORE_zunmqr_quark(Quark *quark)
-{
-    MORSE_enum side;
-    MORSE_enum trans;
-    int m;
-    int n;
-    int k;
-    int ib;
-    MORSE_Complex64_t *A;
-    int lda;
-    MORSE_Complex64_t *T;
-    int ldt;
-    MORSE_Complex64_t *C;
-    int ldc;
-    MORSE_Complex64_t *WORK;
-    int ldwork;
-
-    quark_unpack_args_14(quark, side, trans, m, n, k, ib,
-                         A, lda, T, ldt, C, ldc, WORK, ldwork);
-    CORE_zunmqr(side, trans, m, n, k, ib,
-                A, lda, T, ldt, C, ldc, WORK, ldwork);
-}
diff --git a/runtime/quark/control/runtime_async.c b/runtime/quark/control/runtime_async.c
index 8b7fc2c78f4e6d936aa5893c1649fc641f813c33..78692bba577fb10a1f2c131158249620071f1fe2 100644
--- a/runtime/quark/control/runtime_async.c
+++ b/runtime/quark/control/runtime_async.c
@@ -24,7 +24,7 @@
  *
  **/
 #include <stdlib.h>
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 /** *****************************************************************************
  *  Create a sequence
diff --git a/runtime/quark/control/runtime_context.c b/runtime/quark/control/runtime_context.c
index 1352ad5116896473853d25fe836e591b274d3026..8dca38a9aa53d8903119a15857c404c164205f4a 100644
--- a/runtime/quark/control/runtime_context.c
+++ b/runtime/quark/control/runtime_context.c
@@ -23,7 +23,7 @@
  *
  **/
 #include <stdlib.h>
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 /*******************************************************************************
  *  Create new context
diff --git a/runtime/quark/control/runtime_control.c b/runtime/quark/control/runtime_control.c
index fc4639fbe42f95be253bd074899e186f738eca44..a92f726d02899bf13b4edac6bcf5599c840d7334 100644
--- a/runtime/quark/control/runtime_control.c
+++ b/runtime/quark/control/runtime_control.c
@@ -24,7 +24,7 @@
  **/
 #include <stdio.h>
 #include <stdlib.h>
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 /*******************************************************************************
  * Thread rank.
diff --git a/runtime/quark/control/runtime_descriptor.c b/runtime/quark/control/runtime_descriptor.c
index 6e4dfa9d20ede9b54e254972890e5d297df4b53e..b1e47144b2b2bdac64d9e46ebdcbd7fd3f8ca6f3 100644
--- a/runtime/quark/control/runtime_descriptor.c
+++ b/runtime/quark/control/runtime_descriptor.c
@@ -23,7 +23,7 @@
  *
  **/
 #include <stdlib.h>
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 void RUNTIME_user_tag_size(int user_tag_width, int user_tag_sep) {
   (void)user_tag_width;
diff --git a/runtime/quark/control/runtime_options.c b/runtime/quark/control/runtime_options.c
index 9cd642706f563cf659449ff84dcff0448ff0c3b5..827e2b4b129a6efc2fffe0e56aad02b985fa419e 100644
--- a/runtime/quark/control/runtime_options.c
+++ b/runtime/quark/control/runtime_options.c
@@ -24,7 +24,7 @@
  **/
 #include <stdio.h>
 #include <stdlib.h>
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 void RUNTIME_options_init( MORSE_option_t *options, MORSE_context_t *morse,
                            MORSE_sequence_t *sequence, MORSE_request_t *request )
diff --git a/runtime/quark/control/runtime_profiling.c b/runtime/quark/control/runtime_profiling.c
index 0db7e55137b161719747d2d3f4866a4288167256..552ee387c4945c59d1645cbd21ce43435cda9bab 100644
--- a/runtime/quark/control/runtime_profiling.c
+++ b/runtime/quark/control/runtime_profiling.c
@@ -22,7 +22,7 @@
  * @date 2011-10-29 
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 #if defined( _WIN32 ) || defined( _WIN64 )
 #include <windows.h>
diff --git a/runtime/quark/control/runtime_zlocality.c b/runtime/quark/control/runtime_zlocality.c
index 1cf57754bb7df00416b329094c38b4c81a03a9b7..4d5ed31f7d4ecca97919c84985c1d95347c2fb89 100644
--- a/runtime/quark/control/runtime_zlocality.c
+++ b/runtime/quark/control/runtime_zlocality.c
@@ -23,7 +23,7 @@
  *  @precisions normal z -> s d c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 void RUNTIME_zlocality_allrestrict( uint32_t where )
 {
diff --git a/runtime/quark/control/runtime_zprofiling.c b/runtime/quark/control/runtime_zprofiling.c
index 29fdb7797fe2b8a5ae29d1b824bdaa0a6ff742dd..519dc9543e4cb22d610188d517cc4674c36c3b6b 100644
--- a/runtime/quark/control/runtime_zprofiling.c
+++ b/runtime/quark/control/runtime_zprofiling.c
@@ -25,7 +25,7 @@
  *  @precisions normal z -> s d c
  *
  **/
-#include "runtime/quark/include/morse_quark.h"
+#include "chameleon_quark.h"
 
 void RUNTIME_zdisplay_allprofile()
 {
diff --git a/runtime/quark/include/morse_quark.h b/runtime/quark/include/chameleon_quark.h
similarity index 89%
rename from runtime/quark/include/morse_quark.h
rename to runtime/quark/include/chameleon_quark.h
index 668531873eff69714342b7fd5aaf24952c09ac4b..50d11f52188dcdd8759820714aa9486cfb5be11b 100644
--- a/runtime/quark/include/morse_quark.h
+++ b/runtime/quark/include/chameleon_quark.h
@@ -10,7 +10,7 @@
 
 /**
  *
- * @file morse_quark.h
+ * @file chameleon_quark.h
  *
  *  MORSE codelets kernel
  *  MORSE is a software package provided by Univ. of Tennessee,
@@ -27,9 +27,8 @@
 #define _MORSE_QUARK_H_
 
 #include <quark.h>
-#include "coreblas/coreblas.h"
-#include "runtime/quark/include/quark_blas.h"
-#include "runtime/quark/include/core_blas_dag.h"
+#include "coreblas.h"
+#include "core_blas_dag.h"
 
 #include "control/common.h"
 
diff --git a/runtime/quark/include/quark_blas.h b/runtime/quark/include/quark_blas.h
deleted file mode 100644
index fc175fdfe2551ce29ea6446fd03ed60a0408f065..0000000000000000000000000000000000000000
--- a/runtime/quark/include/quark_blas.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- *
- * @copyright (c) 2009-2014 The University of Tennessee and The University
- *                          of Tennessee Research Foundation.
- *                          All rights reserved.
- * @copyright (c) 2012-2014 Inria. All rights reserved.
- * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
- *
- **/
-
-/**
- *
- * @file quark_blas.h
- *
- *  MORSE auxiliary routines
- *  MORSE is a software package provided by Univ. of Tennessee,
- *  Univ. of California Berkeley and Univ. of Colorado Denver
- *
- * @version 0.9.0
- * @author Jakub Kurzak
- * @author Hatem Ltaief
- * @date 2010-11-15
- *
- **/
-#ifndef _QUARK_BLAS_H_
-#define _QUARK_BLAS_H_
-
-#include "coreblas/cblas.h"
-
-#include "runtime/quark/include/quark_zblas.h"
-#include "runtime/quark/include/quark_dblas.h"
-#include "runtime/quark/include/quark_cblas.h"
-#include "runtime/quark/include/quark_sblas.h"
-#include "runtime/quark/include/quark_zcblas.h"
-#include "runtime/quark/include/quark_dsblas.h"
-
-void CORE_ztile_zero_quark(Quark *quark);
-void CORE_dtile_zero_quark(Quark *quark);
-void CORE_ctile_zero_quark(Quark *quark);
-void CORE_stile_zero_quark(Quark *quark);
-
-#endif
diff --git a/runtime/quark/include/quark_zblas.h b/runtime/quark/include/quark_zblas.h
deleted file mode 100644
index e5fe96bac53a1ab8c8eea44c212fc75d5309788f..0000000000000000000000000000000000000000
--- a/runtime/quark/include/quark_zblas.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/**
- *
- * @copyright (c) 2009-2014 The University of Tennessee and The University
- *                          of Tennessee Research Foundation.
- *                          All rights reserved.
- * @copyright (c) 2012-2014 Inria. All rights reserved.
- * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
- *
- **/
-
-/**
- *
- * @file quark_zblas.h
- *
- *  MORSE auxiliary routines
- *  MORSE is a software package provided by Univ. of Tennessee,
- *  Univ. of California Berkeley and Univ. of Colorado Denver
- *
- * @version 2.5.0
- * @comment This file has been automatically generated
- *          from Plasma 2.5.0 for MORSE 1.0.0
- * @author Jakub Kurzak
- * @author Hatem Ltaief
- * @author Azzam Haidar
- * @author Mathieu Faverge
- * @author Emmanuel Agullo
- * @author Cedric Castagnede
- * @date 2010-11-15
- * @precisions normal z -> c d s
- *
- **/
-#ifndef _QUARK_ZBLAS_H_
-#define _QUARK_ZBLAS_H_
-
-#define COMPLEX
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/** ****************************************************************************
- *  Declarations of QUARK wrappers (called by QUARK) - alphabetical order
- **/
-void CORE_dzasum_quark(Quark *quark);
-void CORE_dzasum_f1_quark(Quark *quark);
-void CORE_zaxpy_quark(Quark *quark);
-void CORE_zgeadd_quark(Quark *quark);
-void CORE_zbrdalg_quark(Quark *quark);
-void CORE_zgelqt_quark(Quark *quark);
-void CORE_zgemm_quark(Quark *quark);
-void CORE_zgeqrt_quark(Quark *quark);
-void CORE_zgessm_quark(Quark *quark);
-void CORE_zgessq_quark(Quark *quark);
-void CORE_zgetrf_quark(Quark *quark);
-void CORE_zgetrf_incpiv_quark(Quark *quark);
-void CORE_zgetrf_nopiv_quark(Quark *quark);
-void CORE_zgetrf_reclap_quark(Quark *quark);
-void CORE_zgetrf_rectil_quark(Quark* quark);
-void CORE_zgetrip_quark(Quark *quark);
-void CORE_zgetrip_f1_quark(Quark *quark);
-void CORE_zgetrip_f2_quark(Quark *quark);
-#ifdef COMPLEX
-void CORE_zhemm_quark(Quark *quark);
-void CORE_zherk_quark(Quark *quark);
-void CORE_zher2k_quark(Quark *quark);
-#endif
-void CORE_zhegst_quark(Quark *quark);
-void CORE_zherfb_quark(Quark *quark);
-void CORE_zhessq_quark(Quark *quark);
-void CORE_zlatro_quark(Quark *quark);
-void CORE_zlange_quark(Quark *quark);
-void CORE_zlange_max_quark(Quark *quark);
-#ifdef COMPLEX
-void CORE_zlanhe_quark(Quark *quark);
-#endif
-void CORE_zlansy_quark(Quark *quark);
-void CORE_zlantr_quark(Quark *quark);
-void CORE_zlaset_quark(Quark *quark);
-void CORE_zlaset2_quark(Quark *quark);
-void CORE_zlatro_quark(Quark *quark);
-void CORE_zlauum_quark(Quark *quark);
-void CORE_zpamm_quark(Quark *quark);
-void CORE_zplghe_quark(Quark *quark);
-void CORE_zplgsy_quark(Quark *quark);
-void CORE_zplrnt_quark(Quark *quark);
-void CORE_zplssq_quark(Quark *quark);
-void CORE_zplssq2_quark(Quark *quark);
-void CORE_zpotrf_quark(Quark *quark);
-void CORE_zshift_quark(Quark *quark);
-void CORE_zshiftw_quark(Quark *quark);
-void CORE_zssssm_quark(Quark *quark);
-void CORE_zsymm_quark(Quark *quark);
-void CORE_zsyrk_quark(Quark *quark);
-void CORE_zsyr2k_quark(Quark *quark);
-void CORE_zsyssq_quark(Quark *quark);
-void CORE_zsytrf_nopiv_quark(Quark *quark);
-void CORE_zswpab_quark(Quark *quark);
-void CORE_zswptr_ontile_quark(Quark *quark);
-void CORE_ztrasm_quark(Quark *quark);
-void CORE_ztrdalg_quark(Quark *quark);
-void CORE_ztrmm_quark(Quark *quark);
-void CORE_ztrsm_quark(Quark *quark);
-void CORE_ztrssq_quark(Quark *quark);
-void CORE_ztrtri_quark(Quark *quark);
-void CORE_ztslqt_quark(Quark *quark);
-void CORE_ztsmlq_quark(Quark *quark);
-void CORE_ztsmlq_hetra1_quark(Quark *quark);
-void CORE_ztsmlq_corner_quark(Quark *quark);
-void CORE_ztsmqr_quark(Quark *quark);
-void CORE_ztsmqr_hetra1_quark(Quark *quark);
-void CORE_ztsmqr_corner_quark(Quark *quark);
-void CORE_ztsqrt_quark(Quark *quark);
-void CORE_ztstrf_quark(Quark *quark);
-void CORE_zttmqr_quark(Quark *quark);
-void CORE_zttqrt_quark(Quark *quark);
-void CORE_zttmlq_quark(Quark *quark);
-void CORE_zttlqt_quark(Quark *quark);
-void CORE_zunmlq_quark(Quark *quark);
-void CORE_zunmqr_quark(Quark *quark);
-
-void CORE_zlaswp_quark(Quark* quark);
-void CORE_zlaswp_f2_quark(Quark* quark);
-void CORE_zlaswp_ontile_quark(Quark *quark);
-void CORE_zlaswp_ontile_f2_quark(Quark *quark);
-void CORE_zlaswpc_ontile_quark(Quark *quark);
-void CORE_ztrmm_p2_quark(Quark* quark);
-void CORE_zgemm_f2_quark(Quark* quark);
-void CORE_zgemm_p2_quark(Quark* quark);
-void CORE_zgemm_p2f1_quark(Quark* quark);
-void CORE_zgemm_p3_quark(Quark* quark);
-
-void CORE_zbuild_quark(Quark *quark);
-
-#ifdef __cplusplus
-}
-#endif
-
-#undef COMPLEX
-
-#endif
diff --git a/runtime/quark/include/quark_zcblas.h b/runtime/quark/include/quark_zcblas.h
deleted file mode 100644
index 2f14a3ae6a6fadf1346b5e95e9fcc370c6d49f44..0000000000000000000000000000000000000000
--- a/runtime/quark/include/quark_zcblas.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- *
- * @copyright (c) 2009-2014 The University of Tennessee and The University
- *                          of Tennessee Research Foundation.
- *                          All rights reserved.
- * @copyright (c) 2012-2014 Inria. All rights reserved.
- * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
- *
- **/
-
-/**
- *
- * @file quark_zcblas.h
- *
- *  MORSE auxiliary routines
- *  MORSE is a software package provided by Univ. of Tennessee,
- *  Univ. of California Berkeley and Univ. of Colorado Denver
- *
- * @version 2.5.0
- * @comment This file has been automatically generated
- *          from Plasma 2.5.0 for MORSE 1.0.0
- * @author Jakub Kurzak
- * @author Hatem Ltaief
- * @author Mathieu Faverge
- * @author Emmanuel Agullo
- * @author Cedric Castagnede
- * @date 2010-11-15
- * @precisions mixed zc -> ds
- *
- **/
-#ifndef _QUARK_ZCBLAS_H_
-#define _QUARK_ZCBLAS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/** ****************************************************************************
- *  Declarations of QUARK wrappers (called by QUARK) - alphabetical order
- **/
-void CORE_clag2z_quark(Quark *quark);
-void CORE_zlag2c_quark(Quark *quark);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif