Ignore:
Timestamp:
Sep 24, 2014 2:06:57 PM (10 years ago)
Author:
maronga
Message:

New flag files allow to force unscheduled termination/restarts of batch jobs, progress output is made for batch runs, small adjustments for lxce6 and lccrayh/lccrayb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mbuild

    r1391 r1468  
    2222# Current revisions:
    2323# ------------------
    24 #
     24# Typo removed (addres->address)
     25# Adjustments for lcxe6
    2526#
    2627# Former revisions:
     
    170171    # DETERMINE THE LOCAL HOST
    171172 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}')
    173174
    174175
     
    359360 column1="local username:"; column2=$local_username
    360361 printf "| $column1$column2 | \n"
    361  column1="local IP-addres:"; column2=$local_addres
     362 column1="local IP-address:"; column2=$local_address
    362363 printf "| $column1$column2 | \n"
    363364 column1="config file:"; column2=$config_file
     
    484485       # DETERMINE IP-ADDRES OF THE REMOTE-HOST
    485486    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";;
    489490        (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;;
    506507        (*)              if [[ $local_host != $remote_host ]]
    507508                         then
     
    964965    column1="username:"; column2=$remote_username
    965966    printf "| $column1$column2 | \n"
    966     column1="addres:"; column2=$remote_addres
     967    column1="address:"; column2=$remote_address
    967968    printf "| $column1$column2 | \n"
    968969    column1="compiler:"; column2=$compiler_name
     
    10551056             # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST
    10561057             # 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}/\" "
    10581059          if [[ $remote_host != lctit ]]
    10591060          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})"
    10611062          else
    10621063                # 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>&1
    1064           fi
    1065 
    1066           scp  ${local_source_path}/${mainprog}_sources.tar  ${remote_username}@${remote_addres}:${remote_md}/${mainprog}_sources.tar
     1064             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
    10671068
    10681069
     
    10721073          if [[ $remote_host != lctit ]]
    10731074          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"
    10751076          else
    10761077                # 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>&1
     1078             print  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"  |  ssh  ${remote_username}@${remote_address}  2>&1
    10781079          fi
    10791080
     
    10831084          if [[ $remote_host != lctit ]]
    10841085          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"
    10861087          else
    10871088                # 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>&1
     1089             print  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"  |  ssh  ${remote_username}@${remote_address}  2>&1
    10891090          fi
    10901091
     
    11211122          then
    11221123
    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_protokoll
     1124             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
    11241125
    11251126          elif [[ $remote_host = ibmh ]]
    11261127          then
    11271128
    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_protokoll
     1129             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
    11291130
    11301131          elif [[ $remote_host = lctit ]]
     
    11341135             while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
    11351136             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_protokoll
     1137                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
    11371138             done
    11381139
     
    11401141          then
    11411142
    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_protokoll
     1143             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
    11431144
    11441145          else
    11451146
    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_protokoll
     1147             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
    11471148
    11481149          fi
     
    11771178          if [[ $remote_host != lctit ]]
    11781179          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"
    11801181          else
    11811182                # 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>&1
     1183             print  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"  |  ssh  ${remote_username}@${remote_address}  2>&1
    11831184          fi
    11841185
     
    11921193
    11931194          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}/\" "
    11951196          cd  ${local_source_path}/../SCRIPTS
    11961197
    11971198          if [[ $remote_host != lctit ]]
    11981199          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)"
    12001201          else
    12011202                # 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>&1
     1203             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
    12031204          fi
    12041205
    12051206             # 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/null
     1207          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
    12071208
    12081209          cd  -  > /dev/null
     
    12111212
    12121213             # COPY UTILITY-ROUTINES
    1213           scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
     1214          scp  Makefile  *.f90  ${remote_username}@${remote_address}:${remote_ud}  >  /dev/null
    12141215
    12151216
     
    12451246          then
    12461247
    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"
    12481249
    12491250          elif [[ $remote_host = ibmh ]]
    12501251          then
    12511252
    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}
    12531254
    12541255          elif [[ $remote_host = lctit ]]
     
    12581259             while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
    12591260             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_protokoll
     1261                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
    12611262             done
    12621263
     
    12641265          then
    12651266
    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_protokoll
     1267             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
    12671268
    12681269          else
    12691270
    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_protokoll
     1271             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
    12711272
    12721273          fi
Note: See TracChangeset for help on using the changeset viewer.