Changeset 1468 for palm/trunk/SCRIPTS/mbuild
- Timestamp:
- Sep 24, 2014 2:06:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mbuild
r1391 r1468 22 22 # Current revisions: 23 23 # ------------------ 24 # 24 # Typo removed (addres->address) 25 # Adjustments for lcxe6 25 26 # 26 27 # Former revisions: … … 170 171 # DETERMINE THE LOCAL HOST 171 172 local_host_real_name=$(hostname) 172 # local_addres =$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')173 # local_address=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') 173 174 174 175 … … 359 360 column1="local username:"; column2=$local_username 360 361 printf "| $column1$column2 | \n" 361 column1="local IP-addres :"; column2=$local_addres362 column1="local IP-address:"; column2=$local_address 362 363 printf "| $column1$column2 | \n" 363 364 column1="config file:"; column2=$config_file … … 484 485 # DETERMINE IP-ADDRES OF THE REMOTE-HOST 485 486 case $remote_host in 486 (lccrayb) remote_addres =130.73.233.1;;487 (lccrayh) remote_addres =130.75.4.1;;488 (lcflow) remote_addres ="flow.hpc.uni-oldenburg.de";;487 (lccrayb) remote_address=130.73.233.1;; 488 (lccrayh) remote_address=130.75.4.1;; 489 (lcflow) remote_address="flow.hpc.uni-oldenburg.de";; 489 490 (lckordi) remote_adress=210.219.61.8;; 490 (lcmuk) remote_addres =130.75.105.2;;491 (lcrte) remote_addres =133.5.185.60;;492 (lcsb) remote_addres =147.46.30.151;;493 (lck) remote_addres =165.132.26.61;;494 (lckiaps) remote_addres =118.128.66.223;;495 (lckyut) remote_addres =133.5.4.37;;496 (lctit) remote_addres =10.1.6.170;;497 (lcxe6) remote_addres =129.177.20.113;;498 (lcxt5m) remote_addres =193.166.211.144;;499 (ibmh) remote_addres =136.172.40.15;;500 (ibmkisti) remote_addres =150.183.146.24;;501 (ibmku) remote_addres =133.5.4.129;;502 (ibms) remote_addres =150.183.5.101;;503 (nech) remote_addres =136.172.44.192;;504 (neck) remote_addres =133.5.178.11;;505 (ground.yonsei.ac.kr) remote_addres =134.75.155.33;;491 (lcmuk) remote_address=130.75.105.2;; 492 (lcrte) remote_address=133.5.185.60;; 493 (lcsb) remote_address=147.46.30.151;; 494 (lck) remote_address=165.132.26.61;; 495 (lckiaps) remote_address=118.128.66.223;; 496 (lckyut) remote_address=133.5.4.37;; 497 (lctit) remote_address=10.1.6.170;; 498 (lcxe6) remote_address=129.177.20.113;; 499 (lcxt5m) remote_address=193.166.211.144;; 500 (ibmh) remote_address=136.172.40.15;; 501 (ibmkisti) remote_address=150.183.146.24;; 502 (ibmku) remote_address=133.5.4.129;; 503 (ibms) remote_address=150.183.5.101;; 504 (nech) remote_address=136.172.44.192;; 505 (neck) remote_address=133.5.178.11;; 506 (ground.yonsei.ac.kr) remote_address=134.75.155.33;; 506 507 (*) if [[ $local_host != $remote_host ]] 507 508 then … … 964 965 column1="username:"; column2=$remote_username 965 966 printf "| $column1$column2 | \n" 966 column1="addres :"; column2=$remote_addres967 column1="address:"; column2=$remote_address 967 968 printf "| $column1$column2 | \n" 968 969 column1="compiler:"; column2=$compiler_name … … 1055 1056 # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST 1056 1057 # CREATE THIS DIRECTORY, IF IT DOES NOT EXIST 1057 echo " *** copying \"${mainprog}_sources.tar\" to \"${remote_addres }:${remote_md}/\" "1058 echo " *** copying \"${mainprog}_sources.tar\" to \"${remote_address}:${remote_md}/\" " 1058 1059 if [[ $remote_host != lctit ]] 1059 1060 then 1060 ssh ${remote_username}@${remote_addres } "[[ ! -d ${remote_md} ]] && (echo \" *** ${remote_md} will be created\"; mkdir -p ${remote_md})"1061 ssh ${remote_username}@${remote_address} "[[ ! -d ${remote_md} ]] && (echo \" *** ${remote_md} will be created\"; mkdir -p ${remote_md})" 1061 1062 else 1062 1063 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS 1063 print "[[ ! -d ${remote_md} ]] && (echo \" *** ${remote_md} will be created\"; mkdir -p ${remote_md})" | ssh ${remote_username}@${remote_addres } 2>&11064 fi 1065 1066 scp ${local_source_path}/${mainprog}_sources.tar ${remote_username}@${remote_addres }:${remote_md}/${mainprog}_sources.tar1064 print "[[ ! -d ${remote_md} ]] && (echo \" *** ${remote_md} will be created\"; mkdir -p ${remote_md})" | ssh ${remote_username}@${remote_address} 2>&1 1065 fi 1066 1067 scp ${local_source_path}/${mainprog}_sources.tar ${remote_username}@${remote_address}:${remote_md}/${mainprog}_sources.tar 1067 1068 1068 1069 … … 1072 1073 if [[ $remote_host != lctit ]] 1073 1074 then 1074 ssh ${remote_username}@${remote_addres } "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]] && tar -xf ${mainprog}_current_version.tar"1075 ssh ${remote_username}@${remote_address} "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]] && tar -xf ${mainprog}_current_version.tar" 1075 1076 else 1076 1077 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS 1077 print "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]] && tar -xf ${mainprog}_current_version.tar" | ssh ${remote_username}@${remote_addres } 2>&11078 print "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]] && tar -xf ${mainprog}_current_version.tar" | ssh ${remote_username}@${remote_address} 2>&1 1078 1079 fi 1079 1080 … … 1083 1084 if [[ $remote_host != lctit ]] 1084 1085 then 1085 ssh ${remote_username}@${remote_addres } "cd ${remote_md}; tar -xf ${mainprog}_sources.tar"1086 ssh ${remote_username}@${remote_address} "cd ${remote_md}; tar -xf ${mainprog}_sources.tar" 1086 1087 else 1087 1088 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS 1088 print "cd ${remote_md}; tar -xf ${mainprog}_sources.tar" | ssh ${remote_username}@${remote_addres } 2>&11089 print "cd ${remote_md}; tar -xf ${mainprog}_sources.tar" | ssh ${remote_username}@${remote_address} 2>&1 1089 1090 fi 1090 1091 … … 1121 1122 then 1122 1123 1123 ssh ${remote_username}@${remote_addres } "$init_cmds $module_calls cd ${remote_md}; echo '$make_call_string' > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll1124 ssh ${remote_username}@${remote_address} "$init_cmds $module_calls cd ${remote_md}; echo '$make_call_string' > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll 1124 1125 1125 1126 elif [[ $remote_host = ibmh ]] 1126 1127 then 1127 1128 1128 print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres } 2>&1 | tee ${remote_host}_last_make_protokoll1129 print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll 1129 1130 1130 1131 elif [[ $remote_host = lctit ]] … … 1134 1135 while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]] 1135 1136 do 1136 print "cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres } 2>&1 | tee ${remote_host}_last_make_protokoll1137 print "cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll 1137 1138 done 1138 1139 … … 1140 1141 then 1141 1142 1142 ssh ${remote_username}@${remote_addres } "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll1143 ssh ${remote_username}@${remote_address} "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll 1143 1144 1144 1145 else 1145 1146 1146 print "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres } 2>&1 | tee ${remote_host}_last_make_protokoll1147 print "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll 1147 1148 1148 1149 fi … … 1177 1178 if [[ $remote_host != lctit ]] 1178 1179 then 1179 ssh ${remote_username}@${remote_addres } "cd ${remote_md}; chmod u+w *; tar -cf ${mainprog}_current_version.tar ${mainprog} *.f90 *.o *.mod"1180 ssh ${remote_username}@${remote_address} "cd ${remote_md}; chmod u+w *; tar -cf ${mainprog}_current_version.tar ${mainprog} *.f90 *.o *.mod" 1180 1181 else 1181 1182 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS 1182 print "cd ${remote_md}; chmod u+w *; tar -cf ${mainprog}_current_version.tar ${mainprog} *.f90 *.o *.mod" | ssh ${remote_username}@${remote_addres } 2>&11183 print "cd ${remote_md}; chmod u+w *; tar -cf ${mainprog}_current_version.tar ${mainprog} *.f90 *.o *.mod" | ssh ${remote_username}@${remote_address} 2>&1 1183 1184 fi 1184 1185 … … 1192 1193 1193 1194 printf "\n\n" 1194 echo " *** copying scripts and utility programs to \"${remote_addres }:${remote_ud}/\" "1195 echo " *** copying scripts and utility programs to \"${remote_address}:${remote_ud}/\" " 1195 1196 cd ${local_source_path}/../SCRIPTS 1196 1197 1197 1198 if [[ $remote_host != lctit ]] 1198 1199 then 1199 ssh ${remote_username}@${remote_addres } "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)"1200 ssh ${remote_username}@${remote_address} "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)" 1200 1201 else 1201 1202 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS 1202 print "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)" | ssh ${remote_username}@${remote_addres } 2>&11203 print "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)" | ssh ${remote_username}@${remote_address} 2>&1 1203 1204 fi 1204 1205 1205 1206 # COPY SHELL-SCRIPTS 1206 scp batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob batch_nc2vdf nc2vdf nc2vdf.ncl nc2vdf.config ${remote_username}@${remote_addres }:${remote_ud}/../SCRIPTS > /dev/null1207 scp batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob batch_nc2vdf nc2vdf nc2vdf.ncl nc2vdf.config ${remote_username}@${remote_address}:${remote_ud}/../SCRIPTS > /dev/null 1207 1208 1208 1209 cd - > /dev/null … … 1211 1212 1212 1213 # COPY UTILITY-ROUTINES 1213 scp Makefile *.f90 ${remote_username}@${remote_addres }:${remote_ud} > /dev/null1214 scp Makefile *.f90 ${remote_username}@${remote_address}:${remote_ud} > /dev/null 1214 1215 1215 1216 … … 1245 1246 then 1246 1247 1247 ssh ${remote_username}@${remote_addres } "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR"1248 ssh ${remote_username}@${remote_address} "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 1248 1249 1249 1250 elif [[ $remote_host = ibmh ]] 1250 1251 then 1251 1252 1252 print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres }1253 print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_address} 1253 1254 1254 1255 elif [[ $remote_host = lctit ]] … … 1258 1259 while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]] 1259 1260 do 1260 print "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres } 2>&1 | tee ${remote_host}_last_make_protokoll1261 print "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll 1261 1262 done 1262 1263 … … 1264 1265 then 1265 1266 1266 ssh ${remote_username}@${remote_addres } "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll1267 ssh ${remote_username}@${remote_address} "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll 1267 1268 1268 1269 else 1269 1270 1270 print "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_addres } 2>&1 | tee ${remote_host}_last_make_protokoll1271 print "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll 1271 1272 1272 1273 fi
Note: See TracChangeset
for help on using the changeset viewer.