Changeset 2639 for palm/trunk
- Timestamp:
- Nov 23, 2017 1:09:53 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmrun
r2638 r2639 535 535 # LINE DEFINES FILE CONNECTION. READ THE FILE ATTRIBUTES. 536 536 # s2a: in/out - field 537 # s2b: action - field (optional) 537 # s2b: loc - field (optional) 538 # s2c: tr/ar - field (optional) 538 539 s1=`echo $line | cut -d" " -f1` 539 540 s2=`echo $line | cut -d" " -s -f2` 540 #s2a=$(echo $s2 | cut -d":" -f1)541 s2a=$(echo $s2 | cut -d":" -f1) 541 542 if [[ $(echo $s2 | grep -c ":") = 0 ]] 542 543 then 543 s2a=$s2544 544 s2b="" 545 s2c="" 545 546 else 546 s2 a=`echo $s2 | cut -d":" -f1`547 s2 b=`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'` 548 549 fi 549 550 s3=`echo $line | cut -d" " -f3` … … 557 558 # VARIABLE S3 MAY CONTAIN A LIST OF ACTIVATION STRINGS (FIELD-SEPERATOR ":"). 558 559 # 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 CONNECTION560 # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b = loc), THE FILE CONNECTION 560 561 # IS NOT CHECKED AND STORED. 561 562 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 ) ) ]] 563 564 then 564 565 found=false … … 573 574 then 574 575 (( 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; 576 577 pathin_pre[$iin]=$s4; endin_pre[$iin]=$s5; extin_pre[$iin]=$s6 577 if [[ "$s2a" = inopt ]]578 then579 optin_pre[$iin]=yes580 else581 optin_pre[$iin]=no582 fi583 578 584 579 # FILES WITH JOB-ATTRIBUTE ARE STORED IN THE SOURCES_FOR_RUN 585 580 # 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 ) ]] 587 582 then 588 583 pathin_pre[$iin]=${fast_io_catalog}/${sources_for_run_catalog} … … 593 588 if [[ "${s5: -1}" = "*" ]] 594 589 then 595 if [[ "$s2 b" = "di" ]]590 if [[ "$s2c" = "di" ]] 596 591 then 597 592 printf "\n +++ wildcards (*) not allowed with \"di\" file attribute." … … 607 602 fi 608 603 fi 609 elif [[ "$s2a" = out && ! ( $create_remote_batch_job = true ) ]]604 elif [[ "$s2a" = out && ! ( $create_remote_batch_job = true && "$s2b" = loc ) ]] 610 605 then 611 606 found=false … … 620 615 then 621 616 (( iout = iout + 1 )) 622 localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2 b; typeout_pre[$iout]=$s3;617 localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2c; typeout_pre[$iout]=$s3; 623 618 pathout_pre[$iout]=$s4; endout_pre[$iout]=$s5; extout_pre[$iout]=$s6 624 619 … … 627 622 if [[ "${s1: -1}" = "*" ]] 628 623 then 629 if [[ "$s2 b" = "di" ]]624 if [[ "$s2c" = "di" ]] 630 625 then 631 626 printf "\n +++ wildcards (*) not allowed with \"di\" file attribute." … … 641 636 fi 642 637 fi 643 elif [[ "$s2a" != in && "$s2a" != inopt && "$s2a" !=out ]]644 then 645 printf "\n +++ I/O-attribute in file $fileconnection_file hasinvalid"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!" 647 642 locat=connect; exit 648 643 fi … … 1029 1024 then 1030 1025 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" ]] 1033 1028 then 1034 1029 printf "\n\n +++ INPUT-file: " … … 1044 1039 (( nr_of_input_files = nr_of_input_files + 1 )) 1045 1040 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]}" 1050 1043 pathin[$nr_of_input_files]="${pathin_pre[$i]}" 1051 1044 endin[$nr_of_input_files]="${endin_pre[$i]}" … … 1135 1128 (( nr_of_input_files = nr_of_input_files + 1 )) 1136 1129 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]}" 1139 1131 actionin[$nr_of_input_files]="${actionin_pre[$i]}" 1140 1132 pathin[$nr_of_input_files]="${pathin_pre[$i]}" … … 1763 1755 1764 1756 1765 # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH TRANSFER-ATTRIBUT1766 # WILLBE COPIED TO THE REMOTE HOST1757 # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH JOB-ATTRIBUT WILL 1758 # BE COPIED TO THE REMOTE HOST 1767 1759 if [[ $create_remote_batch_job = true ]] 1768 1760 then … … 1771 1763 do 1772 1764 (( i = i + 1 )) 1773 if [[ "${ actionin[$i]}" = tr]]1765 if [[ "${transin[$i]}" = job || "${transin[$i]}" = jobopt ]] 1774 1766 then 1775 1767 eval inputfile=${pathin[$i]}/${frelin[$i]} … … 1821 1813 1822 1814 # SKIP OPTIONAL FILES, IF THEY DO NOT EXIST 1823 if [[ "${ actionin[$i]}" = unavailable ]]1815 if [[ "${transin[$i]}" = unavailable ]] 1824 1816 then 1825 1817 if [[ "${extin[$i]}" = "" || "${extin[$i]}" = " " ]] … … 1895 1887 1896 1888 # 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" ]] 1898 1890 then 1899 1891 … … 1970 1962 printf "\n --- WARNING: ln failed, using cp instead (might be time consuming...)" 1971 1963 fi 1972 if [[ $running_on_remote = true && "${actionin[$i]}" = tr]]1964 if [[ $running_on_remote = true && ( "${transin[$i]}" = job || "${transin[$i]}" = jobopt ) ]] 1973 1965 then 1974 1966 mv ${absnamein[$i]} ${localin[$i]}
Note: See TracChangeset
for help on using the changeset viewer.