Index: soft/giet_vm/applications/rosenfeld/src-par/mca.c
===================================================================
--- soft/giet_vm/applications/rosenfeld/src-par/mca.c	(revision 821)
+++ soft/giet_vm/applications/rosenfeld/src-par/mca.c	(revision 822)
@@ -42,5 +42,4 @@
 {
     printf("MCA ERROR: %s\n", msg);
-    printf("now exiting to system...\n");
     exit(1);
 }
@@ -164,7 +163,7 @@
     MCA *  mca_par;
     
-    printf("*** %s ***\n", __func__);
-    MCA_VERBOSE1(printf("   height = %d\n", height));
-    MCA_VERBOSE1(printf("   width  = %d\n", width));
+    MCA_VERBOSE1(printf("*** %s ***\n", __func__));
+    MCA_VERBOSE2(printf("   height = %d\n", height));
+    MCA_VERBOSE2(printf("   width  = %d\n", width));
     
     // array of pointers to mca workers
@@ -179,6 +178,6 @@
     height_mod = height % np;
 
-    MCA_VERBOSE1(printf("   height_par = %d x %d + %d\n", height_par, np, height_mod));
-    MCA_VERBOSE1(printf("   ========================\n"));
+    MCA_VERBOSE2(printf("   height_par = %d x %d + %d\n", height_par, np, height_mod));
+    MCA_VERBOSE2(printf("   ========================\n"));
     
     i1_par_previous = 0;
@@ -186,5 +185,5 @@
     // puissance de 2 de chaque bande
     ne_par = height_par * width + 1;
-    MCA_VERBOSE1(printf("   ne_par    = %d\n", ne_par));
+    MCA_VERBOSE2(printf("   ne_par    = %d\n", ne_par));
     pw2 = i32log2(ne_par);
     if (ne_par > (1 << pw2)) {
@@ -192,6 +191,7 @@
     }
     nemax_par = 1 << pw2;
-
-    MCA_VERBOSE1(printf("   nemax_par = %d\n", nemax_par));
+    mca->alpha = pw2;
+
+    MCA_VERBOSE2(printf("   nemax_par = %d\n", nemax_par));
 
     nb_level = i32log2(np);
@@ -230,5 +230,5 @@
         // -- constructor -- //
         // ----------------- //
-        MCA_VERBOSE2(printf("-- p = %d ----------------\n", p));
+        MCA_VERBOSE3(printf("-- p = %d ----------------\n", p));
     
         // alloc of mca workers into array of pointers
@@ -245,5 +245,5 @@
         x = (p / NB_PROCS_MAX) / Y_SIZE;
         y = (p / NB_PROCS_MAX) % Y_SIZE;
-        MCA_VERBOSE2(printf("p = %d (x = %d, y = %d)\n", p, x, y));
+        MCA_VERBOSE3(printf("p = %d (x = %d, y = %d)\n", p, x, y));
 #endif
         
@@ -268,6 +268,6 @@
         i1_par_previous = i1_par;
         
-        MCA_VERBOSE2(printf("i0_par = %d\n", i0_par));
-        MCA_VERBOSE2(printf("i1_par = %d\n", i1_par));
+        MCA_VERBOSE3(printf("i0_par = %d\n", i0_par));
+        MCA_VERBOSE3(printf("i1_par = %d\n", i1_par));
         
         // etiquettes
@@ -281,6 +281,6 @@
         }
     
-        MCA_VERBOSE2(printf("e0_par = %d\n", e0_par));
-        MCA_VERBOSE2(printf("e1_par = %d\n", e1_par));
+        MCA_VERBOSE3(printf("e0_par = %d\n", e0_par));
+        MCA_VERBOSE3(printf("e1_par = %d\n", e1_par));
 
         mca_par->width  = width;
@@ -313,19 +313,13 @@
         if (p == 0) {
             mca_par->T = remote_ui32vector(e0_par - 1, e1_par, x, y); // car e0 = 1, on a besoin que T[0] = 0 pour FindRoot
-#if FEATURES
             mca_par->stats = remote_RegionStatsVector(e0_par - 1, e1_par, x, y);
-#endif
         }
         else {
             mca_par->T = remote_ui32vector(e0_par, e1_par, x, y);
-#if FEATURES
             mca_par->stats = remote_RegionStatsVector(e0_par, e1_par, x, y);
-#endif
         }
         
         mca_par->D = (uint32 **) remote_vvector(0, np - 1, x, y);
-#if FEATURES
         mca_par->F = (RegionStats **) remote_vvector(0, np - 1, x, y);
-#endif
 #else // !GIETVM
         mca_par->X = ui8matrix (i0_par, i1_par, 0, width - 1);
@@ -334,25 +328,18 @@
         if (p == 0) {
             mca_par->T = ui32vector(e0_par - 1, e1_par); // car e0 = 1, on a besoin que T[0] = 0 pour FindRoot
-#if FEATURES
             mca_par->stats = RegionStatsVector(e0_par - 1, e1_par);
-
-#endif
         }
         else {
             mca_par->T = ui32vector(e0_par, e1_par);
-#if FEATURES
             mca_par->stats = RegionStatsVector(e0_par, e1_par);
-#endif
         }
         
         mca_par->D = (uint32 **) vvector(0, np - 1);
-#if FEATURES
         mca_par->F = (RegionStats **) vvector(0, np - 1);
-#endif
 #endif   
-        MCA_VERBOSE2(printf("X = %p\n", mca_par->X));
-        MCA_VERBOSE2(printf("E = %p\n", mca_par->E));
-        MCA_VERBOSE2(printf("T = %p\n", mca_par->T));
-        MCA_VERBOSE2(printf("D = %p\n", mca_par->D));
+        MCA_VERBOSE3(printf("X = %p\n", mca_par->X));
+        MCA_VERBOSE3(printf("E = %p\n", mca_par->E));
+        MCA_VERBOSE3(printf("T = %p\n", mca_par->T));
+        MCA_VERBOSE3(printf("D = %p\n", mca_par->D));
     } // p
     
@@ -365,5 +352,5 @@
         uint32 e1 = mca_par->e1;
     
-        MCA_VERBOSE2(printf("p = %d T[%d..%d]\n", p, e0, e1));
+        MCA_VERBOSE3(printf("p = %d T[%d..%d]\n", p, e0, e1));
         if (p == 0) {
             set_ui32vector_j(T, e0 - 1, e1); // car e0 = 1, on a besoin que T[0] = 0 pour FindRoot
@@ -372,8 +359,8 @@
             set_ui32vector_j(T, e0, e1);
         }
-        MCA_VERBOSE2(printf("\n"));
-    }
-    
-    MCA_VERBOSE2(printf("display des tables d'EQ\n"));
+        MCA_VERBOSE3(printf("\n"));
+    }
+    
+    MCA_VERBOSE3(printf("display des tables d'EQ\n"));
     for (int p = 0; p < np; p++) {
         MCA * mca_par = mcas[p];
@@ -383,12 +370,12 @@
         uint32 e1 = mca_par->e1;
         
-        MCA_VERBOSE2(printf("p = %d T[%d..%d]\n", p, e0, e1));
-        if (p == 0) {
-            MCA_VERBOSE2(display_ui32vector_number(T, e0 - 1, e0 + 10, "%5d", "T"));
-        }
-        else {
-            MCA_VERBOSE2(display_ui32vector_number(T, e0, e0 + 10, "%5d", "T"));
-        }
-        MCA_VERBOSE2(printf("\n"));
+        MCA_VERBOSE3(printf("p = %d T[%d..%d]\n", p, e0, e1));
+        if (p == 0) {
+            MCA_VERBOSE3(display_ui32vector_number(T, e0 - 1, e0 + 10, "%5d", "T"));
+        }
+        else {
+            MCA_VERBOSE3(display_ui32vector_number(T, e0, e0 + 10, "%5d", "T"));
+        }
+        MCA_VERBOSE3(printf("\n"));
     }
     //exit(-1);
@@ -399,5 +386,5 @@
     
     // table d'indirection distribuee D
-    MCA_VERBOSE2(printf("nemax_par = %d\n", nemax_par));
+    MCA_VERBOSE3(printf("nemax_par = %d\n", nemax_par));
     for (int p = 0; p < np; p++) {
         MCA * mca_p = mcas[p];
@@ -409,15 +396,13 @@
             uint32 * T = mca_k->T;
             D[k] = T + k * nemax_par; // il faut soustraire le "MSB"
-#if FEATURES
             RegionStats * stat = mca_k->stats;
             F[k] = stat + k * nemax_par; // il faut soustraire le "MSB"
-#endif
         } // k
     } // p
     
-    MCA_VERBOSE2(printf("table d'indirection distribuee D\n"));
-    
-    for (int p = 0; p < np; p++) {
-        MCA_VERBOSE2(printf("== p = %d ==========\n", p));
+    MCA_VERBOSE3(printf("table d'indirection distribuee D\n"));
+    
+    for (int p = 0; p < np; p++) {
+        MCA_VERBOSE3(printf("== p = %d ==========\n", p));
         
         MCA * mca_p = mcas[p];
@@ -430,20 +415,11 @@
             uint32 e0 = mca_k->e0;
             uint32 e1 = mca_k->e1;
-            MCA_VERBOSE2(display_ui32vector_number(T, e0, e0 + 9, "%5d", "T"));
-            MCA_VERBOSE2(display_ui32vector(D[k], 0, 9, "%5d", "D\n"));
-        }
-        MCA_VERBOSE2(printf("\n"));
-    }
-    
-    /**/
-    //exit(-1);
-    
-    //printf("[MCA_Initialize] positionnement des pointeurs de lignes (i0-1) et (i1+1)");
-    
-    for (int p = 0; p < np; p++) {
-    
-        //printf(" --p = %d ------------------\n", p);
-        // cas general
-        
+            MCA_VERBOSE3(display_ui32vector_number(T, e0, e0 + 9, "%5d", "T"));
+            MCA_VERBOSE3(display_ui32vector(D[k], 0, 9, "%5d", "D\n"));
+        }
+        MCA_VERBOSE3(printf("\n"));
+    }
+    
+    for (int p = 0; p < np; p++) {
         if (p > 0) {
             //printf("i0_(%d) = %d i1_{%d} = %d\n", p, mcas[p]->i0, p-1, mcas[p-1]->i1);
@@ -476,18 +452,18 @@
     (void) mca_par;
     
-    printf("*** MCA_Display_Parameters ***\n");
-    
-    MCA_VERBOSE1(printf("   height = %d\n", mca->height));
-    MCA_VERBOSE1(printf("   width  = %d\n", mca->width));
-    MCA_VERBOSE1(printf("   np     = %d\n", mca->np));
+    MCA_VERBOSE1(printf("*** MCA_Display_Parameters ***\n"));
+    
+    MCA_VERBOSE2(printf("   height = %d\n", mca->height));
+    MCA_VERBOSE2(printf("   width  = %d\n", mca->width));
+    MCA_VERBOSE2(printf("   np     = %d\n", mca->np));
     
     for (int p = 0; p < np; p++) {
         mca_par = mcas[p];
         
-        MCA_VERBOSE2(printf("Display MCA[%d]\n", p));
-        MCA_VERBOSE2(printf("p = %d\n", mca_par->p));
-        MCA_VERBOSE2(printf("i0 = %8d  i1 = %8d\n", mca_par->i0, mca_par->i1));
-        MCA_VERBOSE2(printf("j0 = %8d  j1 = %8d\n", mca_par->j0, mca_par->j1));
-        MCA_VERBOSE2(printf("e0 = %8d  e1 = %8d\n", mca_par->e0, mca_par->e1));
+        MCA_VERBOSE3(printf("Display MCA[%d]\n", p));
+        MCA_VERBOSE3(printf("p = %d\n", mca_par->p));
+        MCA_VERBOSE3(printf("i0 = %8d  i1 = %8d\n", mca_par->i0, mca_par->i1));
+        MCA_VERBOSE3(printf("j0 = %8d  j1 = %8d\n", mca_par->j0, mca_par->j1));
+        MCA_VERBOSE3(printf("e0 = %8d  e1 = %8d\n", mca_par->e0, mca_par->e1));
     }
 }
@@ -507,5 +483,5 @@
     uint32 e0, e1;
     
-    printf("*** MCA_Finalize ***\n");
+    MCA_VERBOSE1(printf("*** MCA_Finalize ***\n"));
     
 #if PYR_BARRIERS
@@ -532,19 +508,13 @@
         if (p == 0) {
             free_ui32vector(mca_par->T, e0 - 1, e1); // car e0 = 1, on a besoin que T[0] = 0 pour FindRoot
-#if FEATURES
             free_RegionStatsVector(mca_par->stats, e0 - 1, e1);
-#endif
         }
         else {
             free_ui32vector(mca_par->T, e0, e1);
-#if FEATURES
             free_RegionStatsVector(mca_par->stats, e0, e1);
-#endif
         }
         
         free_vvector((void **) mca_par->D, 0, np - 1);
-#if FEATURES
         free_vvector((void **) mca_par->F, 0, np - 1);
-#endif
         free(mca_par);
     }
@@ -564,5 +534,5 @@
     
     if (mca->p == 0) { 
-        printf("*** MCA_Scatter_ImageX ***\n");
+        MCA_VERBOSE1(printf("*** MCA_Scatter_ImageX ***\n"));
     }
     
@@ -593,5 +563,5 @@
 
     if (mca->p == 0) { 
-        printf("*** MCA_Gather_ImageL ***\n");
+        MCA_VERBOSE1(printf("*** MCA_Gather_ImageL ***\n"));
     }
 
