Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 1242)
+++ palm/trunk/SCRIPTS/mrun	(revision 1255)
@@ -22,5 +22,5 @@
 # Current revisions:
 # ------------------
-#
+# further adjustments for lccrayb remote access
 #
 # Former revisions:
@@ -2827,5 +2827,7 @@
        cd -  > /dev/null
 
-       cp  SOURCES_FOR_RUN_$fname/*  $TEMPDIR_COMPILE
+          # DUE TO UNKNOWN REASONS, COPY WITH cp COMMAND CREATES CORRUPT
+          # FILES ON CRAY XC30 SYSTEMS (HLRN III), rsync IS USED INSTEAD
+       rsync -av -t  SOURCES_FOR_RUN_$fname/*  $TEMPDIR_COMPILE  >  /dev/null
 
     else
@@ -2920,5 +2922,5 @@
              [[ ! -f a.out ]]  &&  compile_error=true
              continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
-          elif [[ $localhost = lccrayf ]]
+          elif [[ $localhost = lccrayb  ||  $localhost = lccrayf ]]
           then
              make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
@@ -4121,5 +4123,10 @@
                    printf "\n  >>> OUTPUT: ${localout[$i]}$cst  by SCP to"
                    printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}$cst\n"
-                   batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                   if [[ $localhost = lccrayb ]]
+                   then
+                      ssh $usern@blogin1 "cd $TEMPDIR; batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                   else
+                      batch_scp $PORTOPT $cps -b -m -u $return_username $return_addres  ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                   fi
                    [[ $? != 0 ]]  &&  transfer_failed=true
 
@@ -4196,5 +4203,10 @@
                    printf "\n  >>> OUTPUT: ${localout[$i]}  append by SCP to"
                    printf "\n              ${pathout[$i]}/${localhost}_${fname}${endout[$i]}\n"
-                   batch_scp $PORTOPT -A -b -m -u $return_username  $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                   if [[ $localhost = lccrayb ]]
+                   then
+                      ssh $usern@blogin1 "cd $TEMPDIR; batch_scp $PORTOPT -A -b -m -u $return_username $return_addres  ${localout[$i]} \"${pathout[$i]}\" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}"
+                   else
+                      batch_scp $PORTOPT -A -b -m -u $return_username  $return_addres ${localout[$i]} "${pathout[$i]}" ${localhost}_${fname}${endout[$i]}  ${extout[$i]}
+                   fi
                    [[ $? != 0 ]]  &&  transfer_failed=true
 
@@ -4679,5 +4691,5 @@
           then
 
-             if [[ $localhost = lcsgih  ||  $localhost = lcsgib  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
+             if [[ $localhost = lcsgih  ||  $localhost = lccrayb  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
              then
                 echo "*** ssh will be used to initiate restart-runs!"
@@ -4689,4 +4701,7 @@
                    then
                       ssh $SSH_PORTOPT $usern@136.172.40.15 "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\" "
+                   elif [[ $localhost = lccrayb ]]
+                   then
+                      ssh $usern@blogin1 "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\" "
                    else
                       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 "
@@ -4696,11 +4711,12 @@
                    then
                       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\" "
+                   elif [[ $localhost = lcflow ]]
+                   then
+                      /usr/bin/ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
+                   elif [[ $localhost = lccrayb ]]
+                   then
+                      ssh $usern@blogin1 "ssh $SSH_PORTOPT $return_addres -l $return_username \"PATH=\\\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc\" "
                    else
-                      if [[ $localhost = lcflow ]]
-                      then
-                         /usr/bin/ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
-                      else
-                         ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
-                      fi
+                      ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
                    fi
                 fi
@@ -4925,14 +4941,18 @@
              # DUE TO UNKNOWN REASONS, COPY WITH cp COMMAND CREATES CORRUPT
              # FILES ON CRAY XC30 SYSTEMS (CSC HELSINKI), rsync IS USED INSTEAD
-          echo  "rsync -ae -t  $working_directory/SOURCES_FOR_RUN_$fname  ."  >>  $jobfile
+          echo  "rsync -av -t  $working_directory/SOURCES_FOR_RUN_$fname  ."  >>  $jobfile
 
        else
-          if [[ $host != ibmkisti ]]
-          then
-             echo  "scp $PORTOPT -r $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname ."  >>  $jobfile
-          else
+          if [[ $host = ibmkisti ]]
+          then
                 # on KISTI's IBM firewall is only opened on interactive node
              echo  "localdir=\`pwd\`"                            >>  $jobfile
              echo  "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
+          elif [[ $host = lccrayb ]]
+          then
+             echo  "localdir=\`pwd\`"                            >>  $jobfile
+             echo  "ssh $SSH_PORTOPT $remote_username@blogin1 \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
+          else
+             echo  "scp $PORTOPT -r $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname ."  >>  $jobfile
           fi
        fi
