Changeset 128 for trunk/IPs/systemC/processor/Morpheo/Script
- Timestamp:
- Jun 26, 2009, 10:43:23 AM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
r126 r128 5 5 #----------------------------------------------------------- 6 6 7 VERSION="1.0" 7 declare VERSION="1.0" 8 declare -i SLEEP=3 8 9 9 10 # Need : test, echo, cd, dirname, basename, ssh, ps aux … … 106 107 107 108 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}"; 110 113 111 114 local hosts="${DISTEXE_HOSTS}"; … … 133 136 local -i res=1 134 137 135 while t est ${res} -ne 0; do138 while true; do 136 139 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}; 137 147 done 138 148 -
trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
r127 r128 89 89 90 90 local -i NB_DIGIT=0; 91 local -i x=${#COMMAND[*]}; 91 local -i NB_COMMAND=${#COMMAND[*]}; 92 local -i x=${NB_COMMAND}; 92 93 93 94 while test ${x} -ne 0; do … … 113 114 114 115 # test if this number is valid 115 if test ${CPT} -ge ${ #COMMAND[*]}; then116 CPT=${ #COMMAND[*]};116 if test ${CPT} -ge ${NB_COMMAND}; then 117 CPT=${NB_COMMAND}; 117 118 fi; 118 119 … … 129 130 130 131 # test if this number is valid 131 if test ${CPT} -eq ${ #COMMAND[*]}; then132 if test ${CPT} -eq ${NB_COMMAND}; then 132 133 break; 133 134 fi; … … 138 139 139 140 # 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"; 141 142 local PATH_CURRENT=${PWD}; 142 143 … … 154 155 ./${OUTPUT_FILE_CMD} &> ${OUTPUT_FILE_OUT}; 155 156 cd ${PATH_CURRENT} &> /dev/null; 156 echo " * {"$(my_date)"} <${ID}> command [${NUM} ] : done";157 echo " * {"$(my_date)"} <${ID}> command [${NUM}/${NB_COMMAND}] : done"; 157 158 fi; 158 159 done;
Note: See TracChangeset
for help on using the changeset viewer.