Changeset 1094
- Timestamp:
- Feb 3, 2013 1:52:12 AM (12 years ago)
- Location:
- palm/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/batch_scp
r1091 r1094 22 22 # Current revisions: 23 23 # ------------------ 24 # 24 # new option -P for explicit setting of ssh/scp port 25 25 # 26 26 # Former revisions: … … 104 104 105 105 # SHELLSCRIPT-OPTIONEN EINLESEN 106 while getopts :aAbcCdgmno qsu:w: option106 while getopts :aAbcCdgmnoP:qsu:w: option 107 107 do 108 108 case $option in … … 117 117 (n) print_local_filename=true;; # Option ist nicht dokumentiert ! 118 118 (o) overwrite=true;; 119 (P) scp_port=$OPTARG;; 119 120 (q) quote_wait=true;; 120 121 (s) silent=true;; … … 243 244 244 245 246 # Set port number option for calls of ssh/scp, subjob and batch_scp scripts 247 if [[ "$scp_port" != "" ]] 248 then 249 PORTOPT="-P $scp_port" 250 SSH_PORTOPT="-p $scp_port" 251 fi 252 253 245 254 # PRUEFEN, OB LOKALE DATEI/LOKALES VERZEICHNIS VORHANDEN BZW. NICHT VORHANDEN 246 255 if [[ $get = false ]] … … 300 309 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 301 310 then 302 ssh $ local_user@gaiad "ssh$1 -l $remote_user \"cd $3; ls -1; echo '*** list complete'\" " > $filelist 2>&1311 ssh $SSH_PORTOPT $local_user@gaiad "ssh $SSH_PORTOPT $1 -l $remote_user \"cd $3; ls -1; echo '*** list complete'\" " > $filelist 2>&1 303 312 else 304 ssh -p 22$1 -l $remote_user "cd $3; ls -1; echo '*** list complete'" > $filelist 2>&1313 ssh $SSH_PORTOPT $1 -l $remote_user "cd $3; ls -1; echo '*** list complete'" > $filelist 2>&1 305 314 fi 306 315 ssh_status=$? … … 510 519 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 511 520 then 512 ssh $ local_user@gaiad "ssh $1 -l $remote_user \"cd $3\" " > $filelist521 ssh $SSH_PORTOPT $local_user@gaiad "ssh $1 -l $remote_user \"cd $3\" " > $filelist 513 522 else 514 ssh $ 1 -p 22-l $remote_user "cd $3" > $filelist523 ssh $SSH_PORTOPT $1 -l $remote_user "cd $3" > $filelist 515 524 fi 516 525 if [[ $? != 0 ]] … … 560 569 if [[ $catalog_copy = false ]] 561 570 then 562 scp -p -q -v $2 $remote_user@$1:$catalog_name$4$zyklusnr571 scp $PORTOPT -p -q -v $2 $remote_user@$1:$catalog_name$4$zyklusnr 563 572 else 564 scp -p -r -q -v $2 $remote_user@$1:$catalog_name$4$zyklusnr573 scp $PORTOPT -p -r -q -v $2 $remote_user@$1:$catalog_name$4$zyklusnr 565 574 fi 566 575 elif [[ $(echo $local_host | cut -c1-4) = gaia ]] … … 568 577 if [[ $catalog_copy = false ]] 569 578 then 570 ssh $ local_user@gaiad "cd $local_wdir; scp-p $2 $remote_user@$1:$catalog_name$4$zyklusnr" > /dev/null579 ssh $SSH_PORTOPT $local_user@gaiad "cd $local_wdir; scp $PORTOPT -p $2 $remote_user@$1:$catalog_name$4$zyklusnr" > /dev/null 571 580 else 572 ssh $ local_user@gaiad "cd $local_wdir; scp-p -r $2 $remote_user@$1:$catalog_name$4$zyklusnr" > /dev/null581 ssh $SSH_PORTOPT $local_user@gaiad "cd $local_wdir; scp $PORTOPT -p -r $2 $remote_user@$1:$catalog_name$4$zyklusnr" > /dev/null 573 582 fi 574 583 else 575 584 if [[ $catalog_copy = false ]] 576 585 then 577 scp -P 22-p $2 $remote_user@$1:$catalog_name$4$zyklusnr > /dev/null586 scp $PORTOPT -p $2 $remote_user@$1:$catalog_name$4$zyklusnr > /dev/null 578 587 else 579 scp -P 22-p -r $2 $remote_user@$1:$catalog_name$4$zyklusnr > /dev/null588 scp $PORTOPT -p -r $2 $remote_user@$1:$catalog_name$4$zyklusnr > /dev/null 580 589 fi 581 590 fi … … 591 600 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 592 601 then 593 remote_size=`ssh $ local_user@gaiad "ssh$1 -l $remote_user \"ls -al $catalog_name$4$zyklusnr\" "`602 remote_size=`ssh $SSH_PORTOPT $local_user@gaiad "ssh $SSH_PORTOPT $1 -l $remote_user \"ls -al $catalog_name$4$zyklusnr\" "` 594 603 else 595 remote_size=`ssh $ 1 -p 22-l $remote_user "ls -al $catalog_name$4$zyklusnr"`604 remote_size=`ssh $SSH_PORTOPT $1 -l $remote_user "ls -al $catalog_name$4$zyklusnr"` 596 605 fi 597 606 remote_size=`echo $remote_size | cut -d" " -f5` … … 608 617 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 609 618 then 610 ssh $ local_user@gaiad "cd $local_wdir; scp-p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random" > /dev/null619 ssh $SSH_PORTOPT $local_user@gaiad "cd $local_wdir; scp $PORTOPT -p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random" > /dev/null 611 620 else 612 scp -P 22-p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random > /dev/null621 scp $PORTOPT -p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random > /dev/null 613 622 fi 614 623 if [[ $? != 0 ]] … … 621 630 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 622 631 then 623 remote_size=`ssh $ local_user@gaiad "ssh$1 -l $remote_user \"ls -al ${catalog_name}batch_scp_append_file.$random\" "`632 remote_size=`ssh $SSH_PORTOPT $local_user@gaiad "ssh $SSH_PORTOPT $1 -l $remote_user \"ls -al ${catalog_name}batch_scp_append_file.$random\" "` 624 633 else 625 remote_size=`ssh $ 1 -p 22-l $remote_user "ls -al ${catalog_name}batch_scp_append_file.$random"`634 remote_size=`ssh $SSH_PORTOPT $1 -l $remote_user "ls -al ${catalog_name}batch_scp_append_file.$random"` 626 635 fi 627 636 remote_size=`echo $remote_size | cut -d" " -f5` … … 640 649 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 641 650 then 642 ssh $ local_user@gaiad "ssh$1 -l $remote_user \"cd $3; cat batch_scp_append_file.$random >> $4$zyklusnr; rm batch_scp_append_file.$random; echo '*** append complete'\" " > $filelist651 ssh $SSH_PORTOPT $local_user@gaiad "ssh $SSH_PORTOPT $1 -l $remote_user \"cd $3; cat batch_scp_append_file.$random >> $4$zyklusnr; rm batch_scp_append_file.$random; echo '*** append complete'\" " > $filelist 643 652 else 644 ssh $ 1 -p 22-l $remote_user "cd $3; cat batch_scp_append_file.$random >> $4$zyklusnr; rm batch_scp_append_file.$random; echo '*** append complete'" > $filelist653 ssh $SSH_PORTOPT $1 -l $remote_user "cd $3; cat batch_scp_append_file.$random >> $4$zyklusnr; rm batch_scp_append_file.$random; echo '*** append complete'" > $filelist 645 654 fi 646 655 if [[ $? != 0 ]] … … 660 669 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 661 670 then 662 ssh $ local_user@gaiad "ssh $1 -l $remote_user \"mkdir -p $3\" "663 else 664 ssh $ 1 -p 22-l $remote_user "mkdir -p $3"671 ssh $SSH_PORTOPT $local_user@gaiad "ssh $1 -l $remote_user \"mkdir -p $3\" " 672 else 673 ssh $SSH_PORTOPT $1 -l $remote_user "mkdir -p $3" 665 674 fi 666 675 if [[ $? != 0 ]] … … 670 679 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 671 680 then 672 ssh $ local_user@gaiad "cd $local_wdir; scp-p $2 $remote_user@$1:$catalog_name$4$zyklusnr" > /dev/null673 else 674 scp -P 22-p $2 $remote_user@$1:$catalog_name$4$zyklusnr > /dev/null681 ssh $SSH_PORTOPT $local_user@gaiad "cd $local_wdir; scp $PORTOPT -p $2 $remote_user@$1:$catalog_name$4$zyklusnr" > /dev/null 682 else 683 scp $PORTOPT -p $2 $remote_user@$1:$catalog_name$4$zyklusnr > /dev/null 675 684 fi 676 685 if [[ $? != 0 ]] … … 694 703 if [[ $(echo $local_host | cut -c1-4) = gaia ]] 695 704 then 696 ssh $ local_user@gaiad "cd $local_wdir; scp-p $remote_user@$1:$catalog_name$4$zyklusnr $2" > /dev/null705 ssh $SSH_PORTOPT $local_user@gaiad "cd $local_wdir; scp $PORTOPT -p $remote_user@$1:$catalog_name$4$zyklusnr $2" > /dev/null 697 706 else 698 scp -P 22-p $remote_user@$1:$catalog_name$4$zyklusnr $2 > /dev/null707 scp $PORTOPT -p $remote_user@$1:$catalog_name$4$zyklusnr $2 > /dev/null 699 708 fi 700 709 if [[ $? != 0 ]] -
palm/trunk/SCRIPTS/mrun
r1091 r1094 22 22 # Current revisions: 23 23 # ------------------ 24 # 24 # explicit ssh/scp port can be set in config file with environment variable 25 # scp_port. This port is handled to all ssh/scp/batch_scp calls. 25 26 # 26 27 # Former revisions: … … 1100 1101 1101 1102 1103 # Set port number option for calls of ssh/scp, subjob and batch_scp scripts 1104 if [[ "$scp_port" != "" ]] 1105 then 1106 PORTOPT="-P $scp_port" 1107 SSH_PORTOPT="-p $scp_port" 1108 fi 1109 1110 1102 1111 # FALLS NICHT VORGEGEBEN, DEFAULT-QUEUE AUF DER ZIELMASCHINE FESTLEGEN 1103 1112 if [[ $queue = none ]] … … 2741 2750 then 2742 2751 # init_cmds was ". /SX/opt/etc/initsx.sh;" 2743 ssh 136.172.44.192 -l $usern "$init_cmds $module_calls cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2752 ssh $SSH_PORTOPT 136.172.44.192 -l $usern "$init_cmds $module_calls cd \$HOME/work/${usern}.$kennung; sxmake $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2744 2753 cp $TEMPDIR_COMPILE/a.out . 2745 2754 [[ $? != 0 ]] && compile_error=true … … 2748 2757 then 2749 2758 printf " compiler is called via ssh on \"plogin1\" \n" 2750 ssh plogin1 -l $usern "$init_cmds export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2759 ssh $SSH_PORTOPT plogin1 -l $usern "$init_cmds export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2751 2760 [[ ! -f a.out ]] && compile_error=true 2752 2761 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN … … 2754 2763 then 2755 2764 printf " compiler is called via ssh on \"bicegate0\" \n" 2756 ssh bicegate0 -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2765 ssh $SSH_PORTOPT bicegate0 -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2757 2766 [[ ! -f a.out ]] && compile_error=true 2758 2767 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN … … 2760 2769 then 2761 2770 printf " compiler is called via ssh on \"hicegate0\" \n" 2762 ssh hicegate0 -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" 2>&1 "2771 ssh $SSH_PORTOPT hicegate0 -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" 2>&1 " 2763 2772 [[ ! -f a.out ]] && compile_error=true 2764 2773 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN … … 2766 2775 then 2767 2776 printf " compiler is called via ssh on \"flow\" \n" 2768 ssh flow02.hpc.uni-oldenburg.de -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" "2777 ssh $SSH_PORTOPT flow02.hpc.uni-oldenburg.de -l $usern "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$fopts\" LDFLAGS=\"$lopts\" " 2769 2778 [[ ! -f a.out ]] && compile_error=true 2770 2779 continue # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN … … 2971 2980 if [[ $localhost = lcsgih ]] 2972 2981 then 2973 ssh $ usern@hicedata.hlrn.de "cp $PERM/${frelin[$i]} $PWD"2982 ssh $SSH_PORTOPT $usern@hicedata.hlrn.de "cp $PERM/${frelin[$i]} $PWD" 2974 2983 else 2975 ssh $ usern@bicedata.hlrn.de "cp $PERM/${frelin[$i]} $PWD"2984 ssh $SSH_PORTOPT $usern@bicedata.hlrn.de "cp $PERM/${frelin[$i]} $PWD" 2976 2985 fi 2977 2986 else … … 2981 2990 if [[ $localhost = lcsgih ]] 2982 2991 then 2983 ssh $ usern@hicedata.hlrn.de "cd $PWD; tar xf $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"2992 ssh $SSH_PORTOPT $usern@hicedata.hlrn.de "cd $PWD; tar xf $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar" 2984 2993 else 2985 ssh $ usern@bicedata.hlrn.de "cd $PWD; tar xf $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"2994 ssh $SSH_PORTOPT $usern@bicedata.hlrn.de "cd $PWD; tar xf $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar" 2986 2995 fi 2987 2996 (( inode = inode + 1 )) … … 3940 3949 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst" 3941 3950 printf "\n or higher cycle\n" 3942 echo "batch_scp $ cps -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]}3951 echo "batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 3943 3952 3944 3953 echo "[[ \$? = 0 ]] && rm $file_to_transfer" >> transfer_${localout[$i]} … … 3946 3955 if [[ $localhost = nech ]] 3947 3956 then 3948 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 transfer_${localout[$i]}3957 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 $PORTOPT transfer_${localout[$i]} 3949 3958 else 3950 3959 if [[ "$LOGNAME" = b323013 ]] 3951 3960 then 3952 subjob -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog transfer_${localout[$i]}3961 subjob -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog $PORTOPT transfer_${localout[$i]} 3953 3962 else 3954 subjob -d -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog transfer_${localout[$i]}3963 subjob -d -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog $PORTOPT transfer_${localout[$i]} 3955 3964 fi 3956 3965 fi … … 3962 3971 printf "\n >>> OUTPUT: ${localout[$i]}$cst by SCP to" 3963 3972 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst\n" 3964 batch_scp $ cps -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]}3973 batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 3965 3974 [[ $? != 0 ]] && transfer_failed=true 3966 3975 … … 4015 4024 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}" 4016 4025 printf "\n or higher cycle\n" 4017 echo "batch_scp -A -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]}4026 echo "batch_scp $PORTOPT -A -b -m -u $return_username $return_addres $file_to_transfer \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]} ${extout[$i]}" >> transfer_${localout[$i]} 4018 4027 4019 4028 echo "[[ \$? = 0 ]] && rm $file_to_transfer" >> transfer_${localout[$i]} … … 4021 4030 if [[ $localhost = nech ]] 4022 4031 then 4023 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 transfer_${localout[$i]}4032 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 900 $PORTOPT transfer_${localout[$i]} 4024 4033 else 4025 4034 if [[ $LOGNAME = b323013 ]] 4026 4035 then 4027 subjob -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog transfer_${localout[$i]}4036 subjob -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog $PORTOPT transfer_${localout[$i]} 4028 4037 else 4029 subjob -d -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog transfer_${localout[$i]}4038 subjob -d -v -q c1 -X 0 -m 1000 -t 900 -c $job_catalog $PORTOPT transfer_${localout[$i]} 4030 4039 fi 4031 4040 fi … … 4037 4046 printf "\n >>> OUTPUT: ${localout[$i]} append by SCP to" 4038 4047 printf "\n ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n" 4039 batch_scp -A -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]}4048 batch_scp $PORTOPT -A -b -m -u $return_username $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]} ${extout[$i]} 4040 4049 [[ $? != 0 ]] && transfer_failed=true 4041 4050 … … 4215 4224 if [[ $localhost = lcsgih || $localhost = lcsgib ]] 4216 4225 then 4217 # subjob -d -v -q cdata -X 0 -m 1000 -t 43200 -c $job_catalog archive_${frelout[$i]}4218 subjob -v -q permq -X 1 -T 1 -m 1000 -t 172800 -c $job_catalog archive_${frelout[$i]}4226 # subjob -d -v -q cdata -X 0 -m 1000 -t 43200 -c $job_catalog $PORTOPT archive_${frelout[$i]} 4227 subjob -v -q permq -X 1 -T 1 -m 1000 -t 172800 -c $job_catalog $PORTOPT archive_${frelout[$i]} 4219 4228 elif [[ $localhost = nech ]] 4220 4229 then 4221 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 7200 archive_${frelout[$i]}4230 subjob -d -c /pf/b/$usern/job_queue -v -q pp -X 0 -m 1000 -t 7200 $PORTOPT archive_${frelout[$i]} 4222 4231 fi 4223 4232 printf " Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n" … … 4340 4349 fi 4341 4350 4342 subjob -v -d -q cdata -X 0 -m 1000 -t 43200 -c $job_catalog archive_${frelout[$i]}4351 subjob -v -d -q cdata -X 0 -m 1000 -t 43200 -c $job_catalog $PORTOPT archive_${frelout[$i]} 4343 4352 printf " Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n" 4344 4353 file_saved=true … … 4374 4383 fi 4375 4384 4376 subjob -v -c /pf/b/$usern/job_queue -d -q pp -X 0 -m 1000 -t 7200 archive_${frelout[$i]}4385 subjob -v -c /pf/b/$usern/job_queue -d -q pp -X 0 -m 1000 -t 7200 $PORTOPT archive_${frelout[$i]} 4377 4386 printf " Archiving of $tmp_data_catalog/${frelout[$i]} initiated (batch job submitted)\n" 4378 4387 file_saved=true … … 4527 4536 if [[ $(echo $return_addres | grep -c "130.75.105") = 1 ]] 4528 4537 then 4529 ssh $ return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;. /muksoft/packages/intel/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "4538 ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;. /muksoft/packages/intel/bin/compilervars.sh intel64;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc " 4530 4539 else 4531 4540 if [[ $localhost = ibmkisti ]] 4532 4541 then 4533 ssh $ usern@gaiad "ssh$return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "4542 ssh $SSH_PORTOPT $usern@gaiad "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" " 4534 4543 else 4535 ssh $ return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "4544 ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc " 4536 4545 fi 4537 4546 fi … … 4557 4566 if [[ $localhost = lcfimm ]] 4558 4567 then 4559 ssh $ return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "4568 ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc " 4560 4569 else 4561 4570 eval $mc # ' MUESSEN AUSGEWERTET WERDEN … … 4708 4717 if [[ $host != ibmkisti ]] 4709 4718 then 4710 echo "scp -r$return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname ." >> $jobfile4719 echo "scp $PORTOPT -r $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname ." >> $jobfile 4711 4720 else 4712 4721 # on KISTI's IBM firewall is only opened on interactive node 4713 4722 echo "localdir=\`pwd\`" >> $jobfile 4714 echo "ssh $ remote_username@gaiad \"cd \$localdir; scp-r $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" " >> $jobfile4723 echo "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" " >> $jobfile 4715 4724 fi 4716 4725 fi … … 4800 4809 echo "%END%" >> $jobfile 4801 4810 else 4802 echo "batch_scp -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >> $jobfile4811 echo "batch_scp $PORTOPT -b -o -g -s -u $return_username $return_addres ${remotepathin[$i]} \"${pathin[$i]}\" ${frelin[$i]}" >> $jobfile 4803 4812 fi 4804 4813 … … 4850 4859 fi 4851 4860 4852 subjob $job_on_file -h $host -u $remote_username -g $group_number -q $queue -m $memory -N $node_usage -t $cpumax $XOPT $TOPT $OOPT -n $fname -v -c $job_catalog -e $email_notification $ jobfile4861 subjob $job_on_file -h $host -u $remote_username -g $group_number -q $queue -m $memory -N $node_usage -t $cpumax $XOPT $TOPT $OOPT -n $fname -v -c $job_catalog -e $email_notification $PORTOPT $jobfile 4853 4862 rm -rf $jobfile 4854 4863 -
palm/trunk/SCRIPTS/subjob
r1091 r1094 23 23 # Current revisions: 24 24 # ------------------ 25 # 25 # new option -P for explicit setting of ssh/scp port 26 26 # 27 27 # Former revisions: … … 181 181 182 182 # PROZEDUROPTIONEN EINLESEN 183 while getopts :c:dDe:g:h:m:n:N:O: q:t:T:u:vX: option183 while getopts :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX: option 184 184 do 185 185 case $option in … … 194 194 (N) node_usage=$OPTARG;; 195 195 (O) threads_per_task=$OPTARG;; 196 (P) scp_port=$OPTARG;; 196 197 (q) no_default_queue=$OPTARG;; 197 198 (t) cputime=$OPTARG;; … … 226 227 printf "\n -n jobname <jobdatei>" 227 228 printf "\n -O threads per task (for OpenMP usage) 1" 229 printf "\n -P ssh/scp port default port" 228 230 printf "\n -q job-queue to be used default" 229 231 printf "\n -t allowed cpu-time in seconds ---" … … 478 480 fi 479 481 482 480 483 # Calculate number of processes per node 481 484 (( processes_per_node = tasks_per_node * threads_per_task )) 482 485 486 483 487 # Calculate number of MPI tasks 484 488 (( mpi_tasks = numprocs / threads_per_task )) 489 490 491 # Set port number option for calls of ssh/scp, subjob and batch_scp scripts 492 if [[ "$scp_port" != "" ]] 493 then 494 PORTOPT="-P $scp_port" 495 SSH_PORTOPT="-p $scp_port" 496 fi 485 497 486 498 … … 1207 1219 1208 1220 echo "echo \"set -x\" >> scpjob.$kennung" >> $job_to_send 1209 echo "echo \"batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \\\"$job_catalog\\\" $local_dayfile\" >> scpjob.$kennung" >> $job_to_send1221 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 1210 1222 if [[ $remote_host = ibmku ]] 1211 1223 then … … 1224 1236 echo "set -x" >> $job_to_send 1225 1237 echo "cd /pf/b/${remote_user}/job_queue" >> $job_to_send 1226 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1238 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1227 1239 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1228 1240 echo "%%END%%" >> $job_to_send … … 1236 1248 echo " " >> $job_to_send 1237 1249 echo "set -x" >> $job_to_send 1238 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1250 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1239 1251 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1240 1252 echo "%%END%%" >> $job_to_send … … 1253 1265 echo "export LANG=en_US.UTF-8" >> $job_to_send 1254 1266 echo "set -x" >> $job_to_send 1255 echo "batch_scp -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1267 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres $remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1256 1268 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1257 1269 echo "%%END%%" >> $job_to_send … … 1270 1282 echo ". /usr/share/modules/init/bash" >> $job_to_send 1271 1283 echo "set -x" >> $job_to_send 1272 echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send1284 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile" >> $job_to_send 1273 1285 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1274 1286 echo "%%END%%" >> $job_to_send … … 1295 1307 fi 1296 1308 echo "set -x" >> $job_to_send 1297 echo "batch_scp -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null" >> $job_to_send1309 echo "batch_scp $PORTOPT -d -w 10 -u $local_user $local_addres ${job_catalog}/$remote_dayfile \"$job_catalog\" $local_dayfile > /dev/null" >> $job_to_send 1298 1310 echo "[[ \"\$for_subjob_to_do\" != \"\" ]] && eval \$for_subjob_to_do" >> $job_to_send 1299 1311 echo "%%END%%" >> $job_to_send … … 1317 1329 then 1318 1330 echo "mv scpjob.$kennung $job_catalog" >> $job_to_send 1319 echo "ssh $ {remote_username}@${remote_addres} \"$submcom ${job_catalog}/scpjob.$kennung\" " >> $job_to_send1331 echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres} \"$submcom ${job_catalog}/scpjob.$kennung\" " >> $job_to_send 1320 1332 echo "rm ${job_catalog}/scpjob.$kennung" >> $job_to_send 1321 1333 elif [[ $remote_host = lckyut ]] 1322 1334 then 1323 echo "scp -P 22scpjob.$kennung ${remote_username}@${remote_addres}:job_queue" >> $job_to_send1324 echo "ssh -p 22${remote_username}@${remote_addres} \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" " >> $job_to_send1335 echo "scp $PORTOPT scpjob.$kennung ${remote_username}@${remote_addres}:job_queue" >> $job_to_send 1336 echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres} \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" " >> $job_to_send 1325 1337 else 1326 1338 echo "$submcom scpjob.$kennung" >> $job_to_send … … 1393 1405 # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE 1394 1406 # PASSWORT AB 1395 /bin/scp $ job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost1407 /bin/scp $PORTOPT $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 1396 1408 elif [[ $remote_host = nech ]] 1397 1409 then 1398 1410 # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ 1399 1411 # TRANSFERIERT WERDEN 1400 scp $ job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost1412 scp $PORTOPT $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost 1401 1413 else 1402 scp $ job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost1414 scp $PORTOPT $job_to_send ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost 1403 1415 fi 1404 1416 if [[ $? = 1 ]] … … 1426 1438 then 1427 1439 printf "\n >>> submit with HLRN qos-feature hiprio...\n" 1428 ssh $ remote_addres -l $remote_user "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"1440 ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost" 1429 1441 elif [[ $remote_host = ibmku ]] 1430 1442 then 1431 ssh $ remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost"1443 ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost" 1432 1444 else 1433 ssh $ remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"1445 ssh $SSH_PORTOPT $remote_addres -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" 1434 1446 fi 1435 1447 -
palm/trunk/UTIL/interpret_config.f90
r1047 r1094 19 19 ! 20 20 ! Current revisions: 21 ! ----------------- 21 ! ------------------ 22 ! unused variables removed 22 23 ! 23 24 ! Former revisions: … … 61 62 for_cond1, for_cond2, for_host, input_list, & 62 63 iolist, output_list, s1, s2, s2a, s2b, s2c, s3, & 63 s3cond, s4, s5, s6, value, va lue_mrun, var, zeile64 65 INTEGER :: dummy, i, icomment = 0, icond1, icond2, idatver = 0, iec = 0,&64 s3cond, s4, s5, s6, value, var, zeile 65 66 INTEGER :: i, icomment = 0, icond1, icond2, idatver = 0, iec = 0, & 66 67 ienvvar = 0, ifor_cond1, ifor_cond2, ifor_host, ihost, & 67 68 iic = 0, iicf, iin = 0, iinput_list, il, ilocalhost, ioc = 0, & … … 231 232 host = value(1:ivalue) 232 233 ihost = ivalue 233 234 ! IF ( host(1:ihost) /= localhost(1:ilocalhost) ) THEN235 !236 ! SELECT CASE ( value(1:ivalue) )237 !238 ! CASE ( 'cray','hpcs','t3d','t3eb','t3eh','unics','vpp' )239 !240 ! dummy = 1241 !242 ! CASE DEFAULT243 !244 ! WRITE (2,2202) bs, bs, value(1:ivalue), bs, bs245 ! 2202 FORMAT ('printf "',A,'n +++ Auf Zielrechner ',A,'"',A,A,'" ist kein NQS-System vorhanden"'/ &246 ! 'printf "',A,'n Programmlauf kann deshalb nicht gestartet werden"'/ &247 ! 'locat=nqs; exit')248 ! STOP249 !250 ! END SELECT251 !252 ! ENDIF253 234 254 235 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.