diff --git a/cmake_modules/morse_cmake b/cmake_modules/morse_cmake
index fdf4c92ee3e218e8c1eb5354c1bcddcbef10756a..0540e73689762bfb5a3c9e8231de3cc1d14cf4dd 160000
--- a/cmake_modules/morse_cmake
+++ b/cmake_modules/morse_cmake
@@ -1 +1 @@
-Subproject commit fdf4c92ee3e218e8c1eb5354c1bcddcbef10756a
+Subproject commit 0540e73689762bfb5a3c9e8231de3cc1d14cf4dd
diff --git a/compute/zheevd.c b/compute/zheevd.c
index ca26b4e14b3cb8a237117309f37a812dc1d47278..33bd7a3e78b308f660096a66e06defd4bc03c39a 100644
--- a/compute/zheevd.c
+++ b/compute/zheevd.c
@@ -483,7 +483,7 @@ int CHAMELEON_zheevd_Tile_Async( cham_job_t jobz, cham_uplo_t uplo,
 #if defined(CHAMELEON_COPY_DIAG)
         {
             int n = chameleon_min(A->mt, A->nt) * A->nb;
-            chameleon_zdesc_alloc(D, A->mb, A->nb, A->m, n, 0, 0, A->m, n, );
+            chameleon_zdesc_alloc(D, A->mb, A->nb, A->m, n, 0, 0, A->m, n, CHAMELEON_zgemm_WS_Free( gemm_ws ) );
             Dptr = &D;
         }
 #endif
diff --git a/control/auxiliary.c b/control/auxiliary.c
index b2fec846167bf23757f05e6a1016fcdf9ef8eb30..a27dd9dec347b5d468e5c6cb097733c178f513cd 100644
--- a/control/auxiliary.c
+++ b/control/auxiliary.c
@@ -235,8 +235,8 @@ void update_progress(int currentValue, int maximumValue) {
             res = div(currentValue*100, maximumValue);
         }
         else {
-            /* Calcule le quotient de la division */
-            res.quot = (int)( (long long)( currentValue * 100 ) / maximumValue );
+            /* Compute the quotient */
+            res.quot = (int)( ((double)currentValue * 100.) / (double)maximumValue );
         }
     }
 
diff --git a/control/descriptor_rec.c b/control/descriptor_rec.c
index 7c388eb9072c19e1e3cbeb6749c5436491ad8b99..c5c430a6d5b2041e86706f39b3d5c0a23f4a326b 100644
--- a/control/descriptor_rec.c
+++ b/control/descriptor_rec.c
@@ -76,15 +76,15 @@ chameleon_recdesc_create( const char *name, CHAM_desc_t **descptr, void *mat, ch
 
             chameleon_asprintf( &subname, "%s[%d,%d]", name, m, n );
 
-            chameleon_recdesc_create( subname, &tiledesc, tile->mat,
-                                      desc->dtyp, mb, nb,
-                                      tile->ld, tempnn, /* Abuse as ln is not used */
-                                      tempmm, tempnn,
-                                      1, 1,             /* can recurse only on local data */
-                                      chameleon_getaddr_cm, chameleon_getblkldd_cm, NULL);
+            rc = chameleon_recdesc_create( subname, &tiledesc, tile->mat,
+                                           desc->dtyp, mb, nb,
+                                           tile->ld, tempnn, /* Abuse as ln is not used */
+                                           tempmm, tempnn,
+                                           1, 1,             /* can recurse only on local data */
+                                           chameleon_getaddr_cm, chameleon_getblkldd_cm, NULL);
 
             tile->format = CHAMELEON_TILE_DESC;
-            tile->mat = tiledesc;
+            tile->mat    = tiledesc;
 
             if ( rc != CHAMELEON_SUCCESS ) {
                 return rc;
diff --git a/hqr b/hqr
index aa6617c4780f00018477320e129bbd26a425b85e..46117aee1e9a16c0da17224b8c7aa4e3213291e8 160000
--- a/hqr
+++ b/hqr
@@ -1 +1 @@
-Subproject commit aa6617c4780f00018477320e129bbd26a425b85e
+Subproject commit 46117aee1e9a16c0da17224b8c7aa4e3213291e8
diff --git a/testing/testing_zcesca.c b/testing/testing_zcesca.c
index b1ee5813a86fdb99d9968b2fdd77d928daa87eb3..4faa15d4ce20b2066cc0800f5bf5f6c3dba2766b 100644
--- a/testing/testing_zcesca.c
+++ b/testing/testing_zcesca.c
@@ -52,7 +52,7 @@ testing_zcesca_desc( run_arg_list_t *args, int check )
     int      N      = run_arg_get_int( args, "N", 1000 );
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -106,7 +106,7 @@ testing_zcesca_std( run_arg_list_t *args, int check )
     int N     = run_arg_get_int( args, "N", 1000 );
     int M     = run_arg_get_int( args, "M", N );
     int LDA   = run_arg_get_int( args, "LDA", M );
-    int seedA = run_arg_get_int( args, "seedA", random() );
+    int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zcheck_aux.c b/testing/testing_zcheck_aux.c
index 21069c62bf3845598b0b408f12948b5a0b3b5e50..af1f53e604fb23826f243a316b7ba527606a58e0 100644
--- a/testing/testing_zcheck_aux.c
+++ b/testing/testing_zcheck_aux.c
@@ -165,6 +165,8 @@ int check_zmatrices( run_arg_list_t *args, cham_uplo_t uplo, CHAM_desc_t *descA,
         A = (CHAMELEON_Complex64_t *)malloc((size_t)(LDA) * (size_t)(N) * sizeof(CHAMELEON_Complex64_t));
         B = (CHAMELEON_Complex64_t *)malloc((size_t)(LDB) * (size_t)(N) * sizeof(CHAMELEON_Complex64_t));
         if ( (A == NULL) || (B == NULL) ) {
+            free( A );
+            free( B );
             return CHAMELEON_ERR_OUT_OF_RESOURCES;
         }
     }
@@ -175,8 +177,8 @@ int check_zmatrices( run_arg_list_t *args, cham_uplo_t uplo, CHAM_desc_t *descA,
 
     if ( rank == 0 ) {
         info_solution = check_zmatrices_std( args, uplo, M, N, A, LDA, B, LDB );
-        free(A);
-        free(B);
+        free( A );
+        free( B );
     }
 
     /* Broadcasts the result from the main processus */
diff --git a/testing/testing_zgeadd.c b/testing/testing_zgeadd.c
index 98d475f53a18f370045fb3a61f94c7d994b88d36..a9586b0300da437c6ba1cfe80884ac67d16120be 100644
--- a/testing/testing_zgeadd.c
+++ b/testing/testing_zgeadd.c
@@ -55,8 +55,8 @@ testing_zgeadd_desc( run_arg_list_t *args, int check )
     int          M      = run_arg_get_int( args, "M", N );
     int          LDA    = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) );
     int          LDB    = run_arg_get_int( args, "LDB", M );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedB  = run_arg_get_int( args, "seedB", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int          Q      = parameters_compute_q( P );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
@@ -132,8 +132,8 @@ testing_zgeadd_std( run_arg_list_t *args, int check )
     int          M      = run_arg_get_int( args, "M", N );
     int          LDA    = run_arg_get_int( args, "LDA", ( ( trans == ChamNoTrans ) ? M : N ) );
     int          LDB    = run_arg_get_int( args, "LDB", M );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedB  = run_arg_get_int( args, "seedB", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
 
diff --git a/testing/testing_zgelqf.c b/testing/testing_zgelqf.c
index d9209a3a654052380be45557a90f578d76442a26..8fb1a40b373f455eb866c6d020af07b6389413e8 100644
--- a/testing/testing_zgelqf.c
+++ b/testing/testing_zgelqf.c
@@ -38,7 +38,7 @@ testing_zgelqf_desc( run_arg_list_t *args, int check )
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      RH     = run_arg_get_int( args, "qra", 4 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -114,7 +114,7 @@ testing_zgelqf_std( run_arg_list_t *args, int check )
     int M     = run_arg_get_int( args, "M", N );
     int LDA   = run_arg_get_int( args, "LDA", M );
     int RH    = run_arg_get_int( args, "qra", 4 );
-    int seedA = run_arg_get_int( args, "seedA", random() );
+    int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q     = parameters_compute_q( P );
     int K     = chameleon_min( M, N );
 
diff --git a/testing/testing_zgelqf_hqr.c b/testing/testing_zgelqf_hqr.c
index 45cfb63f8db479553f8976af03c8f8b4b567c8d4..0be27d670d875290ea43c3244a8fb5aa3b581479 100644
--- a/testing/testing_zgelqf_hqr.c
+++ b/testing/testing_zgelqf_hqr.c
@@ -42,7 +42,7 @@ testing_zgelqf_hqr_desc( run_arg_list_t *args, int check )
     int      llvl   = run_arg_get_int( args, "llvl", -1 );
     int      hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int      domino = run_arg_get_int( args, "domino", -1 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -129,7 +129,7 @@ testing_zgelqf_hqr_std( run_arg_list_t *args, int check )
     int llvl   = run_arg_get_int( args, "llvl", -1 );
     int hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int domino = run_arg_get_int( args, "domino", -1 );
-    int seedA  = run_arg_get_int( args, "seedA", random() );
+    int seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q      = parameters_compute_q( P );
     int K      = chameleon_min( M, N );
 
diff --git a/testing/testing_zgelqs.c b/testing/testing_zgelqs.c
index 1248e1c127b88022acf39ab87724a7f505aeed27..fc7b7cc88824671ddf8ad06385c3cdd0f435e7c2 100644
--- a/testing/testing_zgelqs.c
+++ b/testing/testing_zgelqs.c
@@ -48,8 +48,8 @@ testing_zgelqs_desc( run_arg_list_t *args, int check )
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      LDB    = run_arg_get_int( args, "LDB", M );
     int      RH     = run_arg_get_int( args, "qra", 0 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
-    int      seedB  = run_arg_get_int( args, "seedB", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int      seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zgels.c b/testing/testing_zgels.c
index 3ae6de342389819772b1c28b078c5cfa4176d8ba..a4dcacdcd9beca970a34a4e1b326218e2d6ec812 100644
--- a/testing/testing_zgels.c
+++ b/testing/testing_zgels.c
@@ -55,8 +55,8 @@ testing_zgels_desc( run_arg_list_t *args, int check )
     int          LDA    = run_arg_get_int( args, "LDA", M );
     int          LDB    = run_arg_get_int( args, "LDB", maxMN );
     int          RH     = run_arg_get_int( args, "qra", 4 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedB  = run_arg_get_int( args, "seedB", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -158,8 +158,8 @@ testing_zgels_std( run_arg_list_t *args, int check )
     int          LDA   = run_arg_get_int( args, "LDA", M );
     int          LDB   = run_arg_get_int( args, "LDB", maxMN );
     int          RH    = run_arg_get_int( args, "qra", 4 );
-    int          seedA = run_arg_get_int( args, "seedA", random() );
-    int          seedB = run_arg_get_int( args, "seedB", random() );
+    int          seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedB = run_arg_get_int( args, "seedB", testing_ialea() );
     int          Q     = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zgels_hqr.c b/testing/testing_zgels_hqr.c
index b4ad33d5b42d82d79c629838d36349d339063d54..15e84f2146caaeb8f463c82a410f43256c12aa49 100644
--- a/testing/testing_zgels_hqr.c
+++ b/testing/testing_zgels_hqr.c
@@ -59,8 +59,8 @@ testing_zgels_hqr_desc( run_arg_list_t *args, int check )
     int          llvl   = run_arg_get_int( args, "llvl", -1 );
     int          hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int          domino = run_arg_get_int( args, "domino", -1 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedB  = run_arg_get_int( args, "seedB", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -170,8 +170,8 @@ testing_zgels_hqr_std( run_arg_list_t *args, int check )
     int          llvl   = run_arg_get_int( args, "llvl", -1 );
     int          hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int          domino = run_arg_get_int( args, "domino", -1 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedB  = run_arg_get_int( args, "seedB", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zgemm.c b/testing/testing_zgemm.c
index 3cc72a49a3384a1cda52b3ad21d60408ade6dc20..242e007cdc55df907b7834071d6362379bafa488 100644
--- a/testing/testing_zgemm.c
+++ b/testing/testing_zgemm.c
@@ -49,9 +49,9 @@ testing_zgemm_desc( run_arg_list_t *args, int check )
     int          LDC    = run_arg_get_int( args, "LDC", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     int                   Q     = parameters_compute_q( P );
 
     /* Descriptors */
@@ -156,9 +156,9 @@ testing_zgemm_std( run_arg_list_t *args, int check )
     int          LDC    = run_arg_get_int( args, "LDC", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
 
     /* Descriptors */
     int                    Am, An, Bm, Bn;
diff --git a/testing/testing_zgenm2.c b/testing/testing_zgenm2.c
index d9f17be665961a7374fc5f1f98a0a0e1a69d8dd5..323888476e5c56cce785df7bda15642eaf147212 100644
--- a/testing/testing_zgenm2.c
+++ b/testing/testing_zgenm2.c
@@ -52,7 +52,7 @@ testing_zgenm2_desc( run_arg_list_t *args, int check )
     int      N      = run_arg_get_int( args, "N", 1000 );
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
     int      minMN  = chameleon_min( M, N );
     double   cond   = run_arg_get_double( args, "cond", 1.e16 );
@@ -136,7 +136,7 @@ testing_zgenm2_std( run_arg_list_t *args, int check )
     int    N     = run_arg_get_int( args, "N", 1000 );
     int    M     = run_arg_get_int( args, "M", N );
     int    LDA   = run_arg_get_int( args, "LDA", M );
-    int    seedA = run_arg_get_int( args, "seedA", random() );
+    int    seedA = run_arg_get_int( args, "seedA", testing_ialea() );
     int    minMN = chameleon_min( M, N );
     double cond  = run_arg_get_double( args, "cond", 1.e16 );
     int    mode  = run_arg_get_int( args, "mode", 4 );
diff --git a/testing/testing_zgepdf_qdwh.c b/testing/testing_zgepdf_qdwh.c
index 17cb18a4ac953d90b61fe565c52f0f652a2be4f3..4040ce1b8720461db56dc9fba1a262cf7d6f1139 100644
--- a/testing/testing_zgepdf_qdwh.c
+++ b/testing/testing_zgepdf_qdwh.c
@@ -44,7 +44,7 @@ testing_zgepdf_qdwh_desc( run_arg_list_t *args, int check )
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      LDB    = run_arg_get_int( args, "LDB", N );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
     double   cond   = run_arg_get_double( args, "cond", 1.e16 );
     int      mode   = run_arg_get_int( args, "mode", 4 );
@@ -86,9 +86,9 @@ testing_zgepdf_qdwh_desc( run_arg_list_t *args, int check )
     if ( hres != 0 ) {
         return hres;
     }
-    /* 
-     * descA0 is defined here because of the cost of zlatms. To copy descA in descA0 
-     * now prevents to call it again later in the check (indeed descA is modified 
+    /*
+     * descA0 is defined here because of the cost of zlatms. To copy descA in descA0
+     * now prevents to call it again later in the check (indeed descA is modified
      * with the call to CHAMELEON_zgepdf_qdwh_Tile[_Async]).
      */
     if ( check ) {
@@ -137,7 +137,7 @@ testing_zgepdf_qdwh_std( run_arg_list_t *args, int check )
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      LDB    = run_arg_get_int( args, "LDB", N );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     double   cond   = run_arg_get_double( args, "cond", 1.e16 );
     int      mode   = run_arg_get_int( args, "mode", 4 );
     int      runtime;
@@ -167,12 +167,14 @@ testing_zgepdf_qdwh_std( run_arg_list_t *args, int check )
     /* Fills the matrix with random values */
     hres = CHAMELEON_zlatms( M, N, ChamDistUniform, seedA, ChamNonsymPosv, NULL, mode, cond, 1., A, LDA );
     if ( hres != 0 ) {
+        free( A );
+        free( H );
         return hres;
     }
-    /* 
-     * A0 is defined here because of the cost of zlatms. To copy A in A0 
-     * now prevents to call it again later in the check (indeed A is modified 
-     * with the call to CHAMELEON_zgepdf_qdwh). 
+    /*
+     * A0 is defined here because of the cost of zlatms. To copy A in A0
+     * now prevents to call it again later in the check (indeed A is modified
+     * with the call to CHAMELEON_zgepdf_qdwh).
      */
     if ( check ) {
         A0 = malloc( LDA*N*sizeof(CHAMELEON_Complex64_t) );
diff --git a/testing/testing_zgepdf_qr.c b/testing/testing_zgepdf_qr.c
index 31bde6b503d548fa3a1b81401e2de244e345a762..3fb62637d215206560fb2f1ee1bfb9ad9127915e 100644
--- a/testing/testing_zgepdf_qr.c
+++ b/testing/testing_zgepdf_qr.c
@@ -51,7 +51,7 @@ testing_zgepdf_qr_desc( run_arg_list_t *args, int check )
     int      N      = run_arg_get_int( args, "N", 1000 );
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zgeqrf.c b/testing/testing_zgeqrf.c
index 62f491540278c9c27f6bfa8c17a0b4d7341662b3..50f167f487f6d2af0d1080b2e87a303a7eb9951f 100644
--- a/testing/testing_zgeqrf.c
+++ b/testing/testing_zgeqrf.c
@@ -38,7 +38,7 @@ testing_zgeqrf_desc( run_arg_list_t *args, int check )
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      RH     = run_arg_get_int( args, "qra", 4 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -114,7 +114,7 @@ testing_zgeqrf_std( run_arg_list_t *args, int check )
     int M     = run_arg_get_int( args, "M", N );
     int LDA   = run_arg_get_int( args, "LDA", M );
     int RH    = run_arg_get_int( args, "qra", 4 );
-    int seedA = run_arg_get_int( args, "seedA", random() );
+    int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q     = parameters_compute_q( P );
     int K     = chameleon_min( M, N );
 
diff --git a/testing/testing_zgeqrf_hqr.c b/testing/testing_zgeqrf_hqr.c
index 94ed1f2b7ba4699a803bf7d3a8e0f7144a05cb1b..dd6ffef31d235734d9cf070f9585386142eee184 100644
--- a/testing/testing_zgeqrf_hqr.c
+++ b/testing/testing_zgeqrf_hqr.c
@@ -42,7 +42,7 @@ testing_zgeqrf_hqr_desc( run_arg_list_t *args, int check )
     int      llvl   = run_arg_get_int( args, "llvl", -1 );
     int      hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int      domino = run_arg_get_int( args, "domino", -1 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -129,7 +129,7 @@ testing_zgeqrf_hqr_std( run_arg_list_t *args, int check )
     int llvl   = run_arg_get_int( args, "llvl", -1 );
     int hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int domino = run_arg_get_int( args, "domino", -1 );
-    int seedA  = run_arg_get_int( args, "seedA", random() );
+    int seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q      = parameters_compute_q( P );
     int K      = chameleon_min( M, N );
 
diff --git a/testing/testing_zgeqrs.c b/testing/testing_zgeqrs.c
index 7242df2e8bb516f7f09f24ad77f5954251b059a1..0fa94e9092d9ef98c19e5d395fb2e2ac485cf509 100644
--- a/testing/testing_zgeqrs.c
+++ b/testing/testing_zgeqrs.c
@@ -41,8 +41,8 @@ testing_zgeqrs_desc( run_arg_list_t *args, int check )
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      LDB    = run_arg_get_int( args, "LDB", M );
     int      RH     = run_arg_get_int( args, "qra", 0 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
-    int      seedB  = run_arg_get_int( args, "seedB", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int      seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zgesv_nopiv.c b/testing/testing_zgesv_nopiv.c
index fc757b519bae47f0b25d0199f9eebdff703078fd..2f09e138f274fc97bb16c3326a527fc32043ed12 100644
--- a/testing/testing_zgesv_nopiv.c
+++ b/testing/testing_zgesv_nopiv.c
@@ -44,8 +44,8 @@ testing_zgesv_nopiv_desc( run_arg_list_t *args, int check )
     int      NRHS   = run_arg_get_int( args, "NRHS", 1 );
     int      LDA    = run_arg_get_int( args, "LDA", N );
     int      LDB    = run_arg_get_int( args, "LDB", N );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
-    int      seedB  = run_arg_get_int( args, "seedB", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int      seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     double   bump   = run_arg_get_double( args, "bump", (double)N );
     int      Q      = parameters_compute_q( P );
 
@@ -118,8 +118,8 @@ testing_zgesv_nopiv_std( run_arg_list_t *args, int check )
     int    NRHS  = run_arg_get_int( args, "NRHS", 1 );
     int    LDA   = run_arg_get_int( args, "LDA", N );
     int    LDB   = run_arg_get_int( args, "LDB", N );
-    int    seedA = run_arg_get_int( args, "seedA", random() );
-    int    seedB = run_arg_get_int( args, "seedB", random() );
+    int    seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int    seedB = run_arg_get_int( args, "seedB", testing_ialea() );
     double bump  = run_arg_get_double( args, "bump", (double)N );
 
     /* Descriptors */
diff --git a/testing/testing_zgesvd.c b/testing/testing_zgesvd.c
index 413ca1367d0c7650141d31c96343b8bfed9b9384..d7b7e4847685679f797e2bf2c5fbf0561fba3d2c 100644
--- a/testing/testing_zgesvd.c
+++ b/testing/testing_zgesvd.c
@@ -71,7 +71,7 @@ testing_zgesvd_desc( run_arg_list_t *args, int check )
     int        M      = run_arg_get_int( args, "M", N );
     int        K      = chameleon_min( M, N );
     int        LDA    = run_arg_get_int( args, "LDA", M );
-    int        seedA  = run_arg_get_int( args, "seedA", random() );
+    int        seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     double     cond   = run_arg_get_double( args, "cond", 1.e16 );
     int        mode   = run_arg_get_int( args, "mode", 4 );
     int        Q      = parameters_compute_q( P );
@@ -126,6 +126,10 @@ testing_zgesvd_desc( run_arg_list_t *args, int check )
     /* Fills the matrix with random values */
     hres = CHAMELEON_zlatms_Tile( ChamDistUniform, seedA, ChamNonsymPosv, D, mode, cond, 1., descA );
     if ( hres != 0 ) {
+        free( D );
+        free( S );
+        free( U );
+        free( Vt );
         return hres;
     }
     /*
@@ -153,7 +157,6 @@ testing_zgesvd_desc( run_arg_list_t *args, int check )
 
     /* Checks the factorisation and residue */
     if ( check ) {
-
         hres += check_zgesvd( args, jobu, jobvt, descA0, descA, D, S, U, LDU, Vt, LDVt );
         CHAMELEON_Desc_Destroy( &descA0 );
     }
@@ -162,12 +165,8 @@ testing_zgesvd_desc( run_arg_list_t *args, int check )
     CHAMELEON_Desc_Destroy( &descT );
     free( S );
     free( D );
-    if ( (jobu  == ChamAllVec) || (jobu  == ChamSVec) ) {
-        free( U );
-    }
-    if ( (jobvt == ChamAllVec) || (jobvt == ChamSVec) ) {
-        free( Vt );
-    }
+    free( U );
+    free( Vt );
 
     return hres;
 }
@@ -184,7 +183,7 @@ testing_zgesvd_std( run_arg_list_t *args, int check )
     int        M     = run_arg_get_int( args, "M", N );
     int        K     = chameleon_min( M, N );
     int        LDA   = run_arg_get_int( args, "LDA", M );
-    int        seedA = run_arg_get_int( args, "seedA", random() );
+    int        seedA = run_arg_get_int( args, "seedA", testing_ialea() );
     double     cond  = run_arg_get_double( args, "cond", 1.e16 );
     int        mode  = run_arg_get_int( args, "mode", 4 );
     cham_job_t jobu  = run_arg_get_job( args, "jobu", ChamNoVec );
diff --git a/testing/testing_zgetrf_nopiv.c b/testing/testing_zgetrf_nopiv.c
index 6b2cf1a91d3742d3230e5f086f1c102a743153cc..140ba57337779c56eee97cb77b914e5d8ffa83df 100644
--- a/testing/testing_zgetrf_nopiv.c
+++ b/testing/testing_zgetrf_nopiv.c
@@ -36,7 +36,7 @@ testing_zgetrf_nopiv_desc( run_arg_list_t *args, int check )
     int      N      = run_arg_get_int( args, "N", 1000 );
     int      M      = run_arg_get_int( args, "M", N );
     int      LDA    = run_arg_get_int( args, "LDA", M );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     double   bump   = run_arg_get_double( args, "bump", (double)N );
     int      Q      = parameters_compute_q( P );
 
@@ -92,7 +92,7 @@ testing_zgetrf_nopiv_std( run_arg_list_t *args, int check )
     int    N     = run_arg_get_int( args, "N", 1000 );
     int    M     = run_arg_get_int( args, "M", N );
     int    LDA   = run_arg_get_int( args, "LDA", M );
-    int    seedA = run_arg_get_int( args, "seedA", random() );
+    int    seedA = run_arg_get_int( args, "seedA", testing_ialea() );
     double bump  = run_arg_get_double( args, "bump", (double)N );
 
     /* Descriptors */
diff --git a/testing/testing_zgetrs_nopiv.c b/testing/testing_zgetrs_nopiv.c
index 98a56c92e8fd899c98c17e1273e167b10f0be7be..b614446726d02160e411e41d796b1d276df7c8ba 100644
--- a/testing/testing_zgetrs_nopiv.c
+++ b/testing/testing_zgetrs_nopiv.c
@@ -38,8 +38,8 @@ testing_zgetrs_nopiv_desc( run_arg_list_t *args, int check )
     int      NRHS   = run_arg_get_int( args, "NRHS", 1 );
     int      LDA    = run_arg_get_int( args, "LDA", N );
     int      LDB    = run_arg_get_int( args, "LDB", N );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
-    int      seedB  = run_arg_get_int( args, "seedB", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int      seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     double   bump   = run_arg_get_double( args, "bump", (double)N );
     int      Q      = parameters_compute_q( P );
 
@@ -110,8 +110,8 @@ testing_zgetrs_nopiv_std( run_arg_list_t *args, int check )
     int      NRHS   = run_arg_get_int( args, "NRHS", 1 );
     int      LDA    = run_arg_get_int( args, "LDA", N );
     int      LDB    = run_arg_get_int( args, "LDB", N );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
-    int      seedB  = run_arg_get_int( args, "seedB", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int      seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     double   bump   = run_arg_get_double( args, "bump", (double)N );
 
     /* Descriptors */
diff --git a/testing/testing_zgram.c b/testing/testing_zgram.c
index 67371026145a6f7c81a99aca076b2b876bd67352..6853e1ce679086a7bcea7cbe00745aa24263ff68 100644
--- a/testing/testing_zgram.c
+++ b/testing/testing_zgram.c
@@ -51,7 +51,7 @@ testing_zgram_desc( run_arg_list_t *args, int check )
     int         P      = parameters_getvalue_int( "P" );
     int         N      = run_arg_get_int( args, "N", 1000 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -105,7 +105,7 @@ testing_zgram_std( run_arg_list_t *args, int check )
     cham_uplo_t uplo  = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N     = run_arg_get_int( args, "N", 1000 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zhemm.c b/testing/testing_zhemm.c
index f653fa17afe17119ced290d3c0dd992c5e3c46f6..38d91da96d7d96794e665a0551d196bd055e8779 100644
--- a/testing/testing_zhemm.c
+++ b/testing/testing_zhemm.c
@@ -48,9 +48,9 @@ testing_zhemm_desc( run_arg_list_t *args, int check )
     int                   LDC    = run_arg_get_int( args, "LDC", M );
     CHAMELEON_Complex64_t alpha  = testing_zalea();
     CHAMELEON_Complex64_t beta   = testing_zalea();
-    int                   seedA  = run_arg_get_int( args, "seedA", random() );
-    int                   seedB  = run_arg_get_int( args, "seedB", random() );
-    int                   seedC  = run_arg_get_int( args, "seedC", random() );
+    int                   seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump   = testing_dalea();
     int                   Q      = parameters_compute_q( P );
 
@@ -138,9 +138,9 @@ testing_zhemm_std( run_arg_list_t *args, int check )
     int                   LDC   = run_arg_get_int( args, "LDC", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump  = testing_dalea();
 
     /* Descriptors */
diff --git a/testing/testing_zher2k.c b/testing/testing_zher2k.c
index 877dc5e2a10cf9556c3692702c9a1bcb0e6c4845..82d0b65ec709a9da757cf5110b764f9e42141408 100644
--- a/testing/testing_zher2k.c
+++ b/testing/testing_zher2k.c
@@ -48,9 +48,9 @@ testing_zher2k_desc( run_arg_list_t *args, int check )
     int          LDC    = run_arg_get_int( args, "LDC", N );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     double                beta  = testing_dalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump  = testing_dalea();
     int                   Q     = parameters_compute_q( P );
 
@@ -140,9 +140,9 @@ testing_zher2k_std( run_arg_list_t *args, int check )
     int                   LDC   = run_arg_get_int( args, "LDC", N );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     double                beta  = testing_dalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump  = testing_dalea();
 
     /* Descriptors */
diff --git a/testing/testing_zherk.c b/testing/testing_zherk.c
index d17ccc4265d1cff5da6d5069a19850a793ef9cc4..25185e034cc0e7dd7e8881319fe3452014362f6e 100644
--- a/testing/testing_zherk.c
+++ b/testing/testing_zherk.c
@@ -48,8 +48,8 @@ testing_zherk_desc( run_arg_list_t *args, int check )
     double       alpha  = testing_dalea();
     double       beta   = testing_dalea();
     double       bump   = testing_dalea();
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedC  = run_arg_get_int( args, "seedC", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -133,8 +133,8 @@ testing_zherk_std( run_arg_list_t *args, int check )
     double       alpha = testing_dalea();
     double       beta  = testing_dalea();
     double       bump  = testing_dalea();
-    int          seedA = run_arg_get_int( args, "seedA", random() );
-    int          seedC = run_arg_get_int( args, "seedC", random() );
+    int          seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC = run_arg_get_int( args, "seedC", testing_ialea() );
 
 
     /* Descriptors */
@@ -170,7 +170,7 @@ testing_zherk_std( run_arg_list_t *args, int check )
     testing_start( &test_data );
     cblas_zherk( CblasColMajor, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans, N, K,
                  alpha, A, LDA, beta, C, LDC );
-    testing_stop( &test_data, flops_zherk( N, K ) );
+    testing_stop( &test_data, flops_zherk( K, N ) );
 #else
     testing_start( &test_data );
     switch ( api ) {
@@ -189,7 +189,7 @@ testing_zherk_std( run_arg_list_t *args, int check )
         return -1;
     }
     test_data.hres = hres;
-    testing_stop( &test_data, flops_zherk( N, K ) );
+    testing_stop( &test_data, flops_zherk( K, N ) );
 
     /* Checks the solution */
     if ( check ) {
diff --git a/testing/testing_zlacpy.c b/testing/testing_zlacpy.c
index b34136edbe7b4851af9089345038d9281c35889e..2988e1fe2e26909ddf4efe13c85fe019e202684d 100644
--- a/testing/testing_zlacpy.c
+++ b/testing/testing_zlacpy.c
@@ -74,7 +74,7 @@ testing_zlacpy_desc( run_arg_list_t *args, int check )
     int         M      = run_arg_get_int( args, "M", N );
     int         LDA    = run_arg_get_int( args, "LDA", M );
     int         LDB    = run_arg_get_int( args, "LDB", M );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -132,7 +132,7 @@ testing_zlacpy_std( run_arg_list_t *args, int check )
     int         M     = run_arg_get_int( args, "M", N );
     int         LDA   = run_arg_get_int( args, "LDA", M );
     int         LDB   = run_arg_get_int( args, "LDB", M );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A, *B;
diff --git a/testing/testing_zlange.c b/testing/testing_zlange.c
index e9a2e3f701ceb3ac572439dfcb405d9071afdc19..83e514fd55dd3d4a01d8aca67f00721b4921f410 100644
--- a/testing/testing_zlange.c
+++ b/testing/testing_zlange.c
@@ -75,7 +75,7 @@ testing_zlange_desc( run_arg_list_t *args, int check )
     int             N         = run_arg_get_int( args, "N", 1000 );
     int             M         = run_arg_get_int( args, "M", N );
     int             LDA       = run_arg_get_int( args, "LDA", M );
-    int             seedA     = run_arg_get_int( args, "seedA", random() );
+    int             seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
     int             Q         = parameters_compute_q( P );
 
     /* Descriptors */
@@ -128,7 +128,7 @@ testing_zlange_std( run_arg_list_t *args, int check )
     int             N         = run_arg_get_int( args, "N", 1000 );
     int             M         = run_arg_get_int( args, "M", N );
     int             LDA       = run_arg_get_int( args, "LDA", M );
-    int             seedA     = run_arg_get_int( args, "seedA", random() );
+    int             seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     double norm;
diff --git a/testing/testing_zlanhe.c b/testing/testing_zlanhe.c
index 1dbfb3162586f4d83275aa2559032e58ba40a132..7e6729c6c15b25ff9ba7590da2bed4db648786e4 100644
--- a/testing/testing_zlanhe.c
+++ b/testing/testing_zlanhe.c
@@ -70,7 +70,7 @@ testing_zlanhe_desc( run_arg_list_t *args, int check )
     cham_uplo_t     uplo      = run_arg_get_uplo( args, "uplo", ChamUpper );
     int             N         = run_arg_get_int( args, "N", 1000 );
     int             LDA       = run_arg_get_int( args, "LDA", N );
-    int             seedA     = run_arg_get_int( args, "seedA", random() );
+    int             seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
     double          bump      = testing_dalea();
     int             Q         = parameters_compute_q( P );
 
@@ -125,7 +125,7 @@ testing_zlanhe_std( run_arg_list_t *args, int check )
     cham_uplo_t     uplo      = run_arg_get_uplo( args, "uplo", ChamUpper );
     int             N         = run_arg_get_int( args, "N", 1000 );
     int             LDA       = run_arg_get_int( args, "LDA", N );
-    int             seedA     = run_arg_get_int( args, "seedA", random() );
+    int             seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
     double          bump      = testing_dalea();
 
     /* Descriptors */
diff --git a/testing/testing_zlansy.c b/testing/testing_zlansy.c
index 3cb28668988337ee5a13cb5d8e0d4aa5fd4f5abc..e715d4f7e131fa22a0ca936fcb41667bacd98157 100644
--- a/testing/testing_zlansy.c
+++ b/testing/testing_zlansy.c
@@ -70,7 +70,7 @@ testing_zlansy_desc( run_arg_list_t *args, int check )
     cham_uplo_t           uplo      = run_arg_get_uplo( args, "uplo", ChamUpper );
     int                   N         = run_arg_get_int( args, "N", 1000 );
     int                   LDA       = run_arg_get_int( args, "LDA", N );
-    int                   seedA     = run_arg_get_int( args, "seedA", random() );
+    int                   seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
     CHAMELEON_Complex64_t bump      = testing_zalea();
     int                   Q         = parameters_compute_q( P );
 
@@ -125,7 +125,7 @@ testing_zlansy_std( run_arg_list_t *args, int check )
     cham_uplo_t           uplo      = run_arg_get_uplo( args, "uplo", ChamUpper );
     int                   N         = run_arg_get_int( args, "N", 1000 );
     int                   LDA       = run_arg_get_int( args, "LDA", N );
-    int                   seedA     = run_arg_get_int( args, "seedA", random() );
+    int                   seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
     CHAMELEON_Complex64_t bump      = testing_zalea();
 
     /* Descriptors */
diff --git a/testing/testing_zlantr.c b/testing/testing_zlantr.c
index 59332b2d7758e72d94699073566fcdeb3b4ef5e0..9cbc3b4424e7ac6cca395a0543ef61387e5ba0f5 100644
--- a/testing/testing_zlantr.c
+++ b/testing/testing_zlantr.c
@@ -97,7 +97,7 @@ testing_zlantr_desc( run_arg_list_t *args, int check )
     int             N         = run_arg_get_int( args, "N", 1000 );
     int             M         = run_arg_get_int( args, "M", N );
     int             LDA       = run_arg_get_int( args, "LDA", M );
-    int             seedA     = run_arg_get_int( args, "seedA", random() );
+    int             seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
     int             Q         = parameters_compute_q( P );
 
     /* Descriptors */
@@ -151,7 +151,7 @@ testing_zlantr_std( run_arg_list_t *args, int check )
     int             N         = run_arg_get_int( args, "N", 1000 );
     int             M         = run_arg_get_int( args, "M", N );
     int             LDA       = run_arg_get_int( args, "LDA", M );
-    int             seedA     = run_arg_get_int( args, "seedA", random() );
+    int             seedA     = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     double norm;
diff --git a/testing/testing_zlascal.c b/testing/testing_zlascal.c
index 63df592df0e4d4ffbeb97a1565bd7cdf0bac3fca..da821efc365954e056cb92e82698693e922d5b49 100644
--- a/testing/testing_zlascal.c
+++ b/testing/testing_zlascal.c
@@ -66,7 +66,7 @@ testing_zlascal_desc( run_arg_list_t *args, int check )
     int                   M      = run_arg_get_int( args, "M", N );
     int                   LDA    = run_arg_get_int( args, "LDA", M );
     CHAMELEON_Complex64_t alpha  = run_arg_get_complex64( args, "alpha", 1. );
-    int                   seedA  = run_arg_get_int( args, "seedA", random() );
+    int                   seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int                   Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -123,7 +123,7 @@ testing_zlascal_std( run_arg_list_t *args, int check )
     int                   M     = run_arg_get_int( args, "M", N );
     int                   LDA   = run_arg_get_int( args, "LDA", M );
     CHAMELEON_Complex64_t alpha = run_arg_get_complex64( args, "alpha", 1. );
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zlauum.c b/testing/testing_zlauum.c
index 4437b01f45d2063da3f85faf04ff5818e5900e51..a66dec720ee25d911080742f03d9cd14f5644a23 100644
--- a/testing/testing_zlauum.c
+++ b/testing/testing_zlauum.c
@@ -46,7 +46,7 @@ testing_zlauum_desc( run_arg_list_t *args, int check )
     cham_uplo_t uplo   = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N      = run_arg_get_int( args, "N", 1000 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -99,7 +99,7 @@ testing_zlauum_std( run_arg_list_t *args, int check )
     cham_uplo_t uplo  = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N     = run_arg_get_int( args, "N", 1000 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zplrnk.c b/testing/testing_zplrnk.c
index 7b0b0ba8e08f7eb8790ed8252acdb4e29a1ff58b..840f12bc3d83efa21e068b72f59de9f2b173e781 100644
--- a/testing/testing_zplrnk.c
+++ b/testing/testing_zplrnk.c
@@ -37,8 +37,8 @@ testing_zplrnk_desc( run_arg_list_t *args, int check )
     int M     = run_arg_get_int( args, "M", N );
     int K     = run_arg_get_int( args, "K", N );
     int LDC   = run_arg_get_int( args, "LDC", M );
-    int seedA = run_arg_get_int( args, "seedA", random() );
-    int seedB = run_arg_get_int( args, "seedB", random() );
+    int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
     int Q     = parameters_compute_q( P );
 
     /* Descriptors */
@@ -85,8 +85,8 @@ testing_zplrnk_std( run_arg_list_t *args, int check )
     int M     = run_arg_get_int( args, "M", N );
     int K     = run_arg_get_int( args, "K", N );
     int LDC   = run_arg_get_int( args, "LDC", M );
-    int seedA = run_arg_get_int( args, "seedA", random() );
-    int seedB = run_arg_get_int( args, "seedB", random() );
+    int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *C;
diff --git a/testing/testing_zpoinv.c b/testing/testing_zpoinv.c
index 265b8b64901e155921fb31f150ea43a830b8a2d4..f7a1a58f5b4b2df6634244f4e4c9a46036c861e6 100644
--- a/testing/testing_zpoinv.c
+++ b/testing/testing_zpoinv.c
@@ -50,7 +50,7 @@ testing_zpoinv_desc( run_arg_list_t *args, int check )
     cham_uplo_t uplo   = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N      = run_arg_get_int( args, "N", 1000 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -104,7 +104,7 @@ testing_zpoinv_std( run_arg_list_t *args, int check )
     cham_uplo_t uplo  = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N     = run_arg_get_int( args, "N", 1000 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zposv.c b/testing/testing_zposv.c
index eb6b343f9e6596bb07f74d95840e584edada1349..db7d95f3f9e4a470cb0ea6097769fcbafade0324 100644
--- a/testing/testing_zposv.c
+++ b/testing/testing_zposv.c
@@ -53,8 +53,8 @@ testing_zposv_desc( run_arg_list_t *args, int check )
     int         NRHS   = run_arg_get_int( args, "NRHS", 1 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
     int         LDB    = run_arg_get_int( args, "LDB", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
-    int         seedB  = run_arg_get_int( args, "seedB", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -128,8 +128,8 @@ testing_zposv_std( run_arg_list_t *args, int check )
     int         NRHS  = run_arg_get_int( args, "NRHS", 1 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
     int         LDB   = run_arg_get_int( args, "LDB", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
-    int         seedB = run_arg_get_int( args, "seedB", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A, *X;
diff --git a/testing/testing_zpotrf.c b/testing/testing_zpotrf.c
index ddffda46ee43ef82d34bc76c34c2df67178ab5dc..9e5b6c020f3a5f5147584798f93d5ff7d4c97091 100644
--- a/testing/testing_zpotrf.c
+++ b/testing/testing_zpotrf.c
@@ -43,7 +43,7 @@ testing_zpotrf_desc( run_arg_list_t *args, int check )
     cham_uplo_t uplo   = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N      = run_arg_get_int( args, "N", 1000 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -99,7 +99,7 @@ testing_zpotrf_std( run_arg_list_t *args, int check )
     cham_uplo_t uplo  = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N     = run_arg_get_int( args, "N", 1000 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zpotri.c b/testing/testing_zpotri.c
index 172e960e0da6188b1383be5a17f22bc21cc40c41..f86ec30af7709ed442ac9906461224022870cdd7 100644
--- a/testing/testing_zpotri.c
+++ b/testing/testing_zpotri.c
@@ -45,7 +45,7 @@ testing_zpotri_desc( run_arg_list_t *args, int check )
     cham_uplo_t uplo   = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N      = run_arg_get_int( args, "N", 1000 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -103,7 +103,7 @@ testing_zpotri_std( run_arg_list_t *args, int check )
     cham_uplo_t uplo  = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N     = run_arg_get_int( args, "N", 1000 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zpotrs.c b/testing/testing_zpotrs.c
index 90126dba94eda005938dc3f16fe791bfd4246d70..caa8353ccffdad8bf76c13a9a57fe148f8f73603 100644
--- a/testing/testing_zpotrs.c
+++ b/testing/testing_zpotrs.c
@@ -46,8 +46,8 @@ testing_zpotrs_desc( run_arg_list_t *args, int check )
     int         NRHS   = run_arg_get_int( args, "NRHS", 1 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
     int         LDB    = run_arg_get_int( args, "LDB", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
-    int         seedB  = run_arg_get_int( args, "seedB", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -117,8 +117,8 @@ testing_zpotrs_std( run_arg_list_t *args, int check )
     int         NRHS  = run_arg_get_int( args, "NRHS", 1 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
     int         LDB   = run_arg_get_int( args, "LDB", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
-    int         seedB = run_arg_get_int( args, "seedB", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A, *X;
diff --git a/testing/testing_zsymm.c b/testing/testing_zsymm.c
index 1c1cafe6dc89e2ef46d93db7e4e970761ef6435e..b4edb1e840c4d095e6832eba9ea7759d9810c0db 100644
--- a/testing/testing_zsymm.c
+++ b/testing/testing_zsymm.c
@@ -48,9 +48,9 @@ testing_zsymm_desc( run_arg_list_t *args, int check )
     int                   LDC    = run_arg_get_int( args, "LDC", M );
     CHAMELEON_Complex64_t alpha  = testing_zalea();
     CHAMELEON_Complex64_t beta   = testing_zalea();
-    int                   seedA  = run_arg_get_int( args, "seedA", random() );
-    int                   seedB  = run_arg_get_int( args, "seedB", random() );
-    int                   seedC  = run_arg_get_int( args, "seedC", random() );
+    int                   seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump   = testing_dalea();
     int                   Q      = parameters_compute_q( P );
 
@@ -138,9 +138,9 @@ testing_zsymm_std( run_arg_list_t *args, int check )
     int                   LDC   = run_arg_get_int( args, "LDC", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump  = testing_dalea();
 
     /* Descriptors */
diff --git a/testing/testing_zsyr2k.c b/testing/testing_zsyr2k.c
index a1b790e320680e8a30fba89cf13f42c6cf7f1d8b..d3357063ae1e1a6dc0a16fd94153603c710fdb05 100644
--- a/testing/testing_zsyr2k.c
+++ b/testing/testing_zsyr2k.c
@@ -48,9 +48,9 @@ testing_zsyr2k_desc( run_arg_list_t *args, int check )
     int          LDC    = run_arg_get_int( args, "LDC", N );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump  = testing_dalea();
     int                   Q     = parameters_compute_q( P );
 
@@ -100,7 +100,7 @@ testing_zsyr2k_desc( run_arg_list_t *args, int check )
         hres = CHAMELEON_zsyr2k_Tile( uplo, trans, alpha, descA, descB, beta, descC );
     }
     test_data.hres = hres;
-    testing_stop( &test_data, flops_zher2k( K, N ) );
+    testing_stop( &test_data, flops_zsyr2k( K, N ) );
 
     /* Check the solution */
     if ( check ) {
@@ -140,9 +140,9 @@ testing_zsyr2k_std( run_arg_list_t *args, int check )
     int                   LDC   = run_arg_get_int( args, "LDC", N );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     double                bump  = testing_dalea();
 
     /* Descriptors */
@@ -184,7 +184,7 @@ testing_zsyr2k_std( run_arg_list_t *args, int check )
     testing_start( &test_data );
     cblas_zsyr2k( CblasColMajor, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans, N, K,
                   CBLAS_SADDR(alpha), A, LDA, B, LDB, CBLAS_SADDR(beta), C, LDC );
-    testing_stop( &test_data, flops_zher2k( N, K ) );
+    testing_stop( &test_data, flops_zsyr2k( K, N ) );
 #else
     testing_start( &test_data );
     switch ( api ) {
@@ -203,7 +203,7 @@ testing_zsyr2k_std( run_arg_list_t *args, int check )
         return -1;
     }
     test_data.hres = hres;
-    testing_stop( &test_data, flops_zher2k( N, K ) );
+    testing_stop( &test_data, flops_zsyr2k( K, N ) );
 
     /* Check the solution */
     if ( check ) {
diff --git a/testing/testing_zsyrk.c b/testing/testing_zsyrk.c
index 09269ec267ab3f949b2df98d95c0650143b0471c..adac0656560b50f8734998c3bd196a33925bc53a 100644
--- a/testing/testing_zsyrk.c
+++ b/testing/testing_zsyrk.c
@@ -48,8 +48,8 @@ testing_zsyrk_desc( run_arg_list_t *args, int check )
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
     CHAMELEON_Complex64_t bump  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     int                   Q     = parameters_compute_q( P );
 
     /* Descriptors */
@@ -133,8 +133,8 @@ testing_zsyrk_std( run_arg_list_t *args, int check )
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
     CHAMELEON_Complex64_t bump  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedC = run_arg_get_int( args, "seedC", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedC = run_arg_get_int( args, "seedC", testing_ialea() );
 
     /* Descriptors */
     int                    Am, An;
diff --git a/testing/testing_zsysv.c b/testing/testing_zsysv.c
index e73d555e0556e0fbbbe0969993b534c6f5968912..3d5908f42f6d15cb0ccb307461f00159ae3f1063 100644
--- a/testing/testing_zsysv.c
+++ b/testing/testing_zsysv.c
@@ -45,8 +45,8 @@ testing_zsysv_desc( run_arg_list_t *args, int check )
     int         NRHS   = run_arg_get_int( args, "NRHS", 1 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
     int         LDB    = run_arg_get_int( args, "LDB", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
-    int         seedB  = run_arg_get_int( args, "seedB", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -118,8 +118,8 @@ testing_zsysv_std( run_arg_list_t *args, int check )
     int         NRHS  = run_arg_get_int( args, "NRHS", 1 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
     int         LDB   = run_arg_get_int( args, "LDB", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
-    int         seedB = run_arg_get_int( args, "seedB", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A, *X;
diff --git a/testing/testing_zsytrf.c b/testing/testing_zsytrf.c
index a2407f18fad629307976d0cffc38f2bd5cfe0995..57a89e74cd597949b06e1ee22348b997bdc13676 100644
--- a/testing/testing_zsytrf.c
+++ b/testing/testing_zsytrf.c
@@ -36,7 +36,7 @@ testing_zsytrf_desc( run_arg_list_t *args, int check )
     cham_uplo_t uplo   = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N      = run_arg_get_int( args, "N", 1000 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -89,7 +89,7 @@ testing_zsytrf_std( run_arg_list_t *args, int check )
     cham_uplo_t uplo  = run_arg_get_uplo( args, "uplo", ChamUpper );
     int         N     = run_arg_get_int( args, "N", 1000 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zsytrs.c b/testing/testing_zsytrs.c
index 8750654a0b88530a0eb5ec538f178a08ce893d77..6893390654228e97c0521cb13095f317a3a716a4 100644
--- a/testing/testing_zsytrs.c
+++ b/testing/testing_zsytrs.c
@@ -39,8 +39,8 @@ testing_zsytrs_desc( run_arg_list_t *args, int check )
     int         NRHS   = run_arg_get_int( args, "NRHS", 1 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
     int         LDB    = run_arg_get_int( args, "LDB", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
-    int         seedB  = run_arg_get_int( args, "seedB", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -108,8 +108,8 @@ testing_zsytrs_std( run_arg_list_t *args, int check )
     int         NRHS  = run_arg_get_int( args, "NRHS", 1 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
     int         LDB   = run_arg_get_int( args, "LDB", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
-    int         seedB = run_arg_get_int( args, "seedB", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int         seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A, *X;
diff --git a/testing/testing_ztradd.c b/testing/testing_ztradd.c
index 58251a3e6eaa4358531fbbdea3aab68eb1432f47..00f79cd9e6af887056d9b1df05dad0125f8b2e11 100644
--- a/testing/testing_ztradd.c
+++ b/testing/testing_ztradd.c
@@ -71,8 +71,8 @@ testing_ztradd_desc( run_arg_list_t *args, int check )
     int          LDB    = run_arg_get_int( args, "LDB", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
     int                   Q     = parameters_compute_q( P );
 
     /* Descriptors */
@@ -169,8 +169,8 @@ testing_ztradd_std( run_arg_list_t *args, int check )
     int          LDB   = run_arg_get_int( args, "LDB", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
     CHAMELEON_Complex64_t beta  = testing_zalea();
-    int          seedA = run_arg_get_int( args, "seedA", random() );
-    int          seedB = run_arg_get_int( args, "seedB", random() );
+    int          seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     int                    Am, An;
diff --git a/testing/testing_ztrmm.c b/testing/testing_ztrmm.c
index b9b0a5d48f716c392f9070895b10b6618d4b6506..bab7d653e868a6e27a9d54c649613068a6d6c0ac 100644
--- a/testing/testing_ztrmm.c
+++ b/testing/testing_ztrmm.c
@@ -48,8 +48,8 @@ testing_ztrmm_desc( run_arg_list_t *args, int check )
     int                   LDA    = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N );
     int                   LDB    = run_arg_get_int( args, "LDB", M );
     CHAMELEON_Complex64_t alpha  = testing_zalea();
-    int                   seedA  = run_arg_get_int( args, "seedA", random() );
-    int                   seedB  = run_arg_get_int( args, "seedB", random() );
+    int                   seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int                   Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -89,7 +89,7 @@ testing_ztrmm_desc( run_arg_list_t *args, int check )
         hres = CHAMELEON_ztrmm_Tile( side, uplo, trans, diag, alpha, descA, descB );
     }
     test_data.hres = hres;
-    testing_stop( &test_data, flops_ztrmm( side, N, M ) );
+    testing_stop( &test_data, flops_ztrmm( side, M, N ) );
 
     /* Checks the solution */
     if ( check ) {
@@ -128,8 +128,8 @@ testing_ztrmm_std( run_arg_list_t *args, int check )
     int                   LDA   = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N );
     int                   LDB   = run_arg_get_int( args, "LDB", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     int                    An;
@@ -155,7 +155,7 @@ testing_ztrmm_std( run_arg_list_t *args, int check )
     testing_start( &test_data );
     cblas_ztrmm( CblasColMajor, (CBLAS_SIDE)side, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans,
                  (CBLAS_DIAG)diag, M, N, CBLAS_SADDR(alpha), A, LDA, B, LDB );
-    testing_stop( &test_data, flops_ztrmm( side, N, M ) );
+    testing_stop( &test_data, flops_ztrmm( side, M, N ) );
 #else
     testing_start( &test_data );
     switch ( api ) {
@@ -175,7 +175,7 @@ testing_ztrmm_std( run_arg_list_t *args, int check )
         return -1;
     }
     test_data.hres = hres;
-    testing_stop( &test_data, flops_ztrmm( side, N, M ) );
+    testing_stop( &test_data, flops_ztrmm( side, M, N ) );
 
     /* Checks the solution */
     if ( check ) {
diff --git a/testing/testing_ztrsm.c b/testing/testing_ztrsm.c
index 868e1640196310bf6157e42ee9e50a17a0acb9ed..929f2dec4290491cab7f43889bc61dbdf5f90a85 100644
--- a/testing/testing_ztrsm.c
+++ b/testing/testing_ztrsm.c
@@ -49,8 +49,8 @@ testing_ztrsm_desc( run_arg_list_t *args, int check )
     int                   LDA    = run_arg_get_int( args, "LDA", An );
     int                   LDB    = run_arg_get_int( args, "LDB", M );
     CHAMELEON_Complex64_t alpha  = testing_zalea();
-    int                   seedA  = run_arg_get_int( args, "seedA", random() );
-    int                   seedB  = run_arg_get_int( args, "seedB", random() );
+    int                   seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB  = run_arg_get_int( args, "seedB", testing_ialea() );
     int                   Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -123,8 +123,8 @@ testing_ztrsm_std( run_arg_list_t *args, int check )
     int                   LDA   = run_arg_get_int( args, "LDA", An );
     int                   LDB   = run_arg_get_int( args, "LDB", M );
     CHAMELEON_Complex64_t alpha = testing_zalea();
-    int                   seedA = run_arg_get_int( args, "seedA", random() );
-    int                   seedB = run_arg_get_int( args, "seedB", random() );
+    int                   seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int                   seedB = run_arg_get_int( args, "seedB", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A, *B;
diff --git a/testing/testing_ztrtri.c b/testing/testing_ztrtri.c
index 490d245c7aa230317320fa7e257ed62025dbc884..367f99d8e422068f95582c3a99c624503f84d92a 100644
--- a/testing/testing_ztrtri.c
+++ b/testing/testing_ztrtri.c
@@ -40,7 +40,7 @@ testing_ztrtri_desc( run_arg_list_t *args, int check )
     cham_diag_t diag   = run_arg_get_diag( args, "diag", ChamNonUnit );
     int         N      = run_arg_get_int( args, "N", 1000 );
     int         LDA    = run_arg_get_int( args, "LDA", N );
-    int         seedA  = run_arg_get_int( args, "seedA", random() );
+    int         seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int         Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -96,7 +96,7 @@ testing_ztrtri_std( run_arg_list_t *args, int check )
     cham_diag_t diag  = run_arg_get_diag( args, "diag", ChamNonUnit );
     int         N     = run_arg_get_int( args, "N", 1000 );
     int         LDA   = run_arg_get_int( args, "LDA", N );
-    int         seedA = run_arg_get_int( args, "seedA", random() );
+    int         seedA = run_arg_get_int( args, "seedA", testing_ialea() );
 
     /* Descriptors */
     CHAMELEON_Complex64_t *A;
diff --git a/testing/testing_zunglq.c b/testing/testing_zunglq.c
index a96bc23c4cb54c709d02aee850f8bc85b46f83f6..61ab66fb3ea210a99ddd82d0ddc37a787329dddb 100644
--- a/testing/testing_zunglq.c
+++ b/testing/testing_zunglq.c
@@ -39,7 +39,7 @@ testing_zunglq_desc( run_arg_list_t *args, int check )
     int      K      = run_arg_get_int( args, "K", chameleon_min( M, N ) );
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      RH     = run_arg_get_int( args, "qra", 0 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -129,7 +129,7 @@ testing_zunglq_std( run_arg_list_t *args, int check )
     int K     = run_arg_get_int( args, "K", chameleon_min( M, N ) );
     int LDA   = run_arg_get_int( args, "LDA", M );
     int RH    = run_arg_get_int( args, "qra", 0 );
-    int seedA = run_arg_get_int( args, "seedA", random() );
+    int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q     = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zunglq_hqr.c b/testing/testing_zunglq_hqr.c
index 981cd4d7416a3515bcb1d521c7dcb488488a4997..cdbf6b31d9eb2ff46b70bfbc267b9de0ceed53c7 100644
--- a/testing/testing_zunglq_hqr.c
+++ b/testing/testing_zunglq_hqr.c
@@ -43,7 +43,7 @@ testing_zunglq_hqr_desc( run_arg_list_t *args, int check )
     int      llvl   = run_arg_get_int( args, "llvl", -1 );
     int      hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int      domino = run_arg_get_int( args, "domino", -1 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -143,7 +143,7 @@ testing_zunglq_hqr_std( run_arg_list_t *args, int check )
     int llvl   = run_arg_get_int( args, "llvl", -1 );
     int hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int domino = run_arg_get_int( args, "domino", -1 );
-    int seedA  = run_arg_get_int( args, "seedA", random() );
+    int seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zungqr.c b/testing/testing_zungqr.c
index a2a22b968596d0662b42ac282bd4f8b05630bb18..30b12ce2205b3b456991d35a558927a20efebc4a 100644
--- a/testing/testing_zungqr.c
+++ b/testing/testing_zungqr.c
@@ -39,7 +39,7 @@ testing_zungqr_desc( run_arg_list_t *args, int check )
     int      K      = run_arg_get_int( args, "K", chameleon_min( M, N ) );
     int      LDA    = run_arg_get_int( args, "LDA", M );
     int      RH     = run_arg_get_int( args, "qra", 0 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -129,7 +129,7 @@ testing_zungqr_std( run_arg_list_t *args, int check )
     int K     = run_arg_get_int( args, "K", chameleon_min( M, N ) );
     int LDA   = run_arg_get_int( args, "LDA", M );
     int RH    = run_arg_get_int( args, "qra", 0 );
-    int seedA = run_arg_get_int( args, "seedA", random() );
+    int seedA = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q     = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zungqr_hqr.c b/testing/testing_zungqr_hqr.c
index 40b16a1e06a57bd4e7ff9bc9457a3d2f9d7fb981..fb491235c69854883e803c11d3c635af9e4ee38b 100644
--- a/testing/testing_zungqr_hqr.c
+++ b/testing/testing_zungqr_hqr.c
@@ -43,7 +43,7 @@ testing_zungqr_hqr_desc( run_arg_list_t *args, int check )
     int      llvl   = run_arg_get_int( args, "llvl", -1 );
     int      hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int      domino = run_arg_get_int( args, "domino", -1 );
-    int      seedA  = run_arg_get_int( args, "seedA", random() );
+    int      seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int      Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -143,7 +143,7 @@ testing_zungqr_hqr_std( run_arg_list_t *args, int check )
     int llvl   = run_arg_get_int( args, "llvl", -1 );
     int hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int domino = run_arg_get_int( args, "domino", -1 );
-    int seedA  = run_arg_get_int( args, "seedA", random() );
+    int seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
     int Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zunmlq.c b/testing/testing_zunmlq.c
index 7506473b933ba31bf2ed357848e6b6d586b6c56b..e9edb11397c140426993a78b4725e7d3bf884816 100644
--- a/testing/testing_zunmlq.c
+++ b/testing/testing_zunmlq.c
@@ -43,8 +43,8 @@ testing_zunmlq_desc( run_arg_list_t *args, int check )
     int          LDA    = run_arg_get_int( args, "LDA", K );
     int          LDC    = run_arg_get_int( args, "LDC", M );
     int          RH     = run_arg_get_int( args, "qra", 4 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedC  = run_arg_get_int( args, "seedC", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -137,8 +137,8 @@ testing_zunmlq_std( run_arg_list_t *args, int check )
     int          LDA   = run_arg_get_int( args, "LDA", K );
     int          LDC   = run_arg_get_int( args, "LDC", M );
     int          RH    = run_arg_get_int( args, "qra", 4 );
-    int          seedA = run_arg_get_int( args, "seedA", random() );
-    int          seedC = run_arg_get_int( args, "seedC", random() );
+    int          seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q     = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zunmlq_hqr.c b/testing/testing_zunmlq_hqr.c
index 06289c0107113896c72395888d3d8c8aa6c1b2e0..9a4f9b16beee49b012baba75a556221608318145 100644
--- a/testing/testing_zunmlq_hqr.c
+++ b/testing/testing_zunmlq_hqr.c
@@ -47,8 +47,8 @@ testing_zunmlq_hqr_desc( run_arg_list_t *args, int check )
     int          llvl   = run_arg_get_int( args, "llvl", -1 );
     int          hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int          domino = run_arg_get_int( args, "domino", -1 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedC  = run_arg_get_int( args, "seedC", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -151,8 +151,8 @@ testing_zunmlq_hqr_std( run_arg_list_t *args, int check )
     int          llvl   = run_arg_get_int( args, "llvl", -1 );
     int          hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int          domino = run_arg_get_int( args, "domino", -1 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedC  = run_arg_get_int( args, "seedC", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zunmqr.c b/testing/testing_zunmqr.c
index 7c0e9efac691108416b126b0610497ab79e4f07e..63cad8335beea8174bbe5ee82ac936c8844e90a5 100644
--- a/testing/testing_zunmqr.c
+++ b/testing/testing_zunmqr.c
@@ -43,8 +43,8 @@ testing_zunmqr_desc( run_arg_list_t *args, int check )
     int          LDA    = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N );
     int          LDC    = run_arg_get_int( args, "LDC", M );
     int          RH     = run_arg_get_int( args, "qra", 4 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedC  = run_arg_get_int( args, "seedC", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -137,8 +137,8 @@ testing_zunmqr_std( run_arg_list_t *args, int check )
     int          LDA   = run_arg_get_int( args, "LDA", ( side == ChamLeft ) ? M : N );
     int          LDC   = run_arg_get_int( args, "LDC", M );
     int          RH    = run_arg_get_int( args, "qra", 4 );
-    int          seedA = run_arg_get_int( args, "seedA", random() );
-    int          seedC = run_arg_get_int( args, "seedC", random() );
+    int          seedA = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q     = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testing_zunmqr_hqr.c b/testing/testing_zunmqr_hqr.c
index ce77e0b414b4a2fa4ec79b4fb95f86fdd990c3f1..ffc4ead01e250143d7456643075ea064239d9169 100644
--- a/testing/testing_zunmqr_hqr.c
+++ b/testing/testing_zunmqr_hqr.c
@@ -47,8 +47,8 @@ testing_zunmqr_hqr_desc( run_arg_list_t *args, int check )
     int          llvl   = run_arg_get_int( args, "llvl", -1 );
     int          hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int          domino = run_arg_get_int( args, "domino", -1 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedC  = run_arg_get_int( args, "seedC", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
@@ -151,8 +151,8 @@ testing_zunmqr_hqr_std( run_arg_list_t *args, int check )
     int          llvl   = run_arg_get_int( args, "llvl", -1 );
     int          hlvl   = run_arg_get_int( args, "hlvl", -1 );
     int          domino = run_arg_get_int( args, "domino", -1 );
-    int          seedA  = run_arg_get_int( args, "seedA", random() );
-    int          seedC  = run_arg_get_int( args, "seedC", random() );
+    int          seedA  = run_arg_get_int( args, "seedA", testing_ialea() );
+    int          seedC  = run_arg_get_int( args, "seedC", testing_ialea() );
     int          Q      = parameters_compute_q( P );
 
     /* Descriptors */
diff --git a/testing/testings.h b/testing/testings.h
index 0b57e924963ece02f464e03f16efc9a30954b74c..860d002ff24daf4d56e648fc317fdeffea6c8a90 100644
--- a/testing/testings.h
+++ b/testing/testings.h
@@ -191,6 +191,7 @@ char *sprint_check    ( val_t val, int human, int nbchar, char *str_in );
 
 #define sprint_fixdbl sprint_double
 
+long                  testing_ialea();
 float                 testing_salea();
 double                testing_dalea();
 CHAMELEON_Complex32_t testing_calea();
diff --git a/testing/values.c b/testing/values.c
index 678b9e31c46b456c3cb714b664f1327392c89fe7..8d6f8549cdb11cb717d359a081a6eff90232bcd3 100644
--- a/testing/values.c
+++ b/testing/values.c
@@ -723,6 +723,15 @@ testing_salea()
     return val;
 }
 
+/**
+ * @brief Generate a random integer
+ */
+long
+testing_ialea()
+{
+    return random();
+}
+
 /**
  * @brief Generate a random double
  */