Changeset 2639 for palm/trunk/SCRIPTS


Ignore:
Timestamp:
Nov 23, 2017 1:09:53 PM (4 years ago)
Author:
raasch
Message:

bugfix for r2638: switchback to palmrun r2636

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmrun

    r2638 r2639  
    535535          # LINE DEFINES FILE CONNECTION. READ THE FILE ATTRIBUTES.
    536536          # s2a: in/out - field
    537           # s2b: action - field (optional)
     537          # s2b: loc    - field (optional)
     538          # s2c: tr/ar  - field (optional)
    538539       s1=`echo $line | cut -d" " -f1`
    539540       s2=`echo $line | cut -d" " -s -f2`
    540 #       s2a=$(echo $s2 | cut -d":" -f1)
     541       s2a=$(echo $s2 | cut -d":" -f1)
    541542       if [[ $(echo $s2 | grep -c ":") = 0 ]]
    542543       then
    543           s2a=$s2
    544544          s2b=""
     545          s2c=""
    545546       else
    546           s2a=`echo $s2 | cut -d":" -f1`
    547           s2b=`echo $s2 | cut -d":" -f2`
     547          s2b=`echo $s2 | cut -d":" -f2 | sed 's/:/ /g'`
     548          s2c=`echo $s2 | cut -d":" -s -f3 | sed 's/:/ /g'`
    548549       fi
    549550       s3=`echo $line | cut -d" " -f3`
     
    557558          # VARIABLE S3 MAY CONTAIN A LIST OF ACTIVATION STRINGS (FIELD-SEPERATOR ":").
    558559          # IF EXECUTION IS SCHEDULED FOR A REMOTE-MACHINE AND THE FILE IS ONLY
    559           # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b != tr), THE FILE CONNECTION
     560          # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b = loc), THE FILE CONNECTION
    560561          # IS NOT CHECKED AND STORED.
    561562       IFSALT="$IFS"; IFS="$IFS:"      # ADD ":" AS FIELD SEPARATOR
    562        if [[ ( "$s2a" = in  || "$s2a" = inopt )  &&  ! ( $create_remote_batch_job = true  &&  "$s2b" != tr ) ]]
     563       if [[ "$s2a" = in  &&  ! ( $create_remote_batch_job = true  &&  ( "$s2b" = loc  ||  "$s2b" = locopt ) ) ]]
    563564       then
    564565          found=false
     
    573574          then
    574575             (( iin = iin + 1 ))
    575              localin_pre[$iin]=$s1; actionin_pre[$iin]=$s2b;
     576             localin_pre[$iin]=$s1; transin_pre[$iin]=$s2b; actionin_pre[$iin]=$s2c;
    576577             pathin_pre[$iin]=$s4; endin_pre[$iin]=$s5; extin_pre[$iin]=$s6
    577              if [[ "$s2a" = inopt ]]
    578              then
    579                 optin_pre[$iin]=yes
    580              else
    581                 optin_pre[$iin]=no
    582              fi
    583578
    584579                # FILES WITH JOB-ATTRIBUTE ARE STORED IN THE SOURCES_FOR_RUN
    585580                # FOLDER IF THE JOB IS RUNNING ON A REMOTE HOST
    586              if [[ $running_on_remote = true  &&  "$s2b" = tr ]]
     581             if [[ $running_on_remote = true  && ( "$s2b" = job  ||  "$s2b" = jobopt ) ]]
    587582             then
    588583                pathin_pre[$iin]=${fast_io_catalog}/${sources_for_run_catalog}
     
    593588             if [[ "${s5: -1}" = "*" ]]
    594589             then
    595                 if [[ "$s2b" = "di" ]]
     590                if [[ "$s2c" = "di" ]]
    596591                then
    597592                   printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
     
    607602             fi
    608603          fi
    609        elif [[ "$s2a" = out  &&  ! ( $create_remote_batch_job = true ) ]]
     604       elif [[ "$s2a" = out  &&  ! ( $create_remote_batch_job = true  &&  "$s2b" = loc ) ]]
    610605       then
    611606          found=false
     
    620615          then
    621616             (( iout = iout + 1 ))
    622              localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2b; typeout_pre[$iout]=$s3;
     617             localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2c; typeout_pre[$iout]=$s3;
    623618             pathout_pre[$iout]=$s4; endout_pre[$iout]=$s5; extout_pre[$iout]=$s6
    624619
     
    627622             if [[ "${s1: -1}" = "*" ]]
    628623             then
    629                 if [[ "$s2b" = "di" ]]
     624                if [[ "$s2c" = "di" ]]
    630625                then
    631626                   printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
     
    641636             fi
    642637          fi
    643        elif [[ "$s2a" != in  &&  "$s2a" != inopt  &&  "$s2a" != out ]]
    644        then
    645           printf "\n  +++ I/O-attribute in file $fileconnection_file has invalid"
    646           printf "\n      value \"$s2\". Only \"in\", \"inopt\", and \"out\" are allowed!"
     638       elif [[ "$s2a" != in  &&  "$s2a" != out ]]
     639       then
     640          printf "\n  +++ I/O-attribute in configuration file $config_file has the invalid"
     641          printf "\n      value \"$s2\". Only \"in\" and \"out\" are allowed!"
    647642          locat=connect; exit
    648643       fi
     
    10291024    then
    10301025
    1031           # FILES WITH ATTRIBUTE opt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
    1032        if [[ "${optin_pre[$i]}" != "yes" ]]
     1026          # FILES WITH ATTRIBUTE locopt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
     1027       if [[ "${transin_pre[$i]}" != "locopt"  &&  "${transin_pre[$i]}" != "jobopt" ]]
    10331028       then
    10341029          printf "\n\n  +++ INPUT-file: "
     
    10441039          (( nr_of_input_files = nr_of_input_files + 1 ))
    10451040          localin[$nr_of_input_files]="${localin_pre[$i]}"
    1046           optin[$nr_of_input_files]="${optin_pre[$i]}"
    1047 #          transin[$nr_of_input_files]="unavailable"
    1048 #          actionin[$nr_of_input_files]="${actionin_pre[$i]}"
    1049           actionin[$nr_of_input_files]="unavailable"
     1041          transin[$nr_of_input_files]="unavailable"
     1042          actionin[$nr_of_input_files]="${actionin_pre[$i]}"
    10501043          pathin[$nr_of_input_files]="${pathin_pre[$i]}"
    10511044          endin[$nr_of_input_files]="${endin_pre[$i]}"
     
    11351128          (( nr_of_input_files = nr_of_input_files + 1 ))
    11361129          localin[$nr_of_input_files]="${localin_pre[$i]}"$ending
    1137           optin[$nr_of_input_files]="${optin_pre[$i]}"
    1138 #          transin[$nr_of_input_files]="${transin_pre[$i]}"
     1130          transin[$nr_of_input_files]="${transin_pre[$i]}"
    11391131          actionin[$nr_of_input_files]="${actionin_pre[$i]}"
    11401132          pathin[$nr_of_input_files]="${pathin_pre[$i]}"
     
    17631755
    17641756
    1765     # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH TRANSFER-ATTRIBUT
    1766     # WILL BE COPIED TO THE REMOTE HOST
     1757    # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH JOB-ATTRIBUT WILL
     1758    # BE COPIED TO THE REMOTE HOST
    17671759 if [[ $create_remote_batch_job = true ]]
    17681760 then
     
    17711763    do
    17721764       (( i = i + 1 ))
    1773        if [[ "${actionin[$i]}" = tr ]]
     1765       if [[ "${transin[$i]}" = job  ||  "${transin[$i]}" = jobopt ]]
    17741766       then
    17751767          eval inputfile=${pathin[$i]}/${frelin[$i]}
     
    18211813
    18221814          # SKIP OPTIONAL FILES, IF THEY DO NOT EXIST
    1823        if [[ "${actionin[$i]}" = unavailable ]]
     1815       if [[ "${transin[$i]}" = unavailable ]]
    18241816       then
    18251817          if [[ "${extin[$i]}" = ""  ||  "${extin[$i]}" = " " ]]
     
    18951887
    18961888          # FILE IS STORED IN THE RESPECTIVE DIRECTORY GIVEN IN THE CONFIGURATION FILE
    1897        if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "tr"  ||  "${actionin[$i]}" = "npe" ]]
     1889       if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "npe" ]]
    18981890       then
    18991891
     
    19701962                      printf "\n  --- WARNING: ln failed, using cp instead (might be time consuming...)"
    19711963                                 fi
    1972                    if [[ $running_on_remote = true  &&  "${actionin[$i]}" = tr ]]
     1964                   if [[ $running_on_remote = true  &&  ( "${transin[$i]}" = job  ||  "${transin[$i]}" = jobopt ) ]]
    19731965                   then
    19741966                      mv  ${absnamein[$i]}  ${localin[$i]}
Note: See TracChangeset for help on using the changeset viewer.