Ignore:
Timestamp:
Mar 8, 2011 8:27:49 AM (13 years ago)
Author:
raasch
Message:

New:
---
adjustments for ibmkisti (pres, batch_scp, mbuild, mrun, subjob)

new default configuration files .mrun.config.yonsei2011 and .config_block_for_ibmkisti

Changed:


Errors:


bugfix: weighting coefficient added to ibm branch (pres)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/batch_scp

    r306 r693  
    4545     # 25/10/05 - Siggi - put of catalogs realized
    4646     # 27/04/09 - Marcus- use option -p for all scp calls
     47     # 08/03/11 - Siggi - adjustments for ibmkisti: this machine allows
     48     #                    outgoing ssh/scp connections only from the
     49     #                    interactive nodes (gaiad). All ssh/scp traffic is
     50     #                    done via this interactive node.
    4751
    4852
     
    6064 get=false
    6165 local_host=`hostname`
     66 local_user=$USER
     67 local_wdir=`pwd`
    6268 locat=normal
    6369 make_catalog=false
     
    286292
    287293    # VERZEICHNISLSTE DES ZIELRECHNERS ERSTELLEN
    288  ssh $1 -l $remote_user "cd $3; ls -1; echo '*** list complete'" > $filelist  2>&1
     294 if [[ $(echo $local_host | cut -c1-4) = gaia ]]
     295 then
     296    ssh $local_user@gaiad "ssh $1 -l $remote_user \"cd $3; ls -1; echo '*** list complete'\" "  > $filelist  2>&1
     297 else
     298    ssh $1 -l $remote_user "cd $3; ls -1; echo '*** list complete'" > $filelist  2>&1
     299 fi
    289300 ssh_status=$?
    290301
     
    491502 then
    492503    rm -rf $filelist
    493     ssh $1 -l $remote_user "cd $3" > $filelist
     504    if [[ $(echo $local_host | cut -c1-4) = gaia ]]
     505    then
     506       ssh $local_user@gaiad "ssh $1 -l $remote_user \"cd $3\" " > $filelist
     507    else
     508       ssh $1 -l $remote_user "cd $3" > $filelist
     509    fi
    494510    if [[ $? != 0 ]]
    495511    then
     
    542558                scp -p -r -q -v $2 $remote_user@$1:$catalog_name$4$zyklusnr
    543559             fi
     560          elif [[ $(echo $local_host | cut -c1-4) = gaia ]]
     561          then
     562             if [[ $catalog_copy = false ]]
     563             then
     564                ssh $local_user@gaiad "cd $local_wdir; scp -p $2 $remote_user@$1:$catalog_name$4$zyklusnr"  > /dev/null
     565             else
     566                ssh $local_user@gaiad "cd $local_wdir; scp -p -r $2 $remote_user@$1:$catalog_name$4$zyklusnr"  > /dev/null
     567             fi
    544568          else
    545569             if [[ $catalog_copy = false ]]
     
    559583             local_size=`echo $local_size | cut -d" " -f5`
    560584
    561              remote_size=`ssh $1 -l $remote_user "ls -al $catalog_name$4$zyklusnr"`
     585             if  [[ $(echo $local_host | cut -c1-4) = gaia ]]
     586             then
     587                remote_size=`ssh $local_user@gaiad "ssh $1 -l $remote_user \"ls -al $catalog_name$4$zyklusnr\" "`
     588             else
     589                remote_size=`ssh $1 -l $remote_user "ls -al $catalog_name$4$zyklusnr"`
     590             fi
    562591             remote_size=`echo $remote_size | cut -d" " -f5`
    563592
     
    571600          fi
    572601       else
    573           scp -p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random  > /dev/null
     602          if [[ $(echo $local_host | cut -c1-4) = gaia ]]
     603          then
     604             ssh $local_user@gaiad "cd $local_wdir; scp -p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random"  > /dev/null
     605          else
     606             scp -p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random  > /dev/null
     607          fi
    574608          if [[ $? != 0 ]]
    575609          then
     
    579613             local_size=`echo $local_size | cut -d" " -f5`
    580614
    581              remote_size=`ssh $1 -l $remote_user "ls -al ${catalog_name}batch_scp_append_file.$random"`
     615             if  [[ $(echo $local_host | cut -c1-4) = gaia ]]
     616             then
     617                remote_size=`ssh $local_user@gaiad "ssh $1 -l $remote_user \"ls -al ${catalog_name}batch_scp_append_file.$random\" "`
     618             else
     619                remote_size=`ssh $1 -l $remote_user "ls -al ${catalog_name}batch_scp_append_file.$random"`
     620             fi
    582621             remote_size=`echo $remote_size | cut -d" " -f5`
    583622
     
    593632          rm  $filelist
    594633
    595           ssh $1 -l $remote_user "cd $3; cat batch_scp_append_file.$random >> $4$zyklusnr; rm batch_scp_append_file.$random; echo '*** append complete'" > $filelist
     634          if  [[ $(echo $local_host | cut -c1-4) = gaia ]]
     635          then
     636             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'\" " > $filelist
     637          else
     638             ssh $1 -l $remote_user "cd $3; cat batch_scp_append_file.$random >> $4$zyklusnr; rm batch_scp_append_file.$random; echo '*** append complete'" > $filelist
     639          fi
    596640          if [[ $? != 0 ]]
    597641          then
     
    608652       fi
    609653    else
    610        ssh $1 -l $remote_user "mkdir -p $3"
     654       if  [[ $(echo $local_host | cut -c1-4) = gaia ]]
     655       then
     656          ssh $local_user@gaiad "ssh $1 -l $remote_user \"mkdir -p $3\" "
     657       else
     658          ssh $1 -l $remote_user "mkdir -p $3"
     659       fi
    611660       if [[ $? != 0 ]]
    612661       then
    613662          locat=ssh_failed_4; exit
    614663       fi
    615        scp -p $2 $remote_user@$1:$catalog_name$4$zyklusnr  > /dev/null
     664       if  [[ $(echo $local_host | cut -c1-4) = gaia ]]
     665       then
     666          ssh $local_user@gaiad "cd $local_wdir; scp -p $2 $remote_user@$1:$catalog_name$4$zyklusnr"  > /dev/null
     667       else
     668          scp -p $2 $remote_user@$1:$catalog_name$4$zyklusnr  > /dev/null
     669       fi
    616670       if [[ $? != 0 ]]
    617671       then
     
    632686       else
    633687
    634           scp -p $remote_user@$1:$catalog_name$4$zyklusnr $2  > /dev/null
     688          if  [[ $(echo $local_host | cut -c1-4) = gaia ]]
     689          then
     690             ssh $local_user@gaiad "cd $local_wdir; scp -p $remote_user@$1:$catalog_name$4$zyklusnr $2"  > /dev/null
     691          else
     692             scp -p $remote_user@$1:$catalog_name$4$zyklusnr $2  > /dev/null
     693          fi
    635694          if [[ $? != 0 ]]
    636695          then
Note: See TracChangeset for help on using the changeset viewer.