Changeset 1103 for palm/trunk/SCRIPTS/mrun
- Timestamp:
- Feb 20, 2013 2:15:53 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r1102 r1103 1 #!/bin/ bash1 #!/bin/ksh 2 2 3 3 # mrun - script for running PALM jobs … … 22 22 # Current revisions: 23 23 # ------------------ 24 # 24 # default script runs again under ksh, because of unsolved problems with read 25 # from stdin: when bash script is called from a ksh, message "read error: 0: 26 # Resource temporarily unavailable" appears and script does not stop, 27 # further bash compatibility adjustments, 28 # shebang line replaced by /bin/bash when running jobs on lckyuh; no restarts 29 # on lckyuh, but mrun does not terminate and issues a warning instead 25 30 # 26 31 # Former revisions: … … 151 156 if [[ `hostname` = rte10 ]] 152 157 then 153 return_addres=133.5.185.60154 echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"158 return_addres=133.5.185.60 159 echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!" 155 160 elif [[ `hostname` = climate0 ]] 156 161 then 157 return_addres=165.132.26.68158 echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"162 return_addres=165.132.26.68 163 echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!" 159 164 elif [[ `hostname` = urban00 ]] 160 165 then 161 return_addres=147.46.30.151162 echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!"166 return_addres=147.46.30.151 167 echo "+++ WARNING: fixed return_addres = $return_addres is used !!!!!" 163 168 else 164 169 return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}') … … 1494 1499 1495 1500 # QUELLTEXT-DATEI DARF KEINE PFADE BEINHALTEN 1496 if [[ $( print$filename | grep -c "/") != 0 ]]1501 if [[ $(echo $filename | grep -c "/") != 0 ]] 1497 1502 then 1498 1503 printf "\n +++ source code file: $filename" … … 2599 2604 fi 2600 2605 else 2601 printf "\n\n +++ skipping parameter file check due to following reason: $reason "2606 printf "\n\n +++ skipping parameter file check due to following reason: $reason \n" 2602 2607 fi 2603 2608 … … 4577 4582 then 4578 4583 ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc " 4584 elif [[ $localhost = lckyuh ]] 4585 then 4586 printf "\n +++ WARNING: no restart mechanism available for host \"$localhost\" " 4587 printf "\n please restart job manually using command:\n" 4588 printf "\n \"$mc\" " 4579 4589 else 4580 4590 eval $mc # ' MUESSEN AUSGEWERTET WERDEN … … 4582 4592 cd - > /dev/null 4583 4593 fi 4584 printf "\n$striche\n *** restart-run initiated \n" 4594 if [[ $localhost = lckyuh ]] 4595 then 4596 printf "\n$striche\n *** restart-run to be initiated manually\n" 4597 else 4598 printf "\n$striche\n *** restart-run initiated \n" 4599 fi 4585 4600 4586 4601 … … 4801 4816 # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN 4802 4817 echo "cat > $mrun_script_name <<\"%END%\"" >> $jobfile 4803 cat ${PALM_BIN}/$mrun_script_name >> $jobfile 4818 if [[ $host = lckyuh ]] 4819 then 4820 sed 's/\/bin\/ksh/\/bin\/bash/g' ${PALM_BIN}/$mrun_script_name >> $jobfile 4821 else 4822 cat ${PALM_BIN}/$mrun_script_name >> $jobfile 4823 fi 4804 4824 echo "%END%" >> $jobfile 4805 4825 echo "chmod u+x $mrun_script_name" >> $jobfile
Note: See TracChangeset
for help on using the changeset viewer.