Ignore:
Timestamp:
Mar 4, 2014 7:12:34 AM (11 years ago)
Author:
raasch
Message:

script comments translated to English
version update to 3.10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/subjob

    r1280 r1289  
    2323# Current revisions:
    2424# ------------------
    25 #
     25# German comments translated to English
     26# fimm-, necriam-, scirocco-, ibmy-, and sgi-specific code removed
    2627#
    2728# Former revisions:
     
    9192
    9293
    93     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
     94    # VARIABLE-DECLARATIONS AND DEFAULT VALUES
    9495 delete_dayfile=false
    9596 email_notification=none
     
    115116
    116117
    117     # FEHLERBEHANDLUNG
    118     # BEI EXIT:
     118    # ERROR HANDLING
     119    # IN CASE OF EXIT:
    119120 trap 'if [[ $locat != normal ]]
    120121       then
     
    132133
    133134
    134     # BEI TERMINAL-BREAK:
     135    # IN CASE OF TERMINAL-BREAK:
    135136 trap '[[ -f $job_to_send ]]  &&  rm  $job_to_send
    136137       printf "\n\n+++ SUBJOB killed \n\n"
     
    141142
    142143
    143     # LOKALEN HOSTNAMEN FESTSTELLEN
     144    # DETERMINE NAME OF LOCAL HOST
    144145 local_host=$(hostname)
    145146
    146147
    147148
    148     # HOSTSPEZIFISCHE VARIABLEN VEREINBAREN BZW. PRUEFEN, OB LOKALER HOST
    149     # UEBERHAUPT ZULAESSIG IST
    150     # Note: One of the entries for "lck" or "lckordi" always has to be
    151     # comment out, because the hostname (node*) is same for both machines
     149    # SET HOST-SPECIFIC VARIABLES VEREINBAREN (CHECK, IF LOCAL HOST
     150    # IS ADMITTED AT ALL)
     151    # NOTE: ONE OF THE ENTRIES FOR "lck" OR "lckordi" ALWAYS HAS TO BE
     152    # COMMENT OUT, BECAUSE THE HOSTNAME (node*) IS SAME FOR BOTH MACHINES
    152153 case  $local_host  in
    153154     (ambiel-lx)             local_addres=134.106.74.48;  local_host=lcfor;;
     
    156157     (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
    157158     (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
    158      (bd1)                   local_addres=130.73.232.64;  local_host=lcsgib;;
    159      (bd2)                   local_addres=130.73.232.65;  local_host=lcsgib;;
    160      (bd3)                   local_addres=130.73.232.66;  local_host=lcsgib;;
    161      (bd4)                   local_addres=130.73.232.67;  local_host=lcsgib;;
    162      (b01*|bicegate1)        local_addres=130.73.232.102; local_host=lcsgib;;
    163159     (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
    164      (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
    165160     (blizzard1)             local_addres=136.172.40.15;  local_host=ibmh;;
    166161     (blogin*|bxc*)          local_addres=130.73.233.1;   local_host=lccrayb;;
     
    171166     (climate*)              local_addres=165.132.26.68;  local_host=lcyon;;
    172167     (clogin*)               local_addres=86.50.166.21;   local_host=lccrayf;;
    173      (compute-*.local)       local_addres=172.20.4.2;     local_host=lcfimm;;
    174168     (cs*)                   local_addres=136.172.44.131; local_host=nech;;
    175169     (elephanta)             local_addres=130.75.105.6;   local_host=lcmuk;;
    176      (fimm.bccs.uib.no)      local_addres=172.20.4.2;     local_host=lcfimm;;
    177170     (flow01)                local_addres=10.141.255.71;  local_host=lcflow;;
    178171     (flow02)                local_addres=10.141.255.72;  local_host=lcflow;;
     
    181174     (gaia*)                 local_addres=150.183.146.24; local_host=ibmkisti;;
    182175     (gallego)               local_addres=130.75.105.10;  local_host=lcmuk;;
    183      (gfdl5)                 local_addres=165.132.26.58;  local_host=ibmy;;
    184176     (gregale)               local_addres=130.75.105.109; local_host=lcmuk;;
    185177     (hababai)               local_addres=130.75.105.108; local_host=lcmuk;;
    186178     (hayaka*)               local_addres=133.5.4.33;     local_host=lckyuh;;
    187179     (hexagon.bccs.uib.no)   local_addres=129.177.20.113; local_host=lcxe6;;
    188      (hd1)                   local_addres=130.75.4.104;   local_host=lcsgih;;
    189      (hd2)                   local_addres=130.75.4.105;   local_host=lcsgih;;
    190      (hd3)                   local_addres=130.75.4.106;   local_host=lcsgih;;
    191      (hd4)                   local_addres=130.75.4.107;   local_host=lcsgih;;
    192      (hicegate0)             local_addres=130.75.4.101;   local_host=lcsgih;;
    193      (h01*|hicegate1)        local_addres=130.75.4.102;   local_host=lcsgih;;
    194      (hicegate2)             local_addres=130.75.4.103;   local_host=lcsgih;;
    195180     (hx*)                   local_addres=133.3.51.11;    local_host=lckyoto;;
    196181     (inferno)               local_addres=130.75.105.5;   local_host=lcmuk;;
     
    212197     (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
    213198     (rte*)                  local_addres=133.5.185.60;   local_host=lcrte;;
    214      (r1*)                   local_addres=130.75.4.102;   local_host=lcsgih;;
    215      (r2*)                   local_addres=130.73.232.102; local_host=lcsgib;;
    216      (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
    217199     (shiokaze-lx)           local_addres=134.106.74.123; local_host=lcfor;;
    218200     (sisu-login*)           local_addres=86.50.166.21;   local_host=lccrayf;;
    219201     (solano)                local_addres=130.75.105.110; local_host=lcmuk;;
    220202     (sugoka*)               local_addres=172.31.120.1;   local_host=lckyut;;
    221      (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
    222      (sx-*)                  local_addres=172.16.1.131;   local_host=necriam;;
    223203     (t2a*)                  local_addres=10.1.6.165;     local_host=lctit;;
    224204     (urban*)                local_addres=147.46.30.151   local_host=lcsb;;
     
    233213
    234214
    235     # REMOTE HOST DEFAULTMAESSIG = LOCAL HOST SETZEN
     215    # BY DEFAULT, THE REMOTE HOST IS THE LOCAL HOST
    236216 remote_host=$local_host
    237217
     
    239219
    240220
    241     # PROZEDUROPTIONEN EINLESEN
     221    # READ THE SHELLSCRIPT-OPTIONS
    242222 while  getopts  :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX:  option
    243223 do
     
    266246
    267247
    268     # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN
     248    # GET THE NAME OF THE JOBFILE AS NEXT ARGUMENT
    269249 (( to_shift = $OPTIND - 1 ))
    270250 shift $to_shift; file_to_send=$1
    271251
    272252
    273     # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN
     253    # OUTPUT OF SHORT DESCRIPTION OF SCRIPT-OPTIONS
    274254 if [ "$1" = "?" ]
    275255 then
     
    282262    printf "\n        -D    only the job-file will be created   ---"
    283263    printf "\n        -h    execution host, available hosts:    $remote_host"
    284     printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, ibmy, lc...,"
    285     printf "\n              lckiaps, lctit, nech, necriam, unics"
     264    printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, lc...,"
     265    printf "\n              lckiaps, lctit, nech"
    286266    printf "\n        -m    memory demand per process in MByte  ---"
    287267    printf "\n        -n    jobname                             <jobdatei>"
     
    303283
    304284
    305     # PRUEFEN, OB JOBDATEI ANGEGEBEN WURDE UND OB SIE AUCH EXISTIERT
     285    # CHECK, IF JOB-FILE HAS BEEN GIVEN AS ARGUMENT AND IF THE FILE ITSELF EXISTS
    306286 if [[ "$file_to_send" = "" ]]
    307287 then
     
    322302
    323303
    324     # FALLS KEIN JOBNAME ANGEGEBEN WURDE, WIRD JOBNAME = JOBDATEINAME
    325     # GESETZT. VORAUSSETZUNG: JOBDATEINAME BEINHALTET KEINE PFADE
     304    # IF NO JOBNAME HAS BEEN GIVEN, JOBNAME IS SET TO THE NAME OF THE JOB-FILE,
     305    # PROVIDED THAT THE JOB-FILE NAME DOES NOT CONTAIN ANY PATH
    326306 if [[ $job_name = none ]]
    327307 then
     
    339319
    340320
    341     # HOSTSPEZIFISCHE GROESSEN VEREINBAREN BZW. ABBRUCH BEI UNZULAESSIGEM HOST
    342     # ODER WENN HOST NICHT ANGEGEBEN WURDE
     321    # SET HOST-SPECIFIC QUANTITIES, OR TERMINATE IN CASE OF UNKNOWN HOST,
     322    # OR IF NO HOST HAS BEEN GIVEN
    343323 if [[ $remote_host = none ]]
    344324 then
     
    352332        (ibmku)   queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
    353333        (ibms)    queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    354         (ibmy)    queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    355334        (lccrayb) queue=testq; remote_addres=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;;
    356335        (lccrayh) queue=mpp1testq; remote_addres=130.75.4.1; submcom=/opt/moab/7.2.6/bin/msub;;
    357336        (lccrayf) queue=small; remote_addres=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
    358         (lcfimm)  remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
    359337        (lcflow)  remote_addres=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;;
    360338        (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;;
    361         (lcsgib)  queue=smallq; remote_addres=130.73.232.104; submcom=/opt/moab/bin/msub;;
    362         (lcsgih)  queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;;
    363339        (lck)     remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;;
    364340        (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
     
    372348        (lcyon)   remote_addres=165.132.26.68; submcom=/usr/torque/bin/qsub;;
    373349        (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";;
    374         (necriam) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=172.16.1.131; submcom="/usr/bin/nqsII/qsub";;
    375         (vpp)     qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;;
    376         (unics)   qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;;
    377350        (*)       printf "\n  +++ hostname \"$remote_host\" not allowed";
    378351                  locat=parameter; exit;;
     
    381354
    382355
    383     # EVTL. PRUEFEN, OB ANGEGEBENE QUEUE ZULAESSIG IST
     356    # CHECK, IF A VALID QUEUE HAS BEEN GIVEN
    384357 if [[ $no_default_queue != none ]]
    385358 then
     
    407380                     (*)                                     error=true;;
    408381                 esac;;
    409         (ibmy)   case  $ndq  in
    410                      (parallel)                              error=false;;
    411                      (*)                                     error=true;;
    412                  esac;;
    413382        (lccrayb) case  $ndq  in
    414383                     (mpp1q|testq|specialm1q)                error=false;;
     
    443412                     (*)                                     error=true;;
    444413                 esac;;
    445         (lcsgib|lcsgih)   case  $ndq  in
    446                      (testq|serialq|smallq|mediumq|bigq|workq|dataq|permq|special1q)       error=false;;
    447                      (*)                                     error=true;;
    448                  esac;;
    449414        (lctit)  case  $ndq  in
    450415                     (G|L128|L256|L512H|S|S96|V)             error=false;;
     
    455420                     (*)    error=true;;
    456421                 esac;;
    457         (necriam) case  $ndq  in
    458                      (SP|SS|P6)  error=false;;
    459                      (*)    error=true;;
    460                  esac;;
    461422        (t3eh)   case  $ndq  in
    462423                     (para_t3e|em|k|l|lm|comp_t3e|c|p|ht)  error=false;;
     
    471432                     (*)    error=true;;
    472433                 esac;;
    473         (unics)  case  $ndq  in
    474                      (unics|ht)  error=false;;
    475                      (*)         error=true;;
    476                  esac;;
    477434    esac
    478435    if [[ $error = true ]]
     
    487444
    488445
    489     # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN
    490     # AUFTEILEN
     446    # CHECK THE CPU-TIME
     447    # SPLIT TIME INTO HOURS, MINUTES, AND SECONDS
    491448 done=false
    492449 while [[ $done = false ]]
     
    520477
    521478
    522     # PRUEFEN DER KERNSPEICHERANFORDERUNG
     479    # CHECK THE MEMORY DEMAND
    523480 done=false
    524481 while [[ $done = false ]]
     
    535492 done
    536493
    537  if [[ $remote_host = nech  ||  $remote_host = necriam ]]
     494 if [[ $remote_host = nech ]]
    538495 then
    539496    if (( tasks_per_node != 0 ))
     
    552509
    553510
    554     # SPEICHERBERECHNUNG BEI OPENMP-NUTZUNG
     511    # MEMORY DEMAND IN CASE OF OPENMP-USAGE ON IBM-SYSTEMS
    555512 if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
    556513 then
     
    559516
    560517
    561     # BERECHNUNG DER ANZAHL DER ZU VERWENDENDEN KNOTEN
     518    # CALCULATE NUMBER OF REQUIRED NODES
    562519 if (( tasks_per_node != 0 ))
    563520 then
     
    566523
    567524
    568     # Calculate number of processes per node
     525    # CALCULATE NUMBER OF PROCESSES PER NODE
    569526 (( processes_per_node = tasks_per_node * threads_per_task ))
    570527
    571528
    572     # Calculate number of MPI tasks
     529    # CALCULATE NUMBER OF MPI TASKS
    573530 (( mpi_tasks = numprocs / threads_per_task ))
    574531
    575532
    576     # Set port number option for calls of ssh/scp, subjob and batch_scp scripts
     533    # SET PORT NUMBER OPTION FOR CALLS OF ssh/scp, subjob AND batch_scp SCRIPTS
    577534 if [[ "$scp_port" != "" ]]
    578535 then
     
    582539
    583540
    584     # HEADER-AUSGABE
     541    # HEADER-OUTPUT
    585542 if [[ $verify = true ]]
    586543 then
     
    612569
    613570
    614        # KONTROLLABFRAGE, OB ALLES O.K.
     571       # QUERY CHECK
    615572    antwort="dummy"
    616573    while [[ $antwort != y  &&  $antwort != Y  &&  $antwort != n  &&  $antwort != N ]]
     
    627584
    628585
    629     # ZUFALLSKENNUNG GENERIEREN UND JOBNAMEN AUF ZIELRECHNER BESTIMMEN
    630  kennung=$RANDOM
    631  job_on_remhost=${job_name}_${kennung}_$local_host
    632  job_to_send=job_to_send_$kennung
     586    # GENERATE RANDOM IDENTIFIER, AND DETERMINE THE JOBNAME ON THE TARGET HOST
     587 identifier=$RANDOM
     588 job_on_remhost=${job_name}_${identifier}_$local_host
     589 job_to_send=job_to_send_$identifier
    633590 if [[ $delete_dayfile = false ]]
    634591 then
    635     remote_dayfile=${local_host}_${job_name}_result_$kennung
     592    remote_dayfile=${local_host}_${job_name}_result_$identifier
    636593    local_dayfile=${remote_host}_${job_name}
    637594 else
     
    641598
    642599
    643     # Generate the batch job scripts (qsub/msub/LoadLeveler)
     600    # GENERATE THE BATCH-JOB SCRIPTS (FOR QUEUEING-SYSTEMS qsub/msub/LoadLeveler)
    644601 if [[ $(echo $remote_host | cut -c1-3) = ibm  &&  $numprocs != 0 ]]
    645602 then
    646603
    647        # General LoadLeveler settings
     604       # GENERAL LOADLEVELER SETTINGS
    648605    execute_in_shell="#!/bin/ksh"
    649606    use_shell="# @ shell = /bin/ksh"
     
    700657    then
    701658       network_to_use="# @ network.mpi = csss,shared,us"
    702     elif [[ $remote_host = ibmy ]]
    703     then
    704        consumable_memory=""
    705        network_to_use=""
    706659    fi
    707660
     
    756709    else
    757710
    758        if [[ $remote_host != ibmy ]]
    759        then
    760 
    761           cat >> $job_to_send << %%END%%
     711       cat >> $job_to_send << %%END%%
    762712# @ blocking = unlimited
    763713# @ total_tasks = $numprocs
     
    767717%%END%%
    768718
    769        else
    770 
    771           cat >> $job_to_send << %%END%%
    772 # @ node = 1
    773 # @ total_tasks = $numprocs
    774 # @ queue
    775 
    776 %%END%%
    777 
    778        fi
    779 
    780     fi
    781 
    782        # workaround because of silly job filter on ibmkisti
     719    fi
     720
     721       # WORKAROUND BECAUSE OF SILLY JOB FILTER ON ibmkisti
    783722    if [[ $remote_host = ibmkisti  &&  $threads_per_task != 1 ]]
    784723    then
     
    863802$init_cmds
    864803$module_calls
    865 
    866 %%END%%
    867 
    868     fi
    869 
    870  elif [[ $remote_host = lcfimm ]]
    871  then
    872 
    873     if [[ $numprocs != 0 ]]
    874     then
    875        cat > $job_to_send << %%END%%
    876 #!/bin/ksh
    877 #PBS -N $job_name
    878 #PBS -A $project_account
    879 #PBS -l walltime=$timestring
    880 #PBS -l nodes=${nodes}:ppn=$processes_per_node
    881 #PBS -l pmem=${memory}mb
    882 #PBS -m abe
    883 #PBS -o $remote_dayfile
    884 #PBS -j oe
    885 mpd &
    886 
    887 %%END%%
    888 
    889     else
    890        cat > $job_to_send << %%END%%
    891 #!/bin/ksh
    892 #PBS -N $job_name
    893 #PBS -A $project_account
    894 #PBS -l walltime=$timestring
    895 #PBS -l ncpus=1
    896 #PBS -l pmem=${memory}mb
    897 #PBS -m abe
    898 #PBS -o $remote_dayfile
    899 #PBS -j oe
    900804
    901805%%END%%
     
    1036940    fi
    1037941
    1038  elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
    1039  then
    1040 
    1041     if [[ "$sgi_feature" != "" ]]
    1042     then
    1043        feature_directive="#PBS -l feature=$sgi_feature"
    1044     else
    1045        feature_directive=""
    1046     fi
    1047 
    1048     if [[ $queue = dataq || $queue = permq ]]
    1049     then
    1050        feature_directive="#PBS -l feature=data"
    1051     fi
    1052 
    1053     if [[ $queue = testq  || $queue = mediumq  ||  $queue = bigq  ||  $queue = workq  ||  $queue = dataq  ||  $queue = permq ||  $queue = serialq  ||  $queue = special1q ]]
    1054     then
    1055        queue_directive="#PBS -q $queue"
    1056     else
    1057        queue_directive=""
    1058     fi
    1059 
    1060     if [[ $email_notification = none ]]
    1061     then
    1062        email_directive=""
    1063     else
    1064        email_directive="#PBS -M $email_notification"
    1065     fi
    1066 
    1067     if [[ $numprocs != 0 ]]
    1068     then
    1069        cat > $job_to_send << %%END%%
    1070 #!/bin/bash
    1071 #PBS -N $job_name
    1072 #PBS -l walltime=$timestring
    1073 #PBS -l nodes=$nodes:ppn=${processes_per_node}
    1074 #PBS -l naccesspolicy=$node_usage
    1075 #PBS -o $remote_dayfile
    1076 #PBS -j oe
    1077 $feature_directive
    1078 $queue_directive
    1079 $email_directive
    1080 
    1081 eval \`/sw/swdist/bin/modulesinit\`
    1082 #. /usr/share/modules/init/bash
    1083 $init_cmds
    1084 $module_calls
    1085 
    1086 echo ld_library_path=\$LD_LIBRARY_PATH
    1087 
    1088 %%END%%
    1089 
    1090     else
    1091        cat > $job_to_send << %%END%%
    1092 #PBS -S /bin/bash
    1093 #PBS -N $job_name
    1094 #PBS -l walltime=$timestring
    1095 #PBS -l ncpus=1
    1096 #PBS -o $remote_dayfile
    1097 #PBS -j oe
    1098 $queue_directive
    1099 $email_directive
    1100 
    1101 eval \`/sw/swdist/bin/modulesinit\`
    1102 #. /usr/share/modules/init/bash
    1103 $init_cmds
    1104 $module_calls
    1105 
    1106 %%END%%
    1107 
    1108     fi
    1109 
    1110942 elif [[ $remote_host = lcxe6 ]]
    1111943 then
     
    12901122    fi
    12911123
    1292  elif [[ $remote_host = necriam ]]
    1293  then
    1294 
    1295     if (( nodes > 1 ))
    1296     then
    1297        cat > $job_to_send << %%END%%
    1298 #!/bin/ksh
    1299 #PBS -b $nodes
    1300 #PBS -o $remote_dayfile
    1301 #PBS -N $job_name
    1302 #PBS -j o
    1303 #PBS -v MPIPROGINV=YES
    1304 
    1305 %%END%%
    1306 
    1307     elif [[ $numprocs != 0 ]]
    1308     then
    1309        cat > $job_to_send << %%END%%
    1310 #!/bin/ksh
    1311 #PBS -q ${queue}
    1312 #PBS -o $remote_dayfile
    1313 #PBS -N $job_name
    1314 #PBS -j o
    1315 #PBS -v MPIPROGINV=YES
    1316 
    1317 %%END%%
    1318 
    1319     else
    1320        cat > $job_to_send << %%END%%
    1321 #!/bin/ksh
    1322 #PBS -o $remote_dayfile
    1323 #PBS -j o
    1324 
    1325 %%END%%
    1326 
    1327     fi
    1328 
    13291124 elif [[ $remote_host = lctit ]]
    13301125 then
     
    13361131%%END%%
    13371132
    1338        # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN
     1133       # SET OPTIONS FOR SUBMIT-COMMAND
    13391134    if [[ $tasks_per_node != $processes_per_node ]]
    13401135    then
     
    13581153
    13591154
    1360     # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP
    1361     # BEI EXIT VERANLASSEN
    1362     # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT
    1363     # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH
     1155    # IN CASE OF JOBS EXECUTING ON REMOTE-HOSTS, THE TRANSFER OF THE DAYFILES
     1156    # TO THE LOCAL HOSTS WILL BE INITIATED BY TRAP ON EXIT
     1157    # NO TRANSFER POSSIBLE ON IBM IN SEOUL
    13641158 if [[ $delete_dayfile = false  &&  $remote_host != $local_host ]]
    13651159 then
     
    13671161    echo "trap '"                               >>  $job_to_send
    13681162    echo "set +vx"                              >>  $job_to_send
    1369     if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
     1163    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* ]]
    13701164    then
    13711165       if [[ $remote_host = ibmh ]]
     
    13811175       then
    13821176          return_queue=p_normal
    1383        elif [[ $remote_host = ibmy ]]
    1384        then
    1385           return_queue=serial
    1386        elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
    1387        then
    1388           return_queue=serialq
    1389        elif [[ $remote_host = necriam ]]
    1390        then
    1391           return_queue=SP
    13921177       elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
    13931178       then
     
    14111196          if [[ $remote_host = ibmku ]]
    14121197          then
    1413              echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung"            >>  $job_to_send
    1414              echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung"  >>  $job_to_send
     1198             echo "echo \"#!/usr/bin/ksh\" >> scpjob.$identifier"            >>  $job_to_send
     1199             echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$identifier"  >>  $job_to_send
    14151200          else
    1416              echo "echo \"#!/bin/ksh\" >> scpjob.$kennung"                >>  $job_to_send
     1201             echo "echo \"#!/bin/ksh\" >> scpjob.$identifier"                >>  $job_to_send
    14171202          fi
    1418           echo "echo \"# @ job_type = serial\" >> scpjob.$kennung"    >>  $job_to_send
    1419           echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung"  >>  $job_to_send
    1420           echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung"  >>  $job_to_send
    1421           echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung "  >>  $job_to_send
    1422           echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
    1423           echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
     1203          echo "echo \"# @ job_type = serial\" >> scpjob.$identifier"    >>  $job_to_send
     1204          echo "echo \"# @ job_name = transfer\" >> scpjob.$identifier"  >>  $job_to_send
     1205          echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$identifier"  >>  $job_to_send
     1206          echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$identifier "  >>  $job_to_send
     1207          echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier"  >>  $job_to_send
     1208          echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier"  >>  $job_to_send
    14241209          if [[ $host != "ibmh" ]]
    14251210          then
    1426              echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung"  >>  $job_to_send
     1211             echo "echo \"# @ class = $return_queue\" >> scpjob.$identifier"  >>  $job_to_send
    14271212          fi
    1428           echo "echo \"# @ image_size = 10\" >> scpjob.$kennung"      >>  $job_to_send
    1429           echo "echo \"# @ notification = never\" >> scpjob.$kennung" >>  $job_to_send
    1430 
    1431           echo "echo \"# @ queue\" >> scpjob.$kennung"                >>  $job_to_send
    1432           echo "echo \" \" >> scpjob.$kennung"                        >>  $job_to_send
    1433 
    1434           echo "echo \"set -x\" >> scpjob.$kennung"                   >>  $job_to_send
    1435           echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$kennung"  >>  $job_to_send
     1213          echo "echo \"# @ image_size = 10\" >> scpjob.$identifier"      >>  $job_to_send
     1214          echo "echo \"# @ notification = never\" >> scpjob.$identifier" >>  $job_to_send
     1215
     1216          echo "echo \"# @ queue\" >> scpjob.$identifier"                >>  $job_to_send
     1217          echo "echo \" \" >> scpjob.$identifier"                        >>  $job_to_send
     1218
     1219          echo "echo \"set -x\" >> scpjob.$identifier"                   >>  $job_to_send
     1220          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
    14361221          if [[ $remote_host = ibmku ]]
    14371222          then
    1438              echo "echo \"rm  scpjob.$kennung\" >> scpjob.$kennung"   >>  $job_to_send
     1223             echo "echo \"rm  scpjob.$identifier\" >> scpjob.$identifier"   >>  $job_to_send
    14391224          fi
    1440           echo "echo \"exit\" >> scpjob.$kennung"                     >>  $job_to_send
     1225          echo "echo \"exit\" >> scpjob.$identifier"                     >>  $job_to_send
    14411226
    14421227       elif [[ $remote_host = nech ]]
    14431228       then
    14441229          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
    1445           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1230          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    14461231          echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100"  >>  $job_to_send
    14471232          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
     
    14541239          echo "%%END%%"                           >>  $job_to_send
    14551240
    1456        elif [[ $remote_host = necriam ]]
    1457        then
    1458           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
    1459           echo "#PBS -q $return_queue"             >>  $job_to_send
    1460           echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
    1461           echo "#PBS -j o"                         >>  $job_to_send
    1462           echo " "                                 >>  $job_to_send
    1463           echo "set -x"                            >>  $job_to_send
    1464           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    1465           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    1466           echo "%%END%%"                           >>  $job_to_send
    1467 
    14681241       elif [[ $remote_host = lckyuh ]]
    14691242       then
    1470           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1243          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    14711244          echo "#!/bin/bash"                       >>  $job_to_send
    14721245          echo "#PJM -L \"node=1\""                >>  $job_to_send
     
    14851258       elif [[ $remote_host = lckyut ]]
    14861259       then
    1487           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1260          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    14881261          echo "#!/bin/bash"                       >>  $job_to_send
    14891262          echo "#PJM -L \"vnode=1\""               >>  $job_to_send
     
    15001273          echo "%%END%%"                           >>  $job_to_send
    15011274
    1502        elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
    1503        then
    1504           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
    1505           echo "#!/bin/bash"                             >>  $job_to_send
    1506           echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
    1507           echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
    1508           echo "#PBS -l nodes=1:ppn=1"                   >>  $job_to_send
    1509           echo "#PBS -l feature=data"                    >>  $job_to_send
    1510           echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
    1511           echo "#PBS -j oe"                        >>  $job_to_send
    1512           echo " "                                 >>  $job_to_send
    1513           echo ". /usr/share/modules/init/bash"    >>  $job_to_send
    1514           echo "set -x"                            >>  $job_to_send
    1515           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    1516           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    1517           echo "%%END%%"                           >>  $job_to_send
    1518 
    15191275       elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
    15201276       then
    1521           echo "cat > scpjob.$kennung << %%END%%"        >>  $job_to_send
     1277          echo "cat > scpjob.$identifier << %%END%%"        >>  $job_to_send
    15221278          echo "#!/bin/bash"                             >>  $job_to_send
    15231279          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
     
    15341290       elif [[ $remote_host = lcflow ]]
    15351291       then
    1536           echo "cat > scpjob.${kennung}.tmp << %%END%%"                  >>  $job_to_send
     1292          echo "cat > scpjob.${identifier}.tmp << %%END%%"                  >>  $job_to_send
    15371293          echo "#!/bin/bash"                                             >>  $job_to_send
    15381294          echo "SGEPREFIX -S /bin/bash"                                  >>  $job_to_send
     
    15431299          echo "SGEPREFIX -l excl_flow=false"                            >>  $job_to_send
    15441300          echo "SGEPREFIX -j y"                                          >>  $job_to_send
    1545           echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$kennung"  >>  $job_to_send
     1301          echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$identifier"  >>  $job_to_send
    15461302          echo " "                                                       >>  $job_to_send
    15471303          echo "set -x"                                                  >>  $job_to_send
     
    15511307          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    15521308          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    1553           echo "rm -f scpjob.${kennung}"                                 >>  $job_to_send         
     1309          echo "rm -f scpjob.${identifier}"                                 >>  $job_to_send         
    15541310          echo "%%END%%"                                                 >>  $job_to_send
    1555           echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${kennung}.tmp > scpjob.${kennung}" >>  $job_to_send         
    1556           echo "rm -f scpjob.${kennung}.tmp"                             >>  $job_to_send         
     1311          echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${identifier}.tmp > scpjob.${identifier}" >>  $job_to_send         
     1312          echo "rm -f scpjob.${identifier}.tmp"                             >>  $job_to_send         
    15571313
    15581314       else
    15591315
    1560           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1316          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    15611317          echo "# @\\\$-q $return_queue"           >>  $job_to_send
    15621318          echo "# @\\\$-l${qsubtime} 10"           >>  $job_to_send
     
    15671323          fi
    15681324          echo '# @\$-lF 10mb'                     >>  $job_to_send
    1569 #          echo '# @\$-o /dev/null'                 >>  $job_to_send
    15701325          echo '# @\$-o job_queue/last_job_transfer_protocol'    >>  $job_to_send
    15711326          echo '# @\\\$-eo'                          >>  $job_to_send
     
    15841339       if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
    15851340       then
    1586           echo "llsubmit  scpjob.$kennung"      >>  $job_to_send
     1341          echo "llsubmit  scpjob.$identifier"      >>  $job_to_send
    15871342       elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
    15881343       then
    1589           echo "msub -q $return_queue  scpjob.$kennung"               >>  $job_to_send
    1590        elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
    1591        then
    1592           echo "rm -rf \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
    1593           echo "chmod  u+x  scpjob.$kennung"                         >>  $job_to_send
    1594           echo "msub  scpjob.$kennung"                               >>  $job_to_send
     1344          echo "msub -q $return_queue  scpjob.$identifier"               >>  $job_to_send
    15951345       elif [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5 ]]
    15961346       then
    1597           echo "qsub -J n  scpjob.$kennung"     >>  $job_to_send
     1347          echo "qsub -J n  scpjob.$identifier"     >>  $job_to_send
    15981348       elif [[ $remote_host = t3es ]]
    15991349       then
    1600           echo "qsub -J n  -s /bin/ksh  scpjob.$kennung"     >>  $job_to_send
     1350          echo "qsub -J n  -s /bin/ksh  scpjob.$identifier"     >>  $job_to_send
    16011351       elif [[ $remote_host = lckiaps ]]
    16021352       then
    1603           echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
    1604           echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$kennung\" "  >>  $job_to_send
    1605           echo "rm  ${job_catalog}/scpjob.$kennung"          >>  $job_to_send
     1353          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
     1354          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$identifier\" "  >>  $job_to_send
     1355          echo "rm  ${job_catalog}/scpjob.$identifier"          >>  $job_to_send
    16061356       elif [[ $remote_host = lckyu* ]]
    16071357       then
    1608           echo "scp $PORTOPT scpjob.$kennung  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
    1609           echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" "  >>  $job_to_send
     1358          echo "scp $PORTOPT scpjob.$identifier  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
     1359          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$identifier; rm scpjob.$identifier\" "  >>  $job_to_send
    16101360       elif [[ $remote_host = lcflow ]]
    16111361       then
    1612           echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
    1613           echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$kennung\" "  >>  $job_to_send
     1362          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
     1363          echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$identifier\" "  >>  $job_to_send
    16141364       else
    1615           echo "$submcom  scpjob.$kennung"      >>  $job_to_send
     1365          echo "$submcom  scpjob.$identifier"      >>  $job_to_send
    16161366       fi
    16171367       if [[ $remote_host != ibmku  &&  $remote_host != lckiaps ]]
    16181368       then
    1619           echo "rm  scpjob.$kennung"            >>  $job_to_send
     1369          echo "rm  scpjob.$identifier"            >>  $job_to_send
    16201370       fi
    16211371       if [[ $remote_host = nech ]]
     
    16251375    else
    16261376#       echo "ftpcopy  -d  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1377       # ??? funktioniert das ÃŒberhaupt noch ???
    16271378       echo "nohup  ftpcopy  -d  -w 15  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
    16281379    fi
     
    16341385
    16351386
    1636     # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN
     1387    # APPEND THE JOB-FILE (CREATE BY mrun) TO THE JOB-DIRECTIVES GENERATED ABOVE
    16371388 cat  $file_to_send  >>  $job_to_send
    16381389
     
    16431394 fi
    16441395
    1645     # remove job file
     1396    # REMOVE JOB-FILE
    16461397 if [[ $remote_host = lctit  ||  $remote_host = ibmku  ||  $remote_host = lcflow ]]
    16471398 then
     
    16511402
    16521403
    1653 
    1654     # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN
    1655  if [[ -z $remote_user ]]
    1656  then
    1657     if [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5  ||  $remote_host = t3es  ||  $remote_host = vpp ]]
    1658     then
    1659        grep  $remote_addres  ~/.netrc | read dum dum dum remote_user dum dum
    1660     fi
    1661  fi
    1662 
    1663 
    1664 
    1665     # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN
     1404    # TRANSFER JOB TO THE TARGET HOST (JOB-DIRECTORY)
    16661405 if [[ $no_submit = false ]]
    16671406 then
     
    16691408    then
    16701409       [[ $verify = true ]]  &&  printf "\n >>> transfering job to \"$remote_host\"..."
    1671        if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
     1410       if [[ $remote_host = ibms ]]    # ssh on ibms cannot handle "~/"
    16721411       then
    16731412          job_catalog_save=$job_catalog
     
    16801419       if [[ $remote_host = nech ]]
    16811420       then
    1682              # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
    1683              # TRANSFERIERT WERDEN
     1421             # FILES CAN ONLY BE TRANSFERED VIA DKRZ'S ARCHIVE-SERVER
    16841422          scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
    16851423       else
     
    17021440
    17031441
    1704        # NQS- BZW. LOADLEVELER-JOB STARTEN
     1442       # START NQS- / LOADLEVELER-JOB
    17051443    if [[ $remote_host != $local_host ]]
    17061444    then
    17071445       [[ $verify = true ]]  &&  printf "\n >>> submitting job using \"qsub\"...\n"
    17081446
    1709        if [[ $(echo $remote_host | cut -c1-5) = lcsgi  &&  $prio = true ]]
    1710        then
    1711           printf "\n >>> submit with HLRN qos-feature hiprio...\n"
    1712           ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"
    1713        elif [[ $remote_host = ibmku ]]
     1447       if [[ $remote_host = ibmku ]]
    17141448       then
    17151449          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
     
    17241458    else
    17251459       cd  $job_catalog
    1726        if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
     1460       if [[ $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
    17271461       then
    17281462          eval  $submcom  $job_on_remhost
    1729        elif [[  $local_host = lcfimm  ||  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
     1463       elif [[  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
    17301464       then
    17311465          chmod  u+x  $job_on_remhost
     
    17431477       fi
    17441478
    1745           # Jobfile must not be deleted on lctit/ibmku!! This will be done
    1746           # only at the end of the job.
     1479          # JOBFILE MUST NOT BE DELETED ON lctit/ibmku/lcflow. THIS WILL BE DONE
     1480          # AT THE END OF THE JOB
    17471481       if [[ $local_host != lctit  &&  $local_host != ibmku  &&  $local_host != lcflow ]]
    17481482       then
     
    17551489
    17561490
    1757     # ABSCHLUSSARBEITEN
    1758 
     1491    # FINAL ACTIONS
    17591492 if [[ $no_submit = false ]]
    17601493 then
Note: See TracChangeset for help on using the changeset viewer.