Index: palm/trunk/SCRIPTS/palmrun
===================================================================
--- palm/trunk/SCRIPTS/palmrun	(revision 2799)
+++ palm/trunk/SCRIPTS/palmrun	(revision 2834)
@@ -27,4 +27,7 @@
 # -----------------
 # $Id: palmrun 2718 2018-01-02 08:49:38Z maronga $
+# "fname" renamed to "jobname"
+# 
+# 2718 2018-01-02 08:49:38Z maronga
 # parameters are allowed in output commands (OC:)
 # 
@@ -152,5 +155,5 @@
  execution_error=false
  fileconnection_file=trunk/SCRIPTS/.palm.iofiles
- fname=test
+ jobname=test
  global_revision=""
  host_configuration="default"
@@ -238,5 +241,5 @@
        (B)   delete_temporary_catalog=false; prc="$prc -B";;
        (C)   restart_run=true; prc="$prc -C";;
-       (d)   fname=$OPTARG; prc="$prc -d$OPTARG";;
+       (d)   jobname=$OPTARG; prc="$prc -d$OPTARG";;
        (F)   create_jobfile_only=true;;
        (G)   global_revision=$OPTARG; prc="$prc -G'$OPTARG'";;
@@ -330,7 +333,11 @@
 
 
+    # FOR COMPATIBILITY REASONS SET OLD ENVIRONMENT VARIABLE
+ export fname=$jobname
+
+
     # BUILD THE CONFIGURATION-FILE NAME AND THE SOURCES_FOR_RUN-FOLDER NAME
  config_file=.palm.config.$host_configuration
- sources_for_run_catalog=SOURCES_FOR_RUN_${host_configuration}_$fname
+ sources_for_run_catalog=SOURCES_FOR_RUN_${host_configuration}_$jobname
 
 
@@ -1068,5 +1075,5 @@
        eval filename=${pathin_pre[$i]}/${endin_pre[$i]}
     else
-       eval filename=${pathin_pre[$i]}/${fname}${endin_pre[$i]}
+       eval filename=${pathin_pre[$i]}/${jobname}${endin_pre[$i]}
     fi
 
@@ -1100,5 +1107,5 @@
     else
 
-          # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME BASENAME ($fname) AND
+          # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME BASENAME ($jobname) AND
           # CREATE A LIST FOR THE DETECTED BASENAME ENDINGS
        if [[ "${multin[$i]}" = true ]]
@@ -1129,7 +1136,7 @@
               fi
 
-                 # remove the fname from the beginning
-              length_fname=${#fname}
-              ending=${basefilename:${length_fname}}
+                 # remove the jobname from the beginning
+              length_jobname=${#jobname}
+              ending=${basefilename:${length_jobname}}
 
                  # remove the ending given in the .iofiles from the beginning
@@ -1193,5 +1200,5 @@
              eval filename=${pathin[$nr_of_input_files]}/${endin[$nr_of_input_files]}
           else
-             eval filename=${pathin[$nr_of_input_files]}/${fname}${endin[$nr_of_input_files]}
+             eval filename=${pathin[$nr_of_input_files]}/${jobname}${endin[$nr_of_input_files]}
           fi
 
@@ -1273,5 +1280,5 @@
                 frelin[$nr_of_input_files]=${endin[$nr_of_input_files]}.$cyclestring
              else
-                frelin[$nr_of_input_files]=${fname}${endin[$nr_of_input_files]}.$cyclestring
+                frelin[$nr_of_input_files]=${jobname}${endin[$nr_of_input_files]}.$cyclestring
              fi
           else
@@ -1280,5 +1287,5 @@
                 frelin[$nr_of_input_files]=${endin[$nr_of_input_files]}
              else
-                frelin[$nr_of_input_files]=${fname}${endin[$nr_of_input_files]}
+                frelin[$nr_of_input_files]=${jobname}${endin[$nr_of_input_files]}
              fi
           fi
@@ -1314,5 +1321,5 @@
        fi
        (( maxcycle = 0 ))
-       eval filename=${pathout_pre[$i]}/${fname}${endout_pre[$i]}
+       eval filename=${pathout_pre[$i]}/${jobname}${endout_pre[$i]}
        eval catalogname=${pathout_pre[$i]}
        if ! ls $filename* 1>/dev/null 2>&1
@@ -1361,5 +1368,5 @@
  then
     run_id=$RANDOM
-    job_id=${fname}.$run_id
+    job_id=${jobname}.$run_id
 
     tempdir=$fast_io_catalog/$job_id
@@ -1605,5 +1612,5 @@
  fi
  printf "|                                                                        | \n"
- column1="base name of files:"; column2=$fname
+ column1="base name of files:"; column2=$jobname
  printf "| %-25s%-45s | \n" "$column1" "$column2"
  column1="activation string list:"; column2=$(echo $activation_string_list)
@@ -1788,5 +1795,5 @@
 
        # NOW CREATE THE SOURCES_FOR_RUN FOLDER
-    palmbuild  -v  $use_existing_sources_folder  -h $host_configuration  -d $fname
+    palmbuild  -v  $use_existing_sources_folder  -h $host_configuration  -d $jobname
 
     if [[ $? != 0 ]]
@@ -2053,5 +2060,5 @@
        # (FILE ENVPAR WILL BE READ BY PALM)
     cat  >  ENVPAR  <<  EOF
- &envpar  run_identifier = '$fname', host = '$host_configuration',
+ &envpar  run_identifier = '$jobname', host = '$host_configuration',
           write_binary = .${write_binary}., tasks_per_node = $tasks_per_node,
           maximum_parallel_io_streams = $maximum_parallel_io_streams,
@@ -2303,5 +2310,5 @@
        then
 
-          eval filename=${pathout[$i]}/${fname}${endout[$i]}
+          eval filename=${pathout[$i]}/${jobname}${endout[$i]}
 
              # DETERMINE THE CYCLE NUMBER
@@ -2445,12 +2452,12 @@
                 transfer_failed=false
                 printf "\n  >>> OUTPUT: ${localout[$i]}$catalog_string  $append_string by SCP to"
-                printf "\n              ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}$catalog_string\n"
+                printf "\n              ${pathout[$i]}/${host_configuration}_${jobname}${endout[$i]}$catalog_string\n"
 
                    # TRANSFER VIA SCP
                 if [[ "$remote_loginnode" != "" ]]
                 then
-                   echo "cd $tempdir; ${fast_io_catalog}/${sources_for_run_catalog}/batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${host_configuration}_${fname}${endout[$i]}  ${extout[$i]}"  |  ssh -q $remote_username@$remote_loginnode
+                   echo "cd $tempdir; ${fast_io_catalog}/${sources_for_run_catalog}/batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${host_configuration}_${jobname}${endout[$i]}  ${extout[$i]}"  |  ssh -q $remote_username@$remote_loginnode
                 else
-                   batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} "${pathout[$i]}" ${host_configuration}_${fname}${endout[$i]}  ${extout[$i]}
+                   batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} "${pathout[$i]}" ${host_configuration}_${jobname}${endout[$i]}  ${extout[$i]}
                 fi
                 [[ $? != 0 ]]  &&  transfer_failed=true
@@ -2461,5 +2468,5 @@
                 then
                    printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
-                   printf "      ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}_$run_id\n"
+                   printf "      ${pathout[$i]}/${host_configuration}_${jobname}${endout[$i]}_$run_id\n"
 
                       # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
@@ -2471,5 +2478,5 @@
                       mkdir -p  $local_catalog
                    fi
-                   eval  cp  ${localout[$i]}  ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}_$run_id
+                   eval  cp  ${localout[$i]}  ${pathout[$i]}/${host_configuration}_${jobname}${endout[$i]}_$run_id
                    transfer_problems=true
                 fi
@@ -2679,5 +2686,5 @@
 
        # BUILD THE PALMRUN-COMMAND TO BE CALLED IN THE BATCH-JOB
-    palmrun_com="$palmrun_script_name -d $fname -h $host_configuration -m $memory -t $cpumax -q $queue -r $run_id -U $local_username"
+    palmrun_com="$palmrun_script_name -d $jobname -h $host_configuration -m $memory -t $cpumax -q $queue -r $run_id -U $local_username"
     [[ "$activation_string_list" != "" ]]  &&  palmrun_com=${palmrun_com}" -a \"$activation_string_list\""
     [[ "$global_revision" != "" ]]  &&  palmrun_com=${palmrun_com}" -G \"$global_revision\""
@@ -2761,5 +2768,5 @@
 
        echo "set -x"                               >>  $jobfile
-       echo "${fast_io_catalog}/${sources_for_run_catalog}/batch_scp  $PORTOPT  -d  -w 10  -u $local_username $local_ip  $job_protocol_file_remote  \"$local_jobcatalog\"  ${host_configuration}_${fname}"  >>  $jobfile
+       echo "${fast_io_catalog}/${sources_for_run_catalog}/batch_scp  $PORTOPT  -d  -w 10  -u $local_username $local_ip  $job_protocol_file_remote  \"$local_jobcatalog\"  ${host_configuration}_${jobname}"  >>  $jobfile
        echo "%%END%%"                              >>  $jobfile
        echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" "  >>  $jobfile
