Ignore:
Timestamp:
Feb 20, 2013 2:15:53 AM (12 years ago)
Author:
raasch
Message:

small bugfixes; mrun and subjob scripts are made bash compatible; further adjustments for lckyuh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/subjob

    r1100 r1103  
    2323# Current revisions:
    2424# ------------------
    25 #
     25# bash compatibility adjustments (usage of OPTIND, output formatting with printf
     26# instead typeset -L/R),
     27# further adjustments for lckyuh
    2628#
    2729# Former revisions:
     
    7375 typeset  -i   cputime=0  memory=0  Memory=0  minuten  resttime  sekunden  stunden
    7476 typeset  -i   inumprocs  mpi_tasks=0  nodes=0  processes_per_node=0 tasks_per_node=0  threads_per_task=1
    75  typeset  -L20 spalte1
    76  typeset  -R40 spalte2
    77  typeset  -L60 spalte3
    7877
    7978
     
    123122     (bd4)                   local_addres=130.73.232.67;  local_host=lcsgib;;
    124123     (b01*|bicegate1)        local_addres=130.73.232.102; local_host=lcsgib;;
     124     (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
    125125     (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
    126126     (blizzard1)             local_addres=136.172.40.15;  local_host=ibmh;;
     
    220220
    221221    # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN
    222  shift OPTIND-1; file_to_send=$1
     222 (( to_shift = $OPTIND - 1 ))
     223 shift $to_shift; file_to_send=$1
    223224
    224225
     
    525526    printf "#--------------------------------------------------------------# \n"
    526527    spalte1=SUBJOB;spalte2=$(date)
    527     printf "| $spalte1$spalte2 | \n"
     528    printf "| %-20s%40s | \n" "$spalte1" "$spalte2"
    528529    printf "|                                                              | \n"
    529530    printf "| values of parameters/options:                                | \n"
    530     spalte1=local_host$punkte; spalte2=$punkte$local_host
    531     printf "| $spalte1$spalte2 | \n"
    532     spalte1=remote_host$punkte; spalte2=$punkte$remote_host
    533     printf "| $spalte1$spalte2 | \n"
    534     spalte1=queue$punkte; spalte2=$punkte$queue
    535     printf "| $spalte1$spalte2 | \n"
    536     spalte1=memory$punkte; spalte2="$punkte$memory mb"
    537     printf "| $spalte1$spalte2 | \n"
    538     spalte1=cputime$punkte; spalte2="$punkte$cputime sec"
    539     printf "| $spalte1$spalte2 | \n"
    540     spalte1=job_name$punkte; spalte2="$punkte$job_name"
    541     printf "| $spalte1$spalte2 | \n"
     531    spalte1=$(echo local_host$punkte | cut -c-20)
     532    spalte2=$punkte$local_host
     533    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     534    spalte1=$(echo remote_host$punkte | cut -c-20)
     535    spalte2=$punkte$remote_host
     536    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     537    spalte1=$(echo queue$punkte | cut -c-20)
     538    spalte2=$punkte$queue
     539    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     540    spalte1=$(echo memory$punkte | cut -c-20)
     541    spalte2="$punkte$memory mb"
     542    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     543    spalte1=$(echo cputime$punkte | cut -c-20)
     544    spalte2="$punkte$cputime sec"
     545    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
     546    spalte1=$(echo job_name$punkte | cut -c-20)
     547    spalte2="$punkte$job_name"
     548    printf "| %-20s%40s | \n" "$spalte1" "${spalte2: -40}"
    542549    printf "#--------------------------------------------------------------# \n\n"
    543550
     
    15771584       then
    15781585          chmod  u+x  $job_on_remhost
    1579           echo "$submcom  $job_on_remhost"
    15801586          eval  $submcom  $job_on_remhost
    15811587       elif [[ $local_host = nech ]]
Note: See TracChangeset for help on using the changeset viewer.