Index: soft/giet_vm/applications/convol/main.c
===================================================================
--- soft/giet_vm/convol/main.c	(revision 402)
+++ soft/giet_vm/applications/convol/main.c	(revision 432)
@@ -94,12 +94,13 @@
     int z; // vertical filter index for loops
 
+    // processor identifiers
+    unsigned int x;                                           // x coordinate
+    unsigned int y;                                           // y coordinate
+    unsigned int lpid;                                        // local proc/task id
+    giet_proc_xyp( &x, &y, &lpid );
+
     int          file        = 0;                             // file descriptor
-    unsigned int pid         = giet_procid();                 // processor id
     unsigned int nprocs      = NB_PROCS_MAX;                  // procs per cluster
     unsigned int nclusters   = NB_CLUSTERS;                   // number of clusters
-    unsigned int lpid        = pid % nprocs;                  // local task id
-    unsigned int cluster_xy  = pid / nprocs;                  // cluster index
-    unsigned int x           = cluster_xy >> Y_WIDTH;         // x coordinate
-    unsigned int y           = cluster_xy & ((1<<Y_WIDTH)-1); // y coordinate
     unsigned int cluster_id  = (x * Y_SIZE) + y;              // continuous cluster index
     unsigned int task_id     = (cluster_id * nprocs) + lpid;  // continuous task index
@@ -145,5 +146,5 @@
     ///////////////////////////////////////////////////////////////////
     
-    if ( pid == 0 )
+    if ( (x==0) && (y==0) && (lpid==0) )
     {
         giet_shr_printf("\n[CONVOL] task[0,0,0] starts barrier init at cycle %d\n" 
@@ -237,5 +238,5 @@
     // Other tasks are waiting on the init_ok condition.
     //////////////////////////////////////////////////////////////////////////
-    if ( pid == 0 )
+    if ( (x==0) && (y==0) && (lpid==0) )
     {
         // open file
@@ -331,6 +332,7 @@
                  x, y, lpid, date );
 #else
-if ( pid == 0 ) giet_shr_printf( "\n[CONVOL] task[0,0,0] starts horizontal filter"
-                                 " at cycle %d\n", date );
+if ( (x==0) && (y==0) && (lpid==0) ) 
+giet_shr_printf( "\n[CONVOL] task[0,0,0] starts horizontal filter"
+                 " at cycle %d\n", date );
 #endif
 
@@ -404,6 +406,7 @@
                  x, y, lpid, date );
 #else
-if ( pid == 0 ) giet_shr_printf( "\n[CONVOL] task[0,0,0] completes horizontal filter"
-                                 " at cycle %d\n", date );
+if ( (x==0) && (y==0) && (lpid==0) ) 
+giet_shr_printf( "\n[CONVOL] task[0,0,0] completes horizontal filter"
+                 " at cycle %d\n", date );
 #endif
 
@@ -433,6 +436,7 @@
                  x, y, lpid, date );
 #else
-if ( pid == 0 ) giet_shr_printf( "\n[CONVOL] task[0,0,0] starts vertical filter"
-                                 " at cycle %d\n", date );
+if ( (x==0) && (y==0) && (lpid==0) ) 
+giet_shr_printf( "\n[CONVOL] task[0,0,0] starts vertical filter"
+                 " at cycle %d\n", date );
 #endif
 
@@ -522,6 +526,7 @@
                  x, y, lpid, date );
 #else
-if ( pid == 0 ) giet_shr_printf( "\n[CONVOL] task[0,0,0] completes vertical filter"
-                                 " at cycle %d\n", date );
+if ( (x==0) && (y==0) && (lpid==0) ) 
+giet_shr_printf( "\n[CONVOL] task[0,0,0] completes vertical filter"
+                 " at cycle %d\n", date );
 #endif
 
@@ -548,6 +553,7 @@
                  x, y, lpid, date);
 #else
-if ( pid == 0 ) giet_shr_printf( "\n[CONVOL] task[0,0,0] starts final display"
-                                 " at cycle %d\n", date );
+if ( (x==0) && (y==0) && (lpid==0) ) 
+giet_shr_printf( "\n[CONVOL] task[0,0,0] starts final display"
+                 " at cycle %d\n", date );
 #endif
 
@@ -579,6 +585,7 @@
                  x, y, lpid, date);
 #else
-if ( pid == 0 ) giet_shr_printf( "\n[CONVOL] task[0,0,0] completes final display"
-                                 " at cycle %d\n", date );
+if ( (x==0) && (y==0) && (lpid==0) ) 
+giet_shr_printf( "\n[CONVOL] task[0,0,0] completes final display"
+                 " at cycle %d\n", date );
 #endif
      
@@ -596,5 +603,5 @@
     /////////////////////////////////////////////////////////
 
-    if ( pid == 0 )
+    if ( (x==0) && (y==0) && (lpid==0) )
     {
         date  = giet_proctime();
