Index: trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh	(revision 124)
@@ -4,4 +4,6 @@
 # $Id$
 #-----------------------------------------------------------
+
+VERSION="1.0"
 
 # Need : test, echo, cd, dirname, basename, ssh
@@ -39,4 +41,10 @@
 }
 
+#-----[ my_date ]-------------------------------------------
+function my_date ()
+{
+    date +"%F %T";
+}
+
 #-----[ distexe_test_usage ]--------------------------------
 function distexe_test_usage ()
@@ -67,5 +75,10 @@
         fi;
     fi;
+}
 
+#-----[ header ]--------------------------------------------
+function header ()
+{
+    echo "distexe ${VERSION}";
 }
 
@@ -80,13 +93,17 @@
     cd -;
 
-    # Absoulte path of work directory
-    local    DIR_EXE;
+    # Absolute path of work directory
+    local    PATH_EXE;
     if test ${#} -eq 2; then
-        cd ${2};
-        DIR_EXE=${PWD};
-        cd -;
+        cd ${2} &> /dev/null;
+        PATH_EXE=${PWD};
+        cd -  &> /dev/null;
     else
-        DIR_EXE=${PWD};
+        PATH_EXE=${PWD};
     fi;
+
+    header;
+    echo "  * {"$(my_date)"} <${HOSTNAME}> file : ${FILE_CMD}";
+    echo "  * {"$(my_date)"} <${HOSTNAME}> path : ${PATH_EXE}";
 
     local hosts="${DISTEXE_HOSTS}";
@@ -96,10 +113,13 @@
         local -i nb_process=$(echo ${line} | cut -d/ -f2);
 
-        echo " * station : ${host} (${nb_process}) ... ";
+        echo "  * {"$(my_date)"} <${HOSTNAME}> station : ${host} (${nb_process}) ... ";
 
         # lunch service
-        local cmd="export MORPHEO_SCRIPT=${MORPHEO_SCRIPT};${MORPHEO_SCRIPT}/execute_n.sh ${DIR_EXE} ${FILE_CMD} ${nb_process};";
+        local cmd="export MORPHEO_SCRIPT=${MORPHEO_SCRIPT};${MORPHEO_SCRIPT}/execute_n.sh ${PATH_EXE} ${FILE_CMD} ${nb_process};";
         ssh ${host} ${cmd} &
     done;
+
+    echo "  * {"$(my_date)"} <${HOSTNAME}> all hosts working";
+
 }
 
Index: trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Script/execute.sh	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Script/execute.sh	(revision 124)
@@ -28,10 +28,11 @@
 function execute_usage ()
 {
-    echo "Usage     : ${0} work_dir file_cmd file_cpt file_cpu";
+    echo "Usage     : ${0} path_work file_cmd file_cpt file_cpu id";
     echo "Arguments : ";
-    echo " * work_dir   : directory to execute command";
+    echo " * path_work  : directory to execute command";
     echo " * file_cmd   : list of command";
     echo " * file_cpt   : file with the index of next command to execute";
     echo " * file_cpu   : tmp file to stock the current index";
+    echo " * id         : identification";
     exit;
 }
@@ -40,5 +41,5 @@
 function execute_test_usage ()
 {
-    if test ${#} -ne 4; then
+    if test ${#} -ne 5; then
 	execute_usage;
     fi;
@@ -58,17 +59,21 @@
     local -i CPT_OLD;
     local -i CPT;
-    local    WORK_DIR=${1};
+    local    PATH_WORK=${1};
     local    FILE_CMD=${2};
     local    FILE_CPT=${3};
     local    FILE_CPU=${4};
-    local    LOCK_CPT="${WORK_DIR}/.lock-cpt";
-    local    LOCK_CPU="${WORK_DIR}/.lock-cpu";
-    local    FILE_CMD="distexe.command";
-    local    FILE_OUT="distexe.output";
+    local    ID=${5};
+    local    LOCK_CPT="${PATH_WORK}/.lock-cpt";
+    local    LOCK_CPU="${PATH_WORK}/.lock-cpu";
+    local    OUTPUT_FILE_INFO="distexe.info";
+    local    OUTPUT_FILE_CMD="distexe.command";
+    local    OUTPUT_FILE_OUT="distexe.output";
 
+#   echo "  * {"$(my_date)"} <${ID}> pid is $$";
 
     # Init CPT if this thread is the first
     lock   ${LOCK_CPT};
     if test ! -s ${FILE_CPT}; then
+        echo "  * {"$(my_date)"} <${ID}> create counter file ${FILE_CPT}";
 	echo "0" > ${FILE_CPT};
     fi;
@@ -83,5 +88,5 @@
     done < ${FILE_CMD};
 
-    echo "  * <${HOSTNAME}-$$> {"$(my_date)"} is ready";
+    echo "  * {"$(my_date)"} <${ID}> is ready";
 
     # infinite loop
@@ -99,5 +104,5 @@
 	unlock ${LOCK_CPT};
 
-	# test if this number is valid
+        # test if this number is valid
 	if test ${CPT} -ge ${#COMMAND[*]}; then
 	    CPT=${#COMMAND[*]};
@@ -110,5 +115,5 @@
 #	while test ${CPT}_SYNC -lt ${CPT}; do
 #	    if test -z "${COMMAND[${CPT}_SYNC]}"; then
-#		echo "  * <${HOSTNAME}-$$> {"$(my_date)"} synchronisation [${CPT}_SYNC]";
+#		echo "  * {"$(my_date)"} <${ID}> synchronisation [${CPT}_SYNC]";
 #	    fi;
 #	    CPT_SYNC=$((${CPT}_SYNC+1));
@@ -122,17 +127,24 @@
 	# Test if command is empty !
 	if test ! -z "${COMMAND[${CPT}]}"; then
-	    local CURREN_DIR=${PWD};
-            cd    ${WORK_DIR}         &> /dev/null;
+	    local PATH_CURRENT=${PWD};
+            cd    ${PATH_WORK}        &> /dev/null;
 	    mkdir "Task_${CPT}"       &> /dev/null;
 	    cd    "Task_${CPT}"       &> /dev/null;
-	    echo "  * <${HOSTNAME}-$$> {"$(my_date)"} execute command [${CPT}] : ${COMMAND[${CPT}]}";
-	    echo "${COMMAND[${CPT}]}"  >  ${FILE_CMD};
-#	    chmod +x                      ${FILE_CMD};
-	    eval "${COMMAND[${CPT}]}" &>  ${FILE_OUT};
-	    cd    ${CURREN_DIR}       &> /dev/null;
+#	    echo "  * {"$(my_date)"} <${ID}> execute command [${CPT}] : ${COMMAND[${CPT}]}";
+	    echo "  * {"$(my_date)"} <${ID}> execute command [${CPT}]";
+            echo "id   : ${ID}"        >  ${OUTPUT_FILE_INFO};
+            echo "host : ${HOSTNAME}" >>  ${OUTPUT_FILE_INFO};
+            echo "pid  : $$"          >>  ${OUTPUT_FILE_INFO};
+            echo "date : "$(my_date)  >>  ${OUTPUT_FILE_INFO};
+	    echo "#!/bin/bash"         >  ${OUTPUT_FILE_CMD};
+	    echo 'source ${HOME}/.bashrc;' >>  ${OUTPUT_FILE_CMD};
+	    echo "${COMMAND[${CPT}]}" >>  ${OUTPUT_FILE_CMD};
+	    chmod +x                      ${OUTPUT_FILE_CMD};
+	    ./${OUTPUT_FILE_CMD}      &>  ${OUTPUT_FILE_OUT};
+	    cd    ${PATH_CURRENT}     &> /dev/null;
 	fi;
     done;
 
-    echo "  * <${HOSTNAME}-$$> {"$(my_date)"} is done";
+    echo "  * {"$(my_date)"} <${ID}> is done";
 
     lock   ${LOCK_CPU};
@@ -143,5 +155,5 @@
     
     if test ${CPT} -eq 0; then
-	echo "  * <${HOSTNAME}-$$> {"$(my_date)"} All task is executed";
+	echo "  * {"$(my_date)"} <${ID}> All task is executed on this host";
 	rm ${FILE_CPU};
     fi;
Index: trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Script/execute_n.sh	(revision 124)
@@ -5,5 +5,9 @@
 #-----------------------------------------------------------
 
-#-----[ global variable ]-----------------------------------
+#-----[ my_date ]-------------------------------------------
+function my_date ()
+{
+    date +"%F %T";
+}
 
 #-----[ nb_cpu ]--------------------------------------------
@@ -23,7 +27,7 @@
 function execute_n_usage ()
 {
-    echo "Usage     : ${0} word_dir file [ nb_process ]";
+    echo "Usage     : ${0} path_word file [ nb_process ]";
     echo "Arguments : ";
-    echo " * work_dir   : directory to execute command";
+    echo " * path_work  : directory to execute command";
     echo " * file       : list of command";
     echo " * nb_process : number of process (default (and maximum) is the number of processor)";
@@ -51,5 +55,5 @@
     if test -z "${MORPHEO_SCRIPT}"; then
         echo "Environment variable MORPHEO_SCRIPT is not set";
-        distexe_usage;
+        execute_n_usage;
     fi;
 
@@ -70,5 +74,5 @@
     local -i NB_PROCESS=$(nb_cpu);
     local -i CPT;
-    local    WORK_DIR=${1};
+    local    PATH_WORK=${1};
     local    FILE_CMD=${2};
     local    FILE_CPT;
@@ -78,14 +82,14 @@
     execute_n_test_usage ${*};
 
-    if test ${#} -eq 2; then
+    if test ${#} -eq 3; then
 	if test ${3} -lt ${NB_PROCESS}; then
 	    NB_PROCESS=${3};
-	fi;
+	fi;    
     fi;
 
-    FILE_CPT="${WORK_DIR}/control-"$(basename ${FILE_CMD});
-    FILE_CPU="${WORK_DIR}/${ID}";
+    FILE_CPT="${PATH_WORK}/control-"$(basename ${FILE_CMD});
+    FILE_CPU="${PATH_WORK}/${ID}";
 
-    echo "  * <${HOSTNAME}> ${NB_PROCESS} process";
+    echo "  * {"$(my_date)"} <${HOSTNAME}> ${NB_PROCESS} process";
 
     local -i IT_NB_PROCESS=1;
@@ -96,5 +100,5 @@
     # create the same number of thread that processor
     while test ${IT_NB_PROCESS} -le ${NB_PROCESS}; do
-	${MORPHEO_SCRIPT}/execute.sh ${WORK_DIR} ${FILE_CMD} ${FILE_CPT} ${FILE_CPU} &
+	${MORPHEO_SCRIPT}/execute.sh ${PATH_WORK} ${FILE_CMD} ${FILE_CPT} ${FILE_CPU} "${HOSTNAME}-${IT_NB_PROCESS}" &
 	IT_NB_PROCESS=$((${IT_NB_PROCESS}+1));
 
@@ -103,4 +107,6 @@
 	fi;
     done
+
+    echo "  * {"$(my_date)"} <${HOSTNAME}> all process working";
 }
 
