Changeset 124 for trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
- Timestamp:
- Jun 17, 2009, 2:11:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
r112 r124 4 4 # $Id$ 5 5 #----------------------------------------------------------- 6 7 VERSION="1.0" 6 8 7 9 # Need : test, echo, cd, dirname, basename, ssh … … 39 41 } 40 42 43 #-----[ my_date ]------------------------------------------- 44 function my_date () 45 { 46 date +"%F %T"; 47 } 48 41 49 #-----[ distexe_test_usage ]-------------------------------- 42 50 function distexe_test_usage () … … 67 75 fi; 68 76 fi; 77 } 69 78 79 #-----[ header ]-------------------------------------------- 80 function header () 81 { 82 echo "distexe ${VERSION}"; 70 83 } 71 84 … … 80 93 cd -; 81 94 82 # Abso ulte path of work directory83 local DIR_EXE;95 # Absolute path of work directory 96 local PATH_EXE; 84 97 if test ${#} -eq 2; then 85 cd ${2} ;86 DIR_EXE=${PWD};87 cd - ;98 cd ${2} &> /dev/null; 99 PATH_EXE=${PWD}; 100 cd - &> /dev/null; 88 101 else 89 DIR_EXE=${PWD};102 PATH_EXE=${PWD}; 90 103 fi; 104 105 header; 106 echo " * {"$(my_date)"} <${HOSTNAME}> file : ${FILE_CMD}"; 107 echo " * {"$(my_date)"} <${HOSTNAME}> path : ${PATH_EXE}"; 91 108 92 109 local hosts="${DISTEXE_HOSTS}"; … … 96 113 local -i nb_process=$(echo ${line} | cut -d/ -f2); 97 114 98 echo " *station : ${host} (${nb_process}) ... ";115 echo " * {"$(my_date)"} <${HOSTNAME}> station : ${host} (${nb_process}) ... "; 99 116 100 117 # lunch service 101 local cmd="export MORPHEO_SCRIPT=${MORPHEO_SCRIPT};${MORPHEO_SCRIPT}/execute_n.sh ${ DIR_EXE} ${FILE_CMD} ${nb_process};";118 local cmd="export MORPHEO_SCRIPT=${MORPHEO_SCRIPT};${MORPHEO_SCRIPT}/execute_n.sh ${PATH_EXE} ${FILE_CMD} ${nb_process};"; 102 119 ssh ${host} ${cmd} & 103 120 done; 121 122 echo " * {"$(my_date)"} <${HOSTNAME}> all hosts working"; 123 104 124 } 105 125
Note: See TracChangeset
for help on using the changeset viewer.