Ignore:
Timestamp:
Jun 26, 2009, 10:43:23 AM (16 years ago)
Author:
rosiere
Message:

1) Correct bug in link two signal
2) Fix error detected with valgrind
3) modif distexe script

Location:
trunk/IPs/systemC/processor/Morpheo/Script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh

    r126 r128  
    55#-----------------------------------------------------------
    66
    7 VERSION="1.0"
     7declare    VERSION="1.0"
     8declare -i SLEEP=3
    89
    910# Need : test, echo, cd, dirname, basename, ssh, ps aux
     
    106107   
    107108    header;
    108     echo "  * {"$(my_date)"} <${HOSTNAME}> file : ${FILE_CMD}";
    109     echo "  * {"$(my_date)"} <${HOSTNAME}> path : ${PATH_EXE}";
     109
     110    echo "  * {"$(my_date)"} <${HOSTNAME}> file  : ${FILE_CMD}";
     111    echo "  * {"$(my_date)"} <${HOSTNAME}> path  : ${PATH_EXE}";
     112    echo "  * {"$(my_date)"} <${HOSTNAME}> sleep : ${SLEEP}";
    110113
    111114    local hosts="${DISTEXE_HOSTS}";
     
    133136        local -i res=1
    134137
    135         while test ${res} -ne 0; do
     138        while true; do
    136139            res=$(ps aux | grep -c "${commands[${cpt}]}");
     140
     141            if test ${res} -eq 0; then
     142                break;
     143            fi;
     144
     145            # wait (to not have 100% cpu)
     146            sleep ${SLEEP};
    137147        done
    138148
  • trunk/IPs/systemC/processor/Morpheo/Script/execute.sh

    r127 r128  
    8989
    9090    local -i NB_DIGIT=0;
    91     local -i x=${#COMMAND[*]};
     91    local -i NB_COMMAND=${#COMMAND[*]};
     92    local -i x=${NB_COMMAND};
    9293
    9394    while test ${x} -ne 0; do
     
    113114
    114115        # test if this number is valid
    115         if test ${CPT} -ge ${#COMMAND[*]}; then
    116             CPT=${#COMMAND[*]};
     116        if test ${CPT} -ge ${NB_COMMAND}; then
     117            CPT=${NB_COMMAND};
    117118        fi;
    118119
     
    129130
    130131        # test if this number is valid
    131         if test ${CPT} -eq ${#COMMAND[*]}; then
     132        if test ${CPT} -eq ${NB_COMMAND}; then
    132133            break;
    133134        fi;
     
    138139
    139140#           echo "  * {"$(my_date)"} <${ID}> execute command [${NUM}] : ${COMMAND[${CPT}]}";
    140             echo "  * {"$(my_date)"} <${ID}> command [${NUM}] : execute";
     141            echo "  * {"$(my_date)"} <${ID}> command [${NUM}/${NB_COMMAND}] : execute";
    141142            local PATH_CURRENT=${PWD};
    142143
     
    154155            ./${OUTPUT_FILE_CMD}      &>  ${OUTPUT_FILE_OUT};
    155156            cd    ${PATH_CURRENT}     &> /dev/null;
    156             echo "  * {"$(my_date)"} <${ID}> command [${NUM}] : done";
     157            echo "  * {"$(my_date)"} <${ID}> command [${NUM}/${NB_COMMAND}] : done";
    157158        fi;
    158159    done;
Note: See TracChangeset for help on using the changeset viewer.