Changeset 1468 for palm


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

Location:
palm/trunk
Files:
13 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
  • palm/trunk/SCRIPTS/mrun

    r1443 r1468  
    2222# Current revisions:
    2323# ------------------
    24 #
     24# Typo removed (addres->address)
     25# Bugfix: returning files to IMUK via ssh did not work for lccrayh and lcycrayb
     26# Added support for restart runs (remote) for lcxe6
    2527#
    2628# Former revisions:
     
    257259 if [[ `hostname` = rte10 ]]
    258260 then
    259     return_addres=133.5.185.60
    260     echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
     261    return_address=133.5.185.60
     262    echo "+++ WARNING: fixed return_address = $return_address is used !!!!!"
    261263 elif [[ `hostname` = climate0 ]]
    262264 then
    263     return_addres=165.132.26.68
    264     echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
     265    return_address=165.132.26.68
     266    echo "+++ WARNING: fixed return_address = $return_address is used !!!!!"
    265267 elif [[ `hostname` = urban00 ]]
    266268 then
    267     return_addres=147.46.30.151
    268     echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"
     269    return_address=147.46.30.151
     270    echo "+++ WARNING: fixed return_address = $return_address is used !!!!!"
    269271 else
    270     return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
     272    return_address=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
    271273 fi
    272274 return_password=""
     
    409411       (q)   queue=$OPTARG; mc="$mc -q$OPTARG";;
    410412       (r)   run_mode=$OPTARG; mc="$mc -r'$OPTARG'";;
    411        (R)   remotecall=true;return_addres=$OPTARG; mc="$mc -R$OPTARG";;
     413       (R)   remotecall=true;return_address=$OPTARG; mc="$mc -R$OPTARG";;
    412414       (s)   source_list=$OPTARG; mc="$mc -s'$OPTARG'";;
    413415       (S)   read_from_config=false; mc="$mc -S";;
     
    670672
    671673    # READ AND EVALUATE THE CONFIGURATION-FILE FROM WITHIN THIS SHELLSCRIPT
    672     # (OPTION -S). THE DEFAULT IS USING THE ROUTINE interpret_config
     674    # (OPTION -S). THE DEFAULT IS USING THE ROUTINE <<<<
    673675 if [[ "$read_from_config" = false ]]
    674676 then
     
    34073409                echo "fname=$fname"                      >>  mpi_exec_shell
    34083410                echo "localhost=$localhost"              >>  mpi_exec_shell
    3409                 echo "return_addres=$return_addres"      >>  mpi_exec_shell
     3411                echo "return_address=$return_address"    >>  mpi_exec_shell
    34103412                echo "return_username=$return_username"  >>  mpi_exec_shell
    34113413                echo "tasks_per_node=$tasks_per_node"    >>  mpi_exec_shell
     
    34193421                echo "export fname"                      >>  mpi_exec_shell
    34203422                echo "export localhost"                  >>  mpi_exec_shell
    3421                 echo "export return_addres"              >>  mpi_exec_shell
     3423                echo "export return_address"             >>  mpi_exec_shell
    34223424                echo "export return_username"            >>  mpi_exec_shell
    34233425                echo "export tasks_per_node"             >>  mpi_exec_shell
     
    37943796                   printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst"
    37953797                   printf "\n              or higher cycle\n"
    3796                    echo "batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
     3798                   echo "batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
    37973799
    37983800                   echo "[[ \$? = 0 ]]  &&  rm  $file_to_transfer"  >>  transfer_${localout[$i]}
     
    38183820                   if [[ $localhost = lccrayb ]]
    38193821                   then
    3820                       ssh $usern@blogin1 "cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
     3822                      ssh $usern@blogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
    38213823                   elif [[ $localhost = lccrayh ]]
    38223824                   then
    3823                       ssh $usern@hlogin1 "cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
     3825                      ssh $usern@hlogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
     3826                   elif [[ $localhost = lcxe6 ]]
     3827                   then
     3828                      ssh $usern@hexagon ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
    38243829                   else
    3825                       batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
     3830                      batch_scp $PORTOPT $cps -b -m -u $return_username $return_address  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
    38263831                   fi
    38273832                   [[ $? != 0 ]]  &&  transfer_failed=true
     
    38743879                   printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}"
    38753880                   printf "\n              or higher cycle\n"
    3876                    echo "batch_scp $PORTOPT -A -b -m -u $return_username $return_addres  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
     3881                   echo "batch_scp $PORTOPT -A -b -m -u $return_username $return_address  $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"  >>  transfer_${localout[$i]}
    38773882
    38783883                   echo "[[ \$? = 0 ]]  &&  rm  $file_to_transfer"  >>  transfer_${localout[$i]}
     
    38983903                   if [[ $localhost = lccrayb ]]
    38993904                   then
    3900                       ssh $usern@blogin1 "cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
     3905                      ssh $usern@blogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
    39013906                   elif [[ $localhost = lccrayh ]]
    39023907                   then
    3903                       ssh $usern@hlogin1 "cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
     3908                      ssh $usern@hlogin1 ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
     3909                   elif [[ $localhost = lcxe6 ]]
     3910                   then
     3911                      ssh $usern@hexagon ". \\$HOME/.profile; cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
    39043912                   else
    3905                       batch_scp $PORTOPT -A -b -m -u $return_username  $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
     3913                      batch_scp $PORTOPT -A -b -m -u $return_username  $return_address ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
    39063914                   fi
    39073915                   [[ $? != 0 ]]  &&  transfer_failed=true
     
    43724380
    43734381             # START THE RESTART-JOB
    4374           printf "\n\n  *** initiating restart-run on \"$return_addres\" using command:\n"
     4382          printf "\n\n  *** initiating restart-run on \"$return_address\" using command:\n"
    43754383          echo "      $mc"
    43764384          printf "\n$dashes\n"
     
    43784386          then
    43794387
    4380              if [[ $localhost = lccrayb  || $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
     4388             if [[ $localhost = lccrayb  || $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* || $localhost = lcxe6 ]]
    43814389             then
    43824390                echo "*** ssh will be used to initiate restart-runs!"
    4383                 echo "    return_addres=\"$return_addres\" "
     4391                echo "    return_address=\"$return_address\" "
    43844392                echo "    return_username=\"$return_username\" "
    4385                 if [[ $(echo $return_addres | grep -c "130.75.105") = 1 ]]
     4393                if [[ $(echo $return_address | grep -c "130.75.105") = 1 ]]
    43864394                then
    43874395                   if [[ $localhost = ibmh ]]
    43884396                   then
    4389                       ssh $SSH_PORTOPT $usern@136.172.40.15 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
     4397                      ssh $SSH_PORTOPT $usern@136.172.40.15 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    43904398                   elif [[ $localhost = lccrayb ]]
    43914399                   then
    4392                       ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
     4400                      ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH; export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    43934401                   elif [[ $localhost = lccrayh ]]
    43944402                   then
    4395                       ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    4396 
     4403                      ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH; export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
     4404                   elif [[ $localhost = lcxe6 ]]
     4405                   then
     4406                      ssh $usern@hexagon "ssh $SSH_PORTOPT $return_address -l $return_username \". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\\\$PATH:$LOCAL_MRUN_PATH; export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    43974407                   else
    4398                       ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;. /muksoft_i/packages/intel/composer_xe_2013_sp1.2.144/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
     4408                      ssh $SSH_PORTOPT $return_address -l $return_username ". \\\$HOME/.profile; module load intel-compiler hdf5 netcdf; PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
    43994409                   fi
    44004410                else
    44014411                   if [[ $localhost = ibmkisti ]]
    44024412                   then
    4403                       ssh $SSH_PORTOPT $usern@gaiad "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
     4413                      ssh $SSH_PORTOPT $usern@gaiad "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    44044414                   elif [[ $localhost = lcflow ]]
    44054415                   then
    4406                       /usr/bin/ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
     4416                      /usr/bin/ssh $SSH_PORTOPT $return_address -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
    44074417                   elif [[ $localhost = lccrayb ]]
    44084418                   then
    4409                       ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
     4419                      ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    44104420                   elif [[ $localhost = lccrayh ]]
    44114421                   then
    4412                       ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
     4422                      ssh $usern@hlogin1 "ssh $SSH_PORTOPT $return_address -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
    44134423                   else
    4414                       ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
     4424                      ssh $SSH_PORTOPT $return_address -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
    44154425                   fi
    44164426                fi
     
    45094519
    45104520       # BUILD THE MRUN-COMMAND TO BE CALLED IN THE BATCH-JOB ON THE REMOTE-MACHINE
    4511     mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_addres -U $return_username -u $remote_username"
     4521    mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_address -U $return_username -u $remote_username"
    45124522    [[ "$cpp_opts" != "" ]]       &&  mrun_com=${mrun_com}" -D \"$cpp_opts\""
    45134523    [[ "$global_revision" != "" ]]  &&  mrun_com=${mrun_com}" -G \"$global_revision\""
     
    46484658                # ON KISTI'S IBM FIREWALL IS ONLY OPENED ON INTERACTIVE NODE
    46494659             echo  "localdir=\`pwd\`"                            >>  $jobfile
    4650              echo  "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
     4660             echo  "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
    46514661          elif [[ $host = lccrayb ]]
    46524662          then
    46534663             echo  "localdir=\`pwd\`"                            >>  $jobfile
    4654              echo  "ssh $SSH_PORTOPT $remote_username@blogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
     4664             echo  "ssh $SSH_PORTOPT $remote_username@blogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
    46554665          elif [[ $host = lccrayh ]]
    46564666          then
    46574667             echo  "localdir=\`pwd\`"                            >>  $jobfile
    4658              echo  "ssh $SSH_PORTOPT $remote_username@hlogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
     4668             echo  "ssh $SSH_PORTOPT $remote_username@hlogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
    46594669
    46604670          else
    4661              echo  "scp $PORTOPT -r $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname ."  >>  $jobfile
     4671             echo  "scp $PORTOPT -r $return_username@$return_address:$working_directory/SOURCES_FOR_RUN_$fname ."  >>  $jobfile
    46624672          fi
    46634673       fi
     
    47574767             echo  "%END%"                                    >>  $jobfile
    47584768          else
    4759              echo  "batch_scp $PORTOPT -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >>  $jobfile
     4769             echo  "batch_scp $PORTOPT -b -o -g -s -u $return_username $return_address ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >>  $jobfile
    47604770          fi
    47614771
  • palm/trunk/SCRIPTS/subjob

    r1453 r1468  
    2323# Current revisions:
    2424# ------------------
    25 #
     25# Typo removed (addres->address)
     26# Adjustments for lcxe6
    2627#
    2728# Former revisions:
     
    170171    # COMMENT OUT, BECAUSE THE HOSTNAME (node*) IS SAME FOR BOTH MACHINES
    171172 case  $local_host  in
    172      (ambiel-lx)             local_addres=134.106.74.48;  local_host=lcfor;;
    173      (atmos)                 local_addres=172.20.25.35;   local_host=lcide;;
    174      (austru)                local_addres=130.75.105.128; local_host=lcmuk;;
    175      (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
    176      (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
    177      (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
    178      (blizzard1|p*)          local_addres=136.172.40.15;  local_host=ibmh;;
    179      (blizzard2|p*)          local_addres=136.172.40.16;  local_host=ibmh;;
    180      (blogin*|bxc*)          local_addres=130.73.233.1;   local_host=lccrayb;;
    181      (hlogin*|hxc*)          local_addres=130.75.4.1;     local_host=lccrayh;;
    182      (breva)                 local_addres=130.75.105.98;  local_host=lcmuk;;
    183      (buran)                 local_addres=130.75.105.58;  local_host=lcmuk;;
    184      (caurus)                local_addres=130.75.105.19;  local_host=lcmuk;;
    185      (climate*)              local_addres=165.132.26.68;  local_host=lcyon;;
    186      (clogin*)               local_addres=86.50.166.21;   local_host=lccrayf;;
    187      (cs*)                   local_addres=136.172.44.131; local_host=nech;;
    188      (elephanta)             local_addres=130.75.105.6;   local_host=lcmuk;;
    189      (flow01)                local_addres=10.141.255.71;  local_host=lcflow;;
    190      (flow02)                local_addres=10.141.255.72;  local_host=lcflow;;
    191      (node*)                 local_addres=165.132.26.61   local_host=lck;;
    192    #  (node*)                 local_addres=210.219.61.8    local_host=lckordi;;
    193      (gaia*)                 local_addres=150.183.146.24; local_host=ibmkisti;;
    194      (gallego)               local_addres=130.75.105.10;  local_host=lcmuk;;
    195      (gregale)               local_addres=130.75.105.109; local_host=lcmuk;;
    196      (hababai)               local_addres=130.75.105.108; local_host=lcmuk;;
    197      (hayaka*)               local_addres=133.5.4.33;     local_host=lckyuh;;
    198      (hexagon.bccs.uib.no)   local_addres=129.177.20.113; local_host=lcxe6;;
    199      (hx*)                   local_addres=133.3.51.11;    local_host=lckyoto;;
    200      (inferno)               local_addres=130.75.105.5;   local_host=lcmuk;;
    201      (irifi)                 local_addres=130.75.105.104; local_host=lcmuk;;
    202      (jaboticaba)            local_addres=150.163.25.181; local_host=lcbr;;
    203      (sno)                   local_addres=130.75.105.113; local_host=lcmuk;;
    204      (levanto)               local_addres=130.75.105.45;  local_host=lcmuk;;
    205      (login*)                local_addres=118.128.66.223; local_host=lckiaps;;
    206      (maestro)               local_addres=130.75.105.2;   local_host=lcmuk;;
    207      (meller)                local_addres=134.106.74.155; local_host=lcfor;;
    208      (meteo-login*)          local_addres=193.166.211.144;local_host=lcxt5m;;
    209      (hexagon*)              local_addres=129.177.20.113; local_host=lcxe6;;
    210      (nobel*)                local_addres=150.183.5.101;  local_host=ibms;;
    211      (orkan)                 local_addres=130.75.105.3;   local_host=lcmuk;;
    212      (ostria)                local_addres=130.75.105.106; local_host=lcmuk;;
    213      (paesano)               local_addres=130.75.105.46;  local_host=lcmuk;;
    214      (pcj*)                  local_addres=172.31.120.1;   local_host=lckyut;;
    215      (pingui)                local_addres=134.106.74.118; local_host=lcfor;;
    216      (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
    217      (rte*)                  local_addres=133.5.185.60;   local_host=lcrte;;
    218      (shiokaze-lx)           local_addres=134.106.74.123; local_host=lcfor;;
    219      (sisu-login*)           local_addres=86.50.166.21;   local_host=lccrayf;;
    220      (solano)                local_addres=130.75.105.110; local_host=lcmuk;;
    221      (sugoka*)               local_addres=172.31.120.1;   local_host=lckyut;;
    222      (t2a*)                  local_addres=10.1.6.165;     local_host=lctit;;
    223      (urban*)                local_addres=147.46.30.151   local_host=lcsb;;
    224      (vinessa)               local_addres=130.75.105.112; local_host=lcmuk;;
    225      (vorias)                local_addres=172.20.25.43;   local_host=lcmuk;;
    226      (*.cc.kyushu-u.ac.jp)   local_addres=133.5.4.129;    local_host=ibmku;;
     173     (ambiel-lx)             local_address=134.106.74.48;  local_host=lcfor;;
     174     (atmos)                 local_address=172.20.25.35;   local_host=lcide;;
     175     (austru)                local_address=130.75.105.128; local_host=lcmuk;;
     176     (autan)                 local_address=130.75.105.57;  local_host=lcmuk;;
     177     (bora)                  local_address=130.75.105.103; local_host=lcmuk;;
     178     (b04*)                  local_address=133.5.4.33;     local_host=lckyuh;;
     179     (blizzard1|p*)          local_address=136.172.40.15;  local_host=ibmh;;
     180     (blizzard2|p*)          local_address=136.172.40.16;  local_host=ibmh;;
     181     (blogin*|bxc*)          local_address=130.73.233.1;   local_host=lccrayb;;
     182     (hlogin*|hxc*)          local_address=130.75.4.1;     local_host=lccrayh;;
     183     (breva)                 local_address=130.75.105.98;  local_host=lcmuk;;
     184     (buran)                 local_address=130.75.105.58;  local_host=lcmuk;;
     185     (caurus)                local_address=130.75.105.19;  local_host=lcmuk;;
     186     (climate*)              local_address=165.132.26.68;  local_host=lcyon;;
     187     (clogin*)               local_address=86.50.166.21;   local_host=lccrayf;;
     188     (cs*)                   local_address=136.172.44.131; local_host=nech;;
     189     (elephanta)             local_address=130.75.105.6;   local_host=lcmuk;;
     190     (flow01)                local_address=10.141.255.71;  local_host=lcflow;;
     191     (flow02)                local_address=10.141.255.72;  local_host=lcflow;;
     192     (node*)                 local_address=165.132.26.61   local_host=lck;;
     193   #  (node*)                 local_address=210.219.61.8    local_host=lckordi;;
     194     (gaia*)                 local_address=150.183.146.24; local_host=ibmkisti;;
     195     (gallego)               local_address=130.75.105.10;  local_host=lcmuk;;
     196     (gregale)               local_address=130.75.105.109; local_host=lcmuk;;
     197     (hababai)               local_address=130.75.105.108; local_host=lcmuk;;
     198     (hayaka*)               local_address=133.5.4.33;     local_host=lckyuh;;
     199     (hexagon.bccs.uib.no)   local_address=129.177.20.113; local_host=lcxe6;;
     200     (hx*)                   local_address=133.3.51.11;    local_host=lckyoto;;
     201     (inferno)               local_address=130.75.105.5;   local_host=lcmuk;;
     202     (irifi)                 local_address=130.75.105.104; local_host=lcmuk;;
     203     (jaboticaba)            local_address=150.163.25.181; local_host=lcbr;;
     204     (sno)                   local_address=130.75.105.113; local_host=lcmuk;;
     205     (levanto)               local_address=130.75.105.45;  local_host=lcmuk;;
     206     (login*)                local_address=118.128.66.223; local_host=lckiaps;;
     207     (maestro)               local_address=130.75.105.2;   local_host=lcmuk;;
     208     (meller)                local_address=134.106.74.155; local_host=lcfor;;
     209     (meteo-login*)          local_address=193.166.211.144;local_host=lcxt5m;;
     210     (hexagon*)              local_address=129.177.20.113; local_host=lcxe6;;
     211     (nobel*)                local_address=150.183.5.101;  local_host=ibms;;
     212     (orkan)                 local_address=130.75.105.3;   local_host=lcmuk;;
     213     (ostria)                local_address=130.75.105.106; local_host=lcmuk;;
     214     (paesano)               local_address=130.75.105.46;  local_host=lcmuk;;
     215     (pcj*)                  local_address=172.31.120.1;   local_host=lckyut;;
     216     (pingui)                local_address=134.106.74.118; local_host=lcfor;;
     217     (quanero)               local_address=130.75.105.107; local_host=lcmuk;;
     218     (rte*)                  local_address=133.5.185.60;   local_host=lcrte;;
     219     (shiokaze-lx)           local_address=134.106.74.123; local_host=lcfor;;
     220     (sisu-login*)           local_address=86.50.166.21;   local_host=lccrayf;;
     221     (solano)                local_address=130.75.105.110; local_host=lcmuk;;
     222     (sugoka*)               local_address=172.31.120.1;   local_host=lckyut;;
     223     (t2a*)                  local_address=10.1.6.165;     local_host=lctit;;
     224     (urban*)                local_address=147.46.30.151   local_host=lcsb;;
     225     (vinessa)               local_address=130.75.105.112; local_host=lcmuk;;
     226     (vorias)                local_address=172.20.25.43;   local_host=lcmuk;;
     227     (*.cc.kyushu-u.ac.jp)   local_address=133.5.4.129;    local_host=ibmku;;
    227228     (*)                     printf "\n  +++ \"$local_host\" unknown";
    228229                             printf "\n      please contact the PALM group at IMUK";
     
    346347 else
    347348    case  $remote_host  in
    348         (ibm)     queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    349         (ibmh)    queue=cluster; remote_addres=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    350         (ibmkisti) queue=class.32plus; remote_addres=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    351         (ibmku)   queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
    352         (ibms)    queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    353         (lccrayb) queue=mpp1testq; remote_addres=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;;
    354         (lccrayh) queue=mpp1testq; remote_addres=130.75.4.1; submcom=/opt/moab/7.2.6/bin/msub;;
    355         (lccrayf) queue=small; remote_addres=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
    356         (lcflow)  remote_addres=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;;
    357         (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;;
    358         (lck)     remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;;
    359         (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
    360         (lckordi) remote_addres=210.219.61.8; submcom=/usr/torque/bin/qsub;;
    361         (lckyuh)  remote_addres=133.5.4.33; submcom=/usr/bin/pjsub;;
    362         (lckyut)  remote_addres=133.5.4.37; submcom=/usr/bin/pjsub;;
    363         (lcsb)    remote_addres=147.46.30.151; submcom=/usr/torque/bin/qsub;;
    364         (lctit)   queue=S; remote_addres=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;;
    365         (lcxe6)   remote_addres=129.177.20.113; submcom=/opt/torque/default/bin/qsub;;
    366         (lcxt5m)  remote_addres=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;;
    367         (lcyon)   remote_addres=165.132.26.68; submcom=/usr/torque/bin/qsub;;
    368         (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";;
     349        (ibm)     queue=p690_standard; remote_address=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
     350        (ibmh)    queue=cluster; remote_address=136.172.40.15; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
     351        (ibmkisti) queue=class.32plus; remote_address=150.183.146.24; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
     352        (ibmku)   queue=s4; remote_address=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
     353        (ibms)    queue=p_normal; remote_address=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
     354        (lccrayb) queue=mpp1testq; remote_address=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;;
     355        (lccrayh) queue=mpp1testq; remote_address=130.75.4.1; submcom=/opt/moab/7.2.6/bin/msub;;
     356        (lccrayf) queue=small; remote_address=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
     357        (lcflow)  remote_address=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;;
     358        (lckyoto) remote_address=133.3.51.11; submcom=/thin/local/bin/qsub;;
     359        (lck)     remote_address=165.132.26.61; submcom=/usr/torque/bin/qsub;;
     360        (lckiaps) remote_address=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
     361        (lckordi) remote_address=210.219.61.8; submcom=/usr/torque/bin/qsub;;
     362        (lckyuh)  remote_address=133.5.4.33; submcom=/usr/bin/pjsub;;
     363        (lckyut)  remote_address=133.5.4.37; submcom=/usr/bin/pjsub;;
     364        (lcsb)    remote_address=147.46.30.151; submcom=/usr/torque/bin/qsub;;
     365        (lctit)   queue=S; remote_address=10.1.6.165; submcom=/opt/pbs/tools/bin/t2sub;;
     366        (lcxe6)   remote_address=129.177.20.113; submcom=/opt/torque/default/bin/qsub;;
     367        (lcxt5m)  remote_address=193.166.211.144; submcom=/opt/pbs/10.1.0.91350/bin/qsub;;
     368        (lcyon)   remote_address=165.132.26.68; submcom=/usr/torque/bin/qsub;;
     369        (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_address=136.172.44.147; submcom="/usr/local/bin/qsub";;
    369370        (*)       printf "\n  +++ hostname \"$remote_host\" not allowed";
    370371                  locat=parameter; exit;;
     
    11801181    echo "trap '"                               >>  $job_to_send
    11811182    echo "set +vx"                              >>  $job_to_send
    1182     if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
     1183    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* || $remote_host = lcxe6 ]]
    11831184    then
    11841185       if [[ $remote_host = ibmh ]]
     
    11971198       then
    11981199          return_queue=dataq
     1200       elif [[ $remote_host = lcxe6 ]]
     1201       then
     1202          return_queue=debug
    11991203       elif [[ $remote_host = lckiaps ]]
    12001204       then
     
    12371241
    12381242          echo "echo \"set -x\" >> scpjob.$identifier"                   >>  $job_to_send
    1239           echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$identifier"  >>  $job_to_send
     1243          echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_address  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$identifier"  >>  $job_to_send
    12401244          if [[ $remote_host = ibmku ]]
    12411245          then
     
    12541258          echo "set -x"                            >>  $job_to_send
    12551259          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
    1256           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1260          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    12571261          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    12581262          echo "%%END%%"                           >>  $job_to_send
     
    12711275          echo "export LANG=en_US.UTF-8"           >>  $job_to_send
    12721276          echo "set -x"                            >>  $job_to_send
    1273           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1277          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    12741278          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    12751279          echo "%%END%%"                           >>  $job_to_send
     
    12881292          echo "export LANG=en_US.UTF-8"           >>  $job_to_send
    12891293          echo "set -x"                            >>  $job_to_send
    1290           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1294          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    12911295          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    12921296          echo "%%END%%"                           >>  $job_to_send
     
    13031307          echo " "                                       >>  $job_to_send
    13041308          echo "set -x"                                  >>  $job_to_send
    1305           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1309          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    13061310          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    13071311          echo "%%END%%"                                 >>  $job_to_send
     
    13241328          echo "export PATH=\$PATH:\$PALM_BIN"                           >>  $job_to_send
    13251329          echo ""                                 >>  $job_to_send         
    1326           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1330          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    13271331          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    13281332          echo "rm -f scpjob.${identifier}"                                 >>  $job_to_send         
     
    13301334          echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${identifier}.tmp > scpjob.${identifier}" >>  $job_to_send         
    13311335          echo "rm -f scpjob.${identifier}.tmp"                             >>  $job_to_send         
    1332 
     1336       elif [[ $remote_host = lcxe6 ]]
     1337       then
     1338          echo "cat > scpjob.${identifier}  << %%END%%"  >>  $job_to_send
     1339          echo "#!/bin/ksh"                              >>  $job_to_send
     1340          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
     1341          echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
     1342          echo "#PBS -A $project_account"                >>  $job_to_send
     1343          echo "#PBS -l mppwidth=1"                      >>  $job_to_send
     1344          echo "#PBS -l mppnppn=1"                       >>  $job_to_send
     1345          echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
     1346          echo "#PBS -j oe"                              >>  $job_to_send
     1347          echo " "                                       >>  $job_to_send
     1348          echo "set -x"                                  >>  $job_to_send
     1349          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1350          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
     1351          echo "%%END%%"                                 >>  $job_to_send
    13331352       else
    13341353
     
    13511370          fi
    13521371          echo "set -x"                            >>  $job_to_send
    1353           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null"  >>  $job_to_send
     1372          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null"  >>  $job_to_send
    13541373          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    13551374          echo "%%END%%"                           >>  $job_to_send
     
    13711390       then
    13721391          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
    1373           echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$identifier\" "  >>  $job_to_send
     1392          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_address}  \"$submcom ${job_catalog}/scpjob.$identifier\" "  >>  $job_to_send
    13741393          echo "rm  ${job_catalog}/scpjob.$identifier"          >>  $job_to_send
    13751394       elif [[ $remote_host = lckyu* ]]
    13761395       then
    1377           echo "scp $PORTOPT scpjob.$identifier  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
    1378           echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$identifier; rm scpjob.$identifier\" "  >>  $job_to_send
     1396          echo "scp $PORTOPT scpjob.$identifier  ${remote_username}@${remote_address}:job_queue"           >>  $job_to_send
     1397          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_address}  \"cd job_queue; $submcom scpjob.$identifier; rm scpjob.$identifier\" "  >>  $job_to_send
    13791398       elif [[ $remote_host = lcflow ]]
    13801399       then
    13811400          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
    1382           echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$identifier\" "  >>  $job_to_send
     1401          echo "/usr/bin/ssh ${remote_username}@${remote_address}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$identifier\" "  >>  $job_to_send
    13831402       else
    13841403          echo "$submcom  scpjob.$identifier"      >>  $job_to_send
     
    13931412       fi
    13941413    else
    1395 #       echo "ftpcopy  -d  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1414#       echo "ftpcopy  -d  $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    13961415       # ??? funktioniert das ÃŒberhaupt noch ???
    1397        echo "nohup  ftpcopy  -d  -w 15  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
     1416       echo "nohup  ftpcopy  -d  -w 15  $local_address  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
    13981417    fi
    13991418    echo "set -x"                               >>  $job_to_send
     
    14411460          scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
    14421461       else
    1443           scp  $PORTOPT  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
     1462          scp  $PORTOPT  $job_to_send  ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost
    14441463       fi
    14451464       if [[ $? = 1 ]]
     
    14661485       if [[ $remote_host = ibmku ]]
    14671486       then
    1468           ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
     1487          ssh  $SSH_PORTOPT $remote_address  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
    14691488       elif [[ $remote_host = lcflow ]]
    14701489       then
    1471           /usr/bin/ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost"
     1490          /usr/bin/ssh  $SSH_PORTOPT $remote_address  -l $remote_user  "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost"
    14721491       else
    1473           ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
     1492          ssh  $SSH_PORTOPT $remote_address  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
    14741493       fi
    14751494
  • palm/trunk/SOURCE/check_for_restart.f90

    r1354 r1468  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Added support for unscheduled job termination using the flag files
     23! DO_STOP_NOW and DO_RESTART_NOW
    2324!
    2425! Former revisions:
     
    6566
    6667
    67     LOGICAL :: terminate_run_l  !:
     68    LOGICAL :: terminate_run_l           !:
     69    LOGICAL :: do_stop_now = .FALSE.     !:
     70    LOGICAL :: do_restart_now = .FALSE.  !:
    6871
    6972    REAL(wp) ::  remaining_time !:
     
    113116
    114117       terminate_coupled = 3
     118
    115119#if defined( __parallel )
    116120       IF ( myid == 0 ) THEN
     
    126130    ENDIF
    127131
    128 !
    129 !-- Set the stop flag also, if restart is forced by user
    130     IF ( time_restart /= 9999999.9_wp  .AND.                                      &
     132
     133!
     134!-- Check if a flag file exists that forces a termination of the model
     135    terminate_run_l = .FALSE.
     136    IF ( myid == 0 )  THEN
     137       INQUIRE(FILE="DO_STOP_NOW", EXIST=do_stop_now)
     138       INQUIRE(FILE="DO_RESTART_NOW", EXIST=do_restart_now)
     139
     140       IF ( do_stop_now .OR. do_restart_now )  THEN
     141
     142          terminate_run_l = .TRUE.
     143
     144          WRITE( message_string, * ) 'run will be terminated because user ',   &
     145                                  'forced a job finialization using a flag',   &
     146                                  'file:',                                     &
     147                                  '&DO_STOP_NOW: ', do_stop_now,               &
     148                                  '&DO_RESTART_NOW: ', do_restart_now
     149          CALL message( 'check_for_restart', 'PA0398', 0, 0, 0, 6, 0 )
     150
     151       ENDIF
     152    ENDIF
     153
     154
     155#if defined( __parallel )
     156!
     157!-- Make a logical OR for all processes. Stop the model run if at least
     158!-- one processor has reached the time limit.
     159    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
     160    CALL MPI_ALLREDUCE( terminate_run_l, terminate_run, 1, MPI_LOGICAL,        &
     161                        MPI_LOR, comm2d, ierr )
     162#else
     163    terminate_run = terminate_run_l
     164#endif
     165
     166!
     167!-- In case of coupled runs inform the remote model of the termination
     168!-- and its reason, provided the remote model has not already been
     169!-- informed of another termination reason (terminate_coupled > 0) before,
     170!-- or vice versa (terminate_coupled_remote > 0).
     171    IF ( terminate_run .AND. coupling_mode /= 'uncoupled' .AND.                &
     172         terminate_coupled == 0 .AND.  terminate_coupled_remote == 0 )  THEN
     173
     174       terminate_coupled = 6
     175
     176#if defined( __parallel )
     177       IF ( myid == 0 ) THEN
     178          CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,      &
     179                             target_id,  0,                                 &
     180                             terminate_coupled_remote, 1, MPI_INTEGER,      &
     181                             target_id,  0,                                 &
     182                             comm_inter, status, ierr )   
     183       ENDIF
     184       CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0,         &
     185                       comm2d, ierr ) 
     186#endif
     187
     188    ENDIF
     189
     190!
     191!-- Set the stop flag also, if restart is forced by user settings
     192    IF ( time_restart /= 9999999.9_wp  .AND.                                   &
    131193         time_restart < time_since_reference_point )  THEN
    132194
     
    183245!
    184246!-- If the run is stopped, set a flag file which is necessary to initiate
    185 !-- the start of a continuation run
    186     IF ( terminate_run  .AND.  myid == 0 )  THEN
     247!-- the start of a continuation run, except if the user forced to stop the
     248!-- run without restart
     249    IF ( terminate_run  .AND.  myid == 0 .AND. .NOT. do_stop_now)  THEN
    187250
    188251       OPEN ( 90, FILE='CONTINUE_RUN', FORM='FORMATTED' )
  • palm/trunk/SOURCE/check_open.f90

    r1360 r1468  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Adapted for use on up to 6-digit processor cores
     23! Added file unit 117 (PROGRESS)
    2324!
    2425! Former revisions:
     
    187188    IF ( openfile(file_id)%opened_before )  THEN
    188189       SELECT CASE ( file_id )
    189           CASE ( 13, 14, 21, 22, 23, 80:85 )
     190          CASE ( 13, 14, 21, 22, 23, 80:85, 117 )
    190191             IF ( file_id == 14 .AND. openfile(file_id)%opened_before )  THEN
    191192                message_string = 're-open of unit ' //                         &
     
    209210    SELECT CASE ( file_id )
    210211
    211        CASE ( 15, 16, 17, 18, 19, 50:59, 81:84, 104:105, 107, 109 )
     212       CASE ( 15, 16, 17, 18, 19, 50:59, 81:84, 104:105, 107, 109, 117 )
    212213             
    213214          IF ( myid /= 0 )  THEN
     
    280281          ELSE
    281282!
    282 !--          First opening of unit 13 openes file _0000 on all PEs because only
    283 !--          this file contains the global variables
     283!--          First opening of unit 13 openes file _000000 on all PEs because
     284!--          only this file contains the global variables
    284285             IF ( .NOT. openfile(file_id)%opened_before )  THEN
    285                 OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/_0000',      &
     286                OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/_000000',      &
    286287                           FORM='UNFORMATTED', STATUS='OLD' )
    287288             ELSE
     
    336337          ENDIF
    337338          IF ( myid_char == '' )  THEN
    338              OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/_0000',      &
     339             OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/_000000',      &
    339340                        FORM='UNFORMATTED', POSITION='APPEND' )
    340341          ELSE
     
    10531054
    10541055          ENDIF
     1056
     1057
     1058!
     1059!--    Progress file that is used by the PALM watchdog
     1060       CASE ( 117 )
     1061
     1062          OPEN ( 117, FILE='PROGRESS'//coupling_char, STATUS='REPLACE', FORM='FORMATTED' )
     1063
    10551064
    10561065       CASE ( 201:200+2*max_masks )
  • palm/trunk/SOURCE/header.f90

    r1430 r1468  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Adapted for use on up to 6-digit processor cores
    2323!
    2424! Former revisions:
     
    16941694
    16951695 99 FORMAT (1X,78('-'))
    1696 100 FORMAT (/1X,'******************************',6X,42('-')/        &
    1697             1X,'* ',A,' *',6X,A/                               &
    1698             1X,'******************************',6X,42('-'))
    1699 101 FORMAT (37X,'coupled run using MPI-',I1,': ',A/ &
    1700             37X,42('-'))
    1701 102 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A20/      &
    1702             ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
     1696100 FORMAT (/1X,'******************************',4X,44('-')/        &
     1697            1X,'* ',A,' *',4X,A/                               &
     1698            1X,'******************************',4X,44('-'))
     1699101 FORMAT (35X,'coupled run using MPI-',I1,': ',A/ &
     1700            35X,42('-'))
     1701102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A20/      &
     1702            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
    17031703            ' Run on host:        ',A10)
    17041704#if defined( __parallel )
    1705 103 FORMAT (' Number of PEs:',10X,I6,6X,'Processor grid (x,y): (',I3,',',I3, &
     1705103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
    17061706              ')',1X,A)
    1707 104 FORMAT (' Number of PEs:',8X,I5,9X,'Tasks:',I4,'   threads per task:',I4/ &
    1708               37X,'Processor grid (x,y): (',I3,',',I3,')',1X,A)
    1709 105 FORMAT (37X,'One additional PE is used to handle'/37X,'the dvrp output!')
    1710 106 FORMAT (37X,'A 1d-decomposition along x is forced'/ &
    1711             37X,'because the job is running on an SMP-cluster')
    1712 107 FORMAT (37X,'A 1d-decomposition along ',A,' is used')
    1713 108 FORMAT (37X,'Max. # of parallel I/O streams is ',I5)
    1714 109 FORMAT (37X,'Precursor run for coupled atmos-ocean run'/ &
    1715             37X,42('-'))
    1716 114 FORMAT (37X,'Coupled atmosphere-ocean run following'/ &
    1717             37X,'independent precursor runs'/             &
    1718             37X,42('-'))
     1707104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
     1708              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
     1709105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
     1710106 FORMAT (35X,'A 1d-decomposition along x is forced'/ &
     1711            35X,'because the job is running on an SMP-cluster')
     1712107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
     1713108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
     1714109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
     1715            35X,42('-'))
     1716114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
     1717            35X,'independent precursor runs'/             &
     1718            35X,42('-'))
    17191719117 FORMAT (' Accelerator boards / node:  ',I2)
    17201720#endif
  • palm/trunk/SOURCE/init_pegrid.f90

    r1436 r1468  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Adapted for use on up to 6-digit processor cores
    2323!
    2424! Former revisions:
     
    242242                          comm2d, ierr )
    243243    CALL MPI_COMM_RANK( comm2d, myid, ierr )
    244     WRITE (myid_char,'(''_'',I4.4)')  myid
     244    WRITE (myid_char,'(''_'',I6.6)')  myid
    245245
    246246    CALL MPI_CART_COORDS( comm2d, myid, ndim, pcoord, ierr )
  • palm/trunk/SOURCE/modules.f90

    r1451 r1468  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Adapted for use on up to 6-digit processor cores.
     23! Increased identifier string length for user-defined quantities to 20.
    2324!
    2425! Former revisions:
     
    548549    CHARACTER (LEN=1000) ::  message_string = ' '
    549550
    550     CHARACTER (LEN=11), DIMENSION(100) ::  data_output = ' ',    &
     551    CHARACTER (LEN=20), DIMENSION(100) ::  data_output = ' ',    &
    551552                                           data_output_user = ' ', doav = ' '
    552     CHARACTER (LEN=10), DIMENSION(max_masks,100) ::  &
     553    CHARACTER (LEN=20), DIMENSION(max_masks,100) ::  &
    553554         data_output_masks = ' ', data_output_masks_user = ' '
    554555
    555     CHARACTER (LEN=10), DIMENSION(300) ::  data_output_pr = ' '
    556     CHARACTER (LEN=10), DIMENSION(200) ::  data_output_pr_user = ' '
     556    CHARACTER (LEN=20), DIMENSION(300) ::  data_output_pr = ' '
     557    CHARACTER (LEN=20), DIMENSION(200) ::  data_output_pr_user = ' '
    557558    CHARACTER (LEN=20), DIMENSION(11)  ::  netcdf_precision = ' '
    558559
     
    12411242#endif
    12421243    CHARACTER(LEN=2) ::  send_receive = 'al'
    1243     CHARACTER(LEN=5) ::  myid_char = ''
     1244    CHARACTER(LEN=7) ::  myid_char = ''
    12441245    INTEGER(iwp)          ::  acc_rank, comm1dx, comm1dy, comm2d, comm_inter,       &
    12451246                              comm_palm, id_inflow = 0, id_recycling = 0, ierr,     &
  • palm/trunk/SOURCE/palm.f90

    r1403 r1468  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Adapted for use on up to 6-digit processor cores
    2323!
    2424! Former revisions:
     
    169169!
    170170!-- Test output (to be removed later)
    171     WRITE (*,'(A,I4,A,I3,A,I3,A,I3)') '*** Connect MPI-Task ', myid,' to CPU ',&
     171    WRITE (*,'(A,I6,A,I3,A,I3,A,I3)') '*** Connect MPI-Task ', myid,' to CPU ',&
    172172                                      acc_rank, ' Devices: ', num_acc_per_node,&
    173173                                      ' connected to:',                        &
     
    191191!
    192192!-- Open a file for debug output
    193     WRITE (myid_char,'(''_'',I4.4)')  myid
     193    WRITE (myid_char,'(''_'',I6.6)')  myid
    194194    OPEN( 9, FILE='DEBUG'//TRIM( coupling_char )//myid_char, FORM='FORMATTED' )
    195195
  • palm/trunk/SOURCE/progress_bar.f90

    r1402 r1468  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Added support for progress file PROGRESS which is used in case of batch jobs
    2323!
    2424! Former revisions:
     
    2828! Description:
    2929! ------------
    30 ! CPU-time measurements for any program part whatever. Results of the
     30! This routine prints either a progress bar on the standard output in case of
     31! interactive runs, or it prints the progress in a separate file called
     32! PROGRESS.
    3133!------------------------------------------------------------------------------!
    3234
    3335    USE control_parameters,                                                    &
    34         ONLY : end_time, simulated_time, simulated_time_at_begin, time_restart
     36        ONLY : end_time, run_identifier, simulated_time,                       &
     37               simulated_time_at_begin, time_restart
    3538
    36     USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                     &
     39    USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                        &
    3740        ONLY :  OUTPUT_UNIT
    3841
     
    6063
    6164    SUBROUTINE init_progress_bar
     65!------------------------------------------------------------------------------!
     66! Description:
     67! ------------
     68! Initialize the progress bar/file
     69!------------------------------------------------------------------------------!
    6270
    6371       IMPLICIT NONE
     
    7482       ENDIF
    7583
    76        bar = '____________________________________________________________'
    77        crosses = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
     84       IF ( batch_job )  THEN
     85
     86          CALL check_open ( 117 )
     87          WRITE ( 117, FMT='(A20,/)' ) run_identifier
     88
     89       ELSE
     90          bar = '____________________________________________________________'
     91          crosses = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    7892!
    79 !--    Line feed on stdout to seperate the progress bar from previous messages
    80        WRITE ( OUTPUT_UNIT, '(1X)' )
     93!--       Line feed on stdout to seperate the progress bar from previous messages
     94          WRITE ( OUTPUT_UNIT, '(1X)' )
    8195#if defined( __intel_compiler )
    8296!
    83 !--    The Intel compiler does not allow to immediately flush the output buffer
    84 !--    in case that option ADVANCE='NO' is used in the write statement.
    85 !--    A workaround is to set a special carriage control feature and use "+" as
    86 !--    first output character, but this non-standard and only available with the
    87 !--    Intel compiler
    88        OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='FORTRAN' )
     97!--       The Intel compiler does not allow to immediately flush the output buffer
     98!--       in case that option ADVANCE='NO' is used in the write statement.
     99!--       A workaround is to set a special carriage control feature and use "+" as
     100!--       first output character, but this non-standard and only available with the
     101!--       Intel compiler
     102          OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='FORTRAN' )
    89103#endif
     104
     105       ENDIF
     106
    90107       initialized = .TRUE.
    91108
     
    97114! Description:
    98115! ------------
    99 !
     116! Print progress data to standard output (interactive) or to file (batch jobs)
    100117!------------------------------------------------------------------------------!
    101118
     
    104121       REAL(wp) ::  remaining_time_in_percent  !: remaining time to be simulated
    105122                                               !: in the job
     123       REAL(wp) ::  remaining_time_in_percent_total !: total remaining time of
     124                                                    !: the job chain
     125
     126       IF ( .NOT. initialized )  CALL init_progress_bar
     127
     128
     129       remaining_time_in_percent =                                             &
     130          ( simulated_time - simulated_time_at_begin ) / time_to_be_simulated
     131
     132       remaining_time_in_percent_total = ( simulated_time / end_time )
    106133
    107134!
    108 !--    Porgress bar does not make sense in batch mode (and also ADVANCE=no does
    109 !--    not properly work in batch mode on Cray XC30)
    110        IF ( batch_job )  RETURN
     135!--    In batch mode, use a file (PROGRESS), otherwise use progress bar
     136       IF ( batch_job )  THEN
    111137
    112        IF ( .NOT. initialized )  CALL init_progress_bar
     138          BACKSPACE ( 117 )
     139          WRITE ( 117, FMT='(F5.2,1X,F5.2)' ) remaining_time_in_percent,       &
     140                                              remaining_time_in_percent_total
     141          CALL local_flush( 117 )
     142
     143       ELSE
     144
    113145!
    114 !--    Calculate length of progress bar
    115        remaining_time_in_percent =                                             &
    116              ( simulated_time - simulated_time_at_begin ) / time_to_be_simulated
     146!--       Calculate length of progress bar
     147          ilength = remaining_time_in_percent * 60.0_wp
     148          ilength = MIN( ilength, 60 )
    117149
    118        ilength = remaining_time_in_percent * 60.0_wp
    119        ilength = MIN( ilength, 60 )
    120 
    121        bar(1:ilength) = crosses(1:ilength)
     150          bar(1:ilength) = crosses(1:ilength)
    122151
    123152#if defined( __intel_compiler )
    124        WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')' )           &
    125                '+', bar,                                                       &
    126                 MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) * 100.0_wp )
     153          WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')' )        &
     154                  '+', bar,                                                    &
     155                   MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) *       &
     156                                  100.0_wp )
    127157#else
    128        WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')',            &
    129                ADVANCE='NO' )  CHAR( 13 ), bar,                                &
    130                 MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) * 100.0_wp )
     158          WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')',         &
     159                  ADVANCE='NO' )  CHAR( 13 ), bar,                             &
     160                   MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) *       &
     161                                  100.0_wp )
    131162#endif
    132        CALL local_flush( OUTPUT_UNIT )
     163          CALL local_flush( OUTPUT_UNIT )
     164
     165       ENDIF
    133166
    134167    END SUBROUTINE output_progress_bar
    135168
    136169    SUBROUTINE finish_progress_bar
     170!------------------------------------------------------------------------------!
     171! Description:
     172! ------------
     173! Finalization of the progress bar/file
     174!------------------------------------------------------------------------------!
    137175
    138176       IMPLICIT NONE
    139177
    140        IF ( batch_job )  RETURN
     178       IF ( batch_job )  THEN
    141179
     180          CALL close_file ( 117 )
     181
     182       ELSE
     183       
    142184#if defined( __intel_compiler )
    143185!
    144 !--    Reset to the default carriage control
    145        OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='LIST' )
     186!--       Reset to the default carriage control
     187          OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='LIST' )
    146188#endif
    147189!
    148 !--    Line feed when simulation has finished
    149        WRITE ( OUTPUT_UNIT, '(1X)' )
     190!--       Line feed when simulation has finished
     191          WRITE ( OUTPUT_UNIT, '(1X)' )
     192
     193       ENDIF
    150194
    151195    END SUBROUTINE finish_progress_bar
    152196
     197
    153198 END MODULE progress_bar
  • palm/trunk/SOURCE/read_3d_binary.f90

    r1401 r1468  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Adapted for use on up to 6-digit processor cores
    2323!
    2424! Former revisions:
     
    108108    IMPLICIT NONE
    109109
    110     CHARACTER (LEN=5)  ::  myid_char_save
     110    CHARACTER (LEN=7)  ::  myid_char_save
    111111    CHARACTER (LEN=10) ::  binary_version
    112112    CHARACTER (LEN=10) ::  version_on_file
     
    296296!
    297297!--    Set the filename (underscore followed by four digit processor id)
    298        WRITE (myid_char,'(''_'',I4.4)')  j
     298       WRITE (myid_char,'(''_'',I6.6)')  j
    299299       WRITE (9,*) 'myid=',myid,' opening file "',myid_char,'"'
    300300       CALL local_flush( 9 )
    301301
    302302!
    303 !--    Open the restart file. If this file has been created by PE0 (_0000),
     303!--    Open the restart file. If this file has been created by PE0 (_000000),
    304304!--    the global variables at the beginning of the file have to be skipped
    305305!--    first.
  • palm/trunk/UTIL/combine_plot_fields.f90

    r1395 r1468  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Adapted for use on up to 6-digit processor cores (not tested)
    2323!
    2424! Former revisions:
     
    8787!-- Local variables
    8888    CHARACTER (LEN=2)    ::  modus, model_string
    89     CHARACTER (LEN=4)    ::  id_string
     89    CHARACTER (LEN=6)    ::  id_string
    9090    CHARACTER (LEN=10)   ::  dimname, var_name
    9191    CHARACTER (LEN=40)   ::  filename
     
    187187!--       create any output for this cross-section.
    188188          danz = 0
    189           WRITE (id_string,'(I4.4)')  danz
     189          WRITE (id_string,'(I6.6)')  danz
    190190          INQUIRE ( &
    191191               FILE='PLOT2D_'//modus//TRIM( model_string )//'_'//id_string, &
     
    200200                  FORM='UNFORMATTED' )
    201201             danz = danz + 1
    202              WRITE (id_string,'(I4.4)')  danz
     202             WRITE (id_string,'(I6.6)')  danz
    203203             INQUIRE ( &
    204204                  FILE='PLOT2D_'//modus//TRIM( model_string )//'_'//id_string, &
     
    604604       IF ( .NOT. netcdf_parallel )  THEN
    605605          danz = 0
    606           WRITE (id_string,'(I4.4)')  danz
     606          WRITE (id_string,'(I6.6)')  danz
    607607          INQUIRE ( &
    608608               FILE='PLOT3D_DATA'//TRIM( model_string )//'_'//TRIM( id_string ),  &
     
    626626               FORM='UNFORMATTED')
    627627          danz = danz + 1
    628           WRITE (id_string,'(I4.4)')  danz
     628          WRITE (id_string,'(I6.6)')  danz
    629629          INQUIRE ( &
    630630               FILE='PLOT3D_DATA'//TRIM( model_string )//'_'//TRIM(id_string), &
  • palm/trunk/UTIL/combine_plot_fields_single_open.f90

    r1310 r1468  
    2020! Current revisions:
    2121! -----------------
     22! Adapted for use on up to 6-digit processor cores (not tested)
    2223!
    2324! Former revisions:
     
    4344!-- Lokale Variablen
    4445    CHARACTER (LEN=2) ::  modus
    45     CHARACTER (LEN=7) ::  id_char
     46    CHARACTER (LEN=9) ::  id_char
    4647
    4748    INTEGER, PARAMETER ::  spk = SELECTED_REAL_KIND( 6 )
     
    6768!--    Pruefen, ob Basisdatei von PE0 vorhanden
    6869       danz = 0
    69        WRITE (id_char,'(A2,''_'',I4.4)')  modus, danz
     70       WRITE (id_char,'(A2,''_'',I6.6)')  modus, danz
    7071       INQUIRE ( FILE='PLOT2D_'//id_char, EXIST=found )
    7172!
     
    7475
    7576          danz = danz + 1
    76           WRITE (id_char,'(A2,''_'',I4.4)')  modus, danz
     77          WRITE (id_char,'(A2,''_'',I6.6)')  modus, danz
    7778          INQUIRE ( FILE='PLOT2D_'//id_char, EXIST=found )
    7879
     
    9899!
    99100!--          Prozessordatei oeffnen
    100              WRITE (id_char,'(A2,''_'',I4.4)')  modus, id
     101             WRITE (id_char,'(A2,''_'',I6.6)')  modus, id
    101102             OPEN ( 1, FILE='PLOT2D_'//id_char, FORM='UNFORMATTED', &
    102103                       POSITION='ASIS' )
     
    168169!-- Pruefen, ob Basisdatei von PE0 vorhanden
    169170    danz = 0
    170     WRITE (id_char,'(I4.4)')  danz
     171    WRITE (id_char,'(I6.6)')  danz
    171172    INQUIRE ( FILE='PLOT3D_DATA_'//TRIM( id_char ), EXIST=found )
    172173
     
    180181
    181182       danz = danz + 1
    182        WRITE (id_char,'(I4.4)')  danz
     183       WRITE (id_char,'(I6.6)')  danz
    183184       INQUIRE ( FILE='PLOT3D_DATA_'//TRIM( id_char ), EXIST=found )
    184185
     
    209210!
    210211!--       Prozessordatei oeffnen
    211           WRITE (id_char,'(I4.4)')  id
     212          WRITE (id_char,'(I6.6)')  id
    212213          OPEN ( 1, FILE='PLOT3D_DATA_'//TRIM( id_char ), FORM='UNFORMATTED', &
    213214                    POSITION='ASIS' )
Note: See TracChangeset for help on using the changeset viewer.