Index: palm/trunk/SCRIPTS/palmrun
===================================================================
--- palm/trunk/SCRIPTS/palmrun	(revision 2501)
+++ palm/trunk/SCRIPTS/palmrun	(revision 2506)
@@ -27,4 +27,10 @@
 # -----------------
 # $Id$
+# option -V added to check for an existing SOURCES_FOR_RUN_... folder
+# host configuration added to SOURCES_FOR_RUN_... folder name
+# host_identifier renamed host_configuration
+# option -W added to allow for job dependencies
+# 
+# 2501 2017-09-26 11:41:55Z raasch
 # default value for number of cores (option -X) set to 1
 # bugfix for mechanism which overwrites configuration file settings with values
@@ -76,10 +82,10 @@
  cpp_options=""
  cpumax=0
+ create_batch_job=false
  create_jobfile_only=false
- delete_temporary_catalog=true
- create_batch_job=false
  create_remote_batch_job=false
  dashes="  ----------------------------------------------------------------------------"
  defaultqueue=""
+ delete_temporary_catalog=true
  do_compile=true
  do_trace=false
@@ -90,5 +96,5 @@
  fname=test
  global_revision=""
- host_identifier="default"
+ host_configuration="default"
  hostfile=""
  hp=""
@@ -107,6 +113,8 @@
  done
  module_calls=""
+ palmrun_memory=""
  palmrun_script_name=$prc
  openmp=false
+ previous_job=""
  project_account=""
  queue=none
@@ -126,4 +134,5 @@
  transfer_problems=false
  user_source_path=""
+ use_existing_sources_folder=""
  use_openmp=false
  version="palmrun  1.0 Rev$Rev: 2303 $"
@@ -170,5 +179,5 @@
     # READ SHELLSCRIPT-OPTIONS AND REBUILD THE PALMRUN-COMMAND STRING (prc),
     # WHICH WILL BE USED TO START RESTART-JOBS
- while  getopts  :a:A:bBCd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vw:xX:yY:Z option
+ while  getopts  :a:A:bBCd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vVw:W:xX:yY:Z option
  do
    case  $option  in
@@ -181,5 +190,5 @@
        (F)   create_jobfile_only=true;;
        (G)   global_revision=$OPTARG; prc="$prc -G'$OPTARG'";;
-       (h)   host_identifier=$OPTARG; prc="$prc -h$OPTARG";;
+       (h)   host_configuration=$OPTARG; prc="$prc -h$OPTARG";;
        (j)   running_in_batch_mode=true;;
        (k)   keep_data_from_previous_run=true; prc="$prc -k";;
@@ -196,5 +205,7 @@
        (U)   return_username=$OPTARG; prc="$prc -U$OPTARG";;
        (v)   silent=true; prc="$prc -v";;
+       (V)   use_existing_sources_folder="-V";;
        (w)   max_par_io_str=$OPTARG; prc="$prc -w$OPTARG";;
+       (W)   previous_job=$OPTARG;;
        (x)   do_trace=true;set -x; prc="$prc -x";;
        (X)   palmrun_cores=$OPTARG; prc="$prc -X$OPTARG";;
@@ -225,5 +236,5 @@
     printf "\n        -d    base name of files attached to program   test"
     printf "\n        -F    create batch job file only               ---"
-    printf "\n        -h    configuration identifier                 \"default\" "
+    printf "\n        -h    host configuration                       \"default\" "
     printf "\n        -k    keep data from previous run"
     printf "\n        -m    memory demand in MB (batch-jobs)         0 MB"
@@ -239,5 +250,7 @@
     printf "\n        -u    username on remote machine               \"\" "
     printf "\n        -v    no prompt for confirmation               ---"
+    printf "\n        -V    check if SOURCES_FOR_RUN_... exists      ---"
     printf "\n        -w    maximum parallel io streams              as given by -X"
+    printf "\n        -W    name of job to wait for                  ---"
     printf "\n        -x    tracing of palmrun for debug purposes    ---"
     printf "\n        -X    # of processors (on parallel machines)   1"
@@ -266,6 +279,7 @@
 
 
-    # BUILD THE CONFIGURATION-FILE NAME
- config_file=.palm.config.$host_identifier
+    # 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
 
 
@@ -574,5 +588,5 @@
 
     # VALUES OF PALMRUN-OPTIONS OVERWRITE THOSE FROM THE CONFIGURATION-FILE
- [[ $palmrun_memory     != 0   ]]  &&  memory=$palmrun_memory
+ [[ $palmrun_memory     != ""   ]]  &&  memory=$palmrun_memory
  [[ $palmrun_cpumax     != ""   ]]  &&  cpumax=$palmrun_cpumax
  [[ "$palmrun_cores" != ""  ]]  &&  cores=$palmrun_cores
@@ -609,7 +623,7 @@
  then
  
-    if [[ ! -d ${fast_io_catalog}/SOURCES_FOR_RUN_$fname ]]
-    then
-       printf "\n  +++ directory ${fast_io_catalog}/SOURCES_FOR_RUN_$fname is missing"
+    if [[ ! -d ${fast_io_catalog}/${sources_for_run_catalog} ]]
+    then
+       printf "\n  +++ directory ${fast_io_catalog}/${sources_for_run_catalog} is missing"
        printf "\n      Please check the output of the palmrun-call"
        printf "\n      that you did on your local host."
@@ -634,6 +648,6 @@
        fi
 
-       rm -rf   SOURCES_FOR_RUN_$fname
-       mkdir -p SOURCES_FOR_RUN_$fname
+       rm -rf   $sources_for_run_catalog
+       mkdir -p $sources_for_run_catalog
 
        if [[ "$source_list" = LM ]]
@@ -677,5 +691,5 @@
           for  filename  in  $Filenames
           do
-             cp  $filename  $working_directory/SOURCES_FOR_RUN_$fname
+             cp  $filename  ${working_directory}/${sources_for_run_catalog}
              source_list=$source_list"$filename "
           done
@@ -707,5 +721,5 @@
                 locat=source; exit
              else
-                cp  $filename  $working_directory/SOURCES_FOR_RUN_$fname
+                cp  $filename  ${working_directory}/${sources_for_run_catalog}
              fi
 
@@ -723,5 +737,5 @@
           locat=make; exit
        else
-          cp  $makefile  SOURCES_FOR_RUN_$fname/Makefile 
+          cp  $makefile  ${sources_for_run_catalog}/Makefile 
        fi
 
@@ -762,5 +776,5 @@
 
              cd -  > /dev/null
-             cd  SOURCES_FOR_RUN_$fname
+             cd  $sources_for_run_catalog
 
                 # COPY MAKEFILE IF EXISTING
@@ -818,10 +832,10 @@
 
           # COPY CONFIGURATION FILES
-       cp  $config_file  SOURCES_FOR_RUN_$fname
-       cp  $fileconnection_file  SOURCES_FOR_RUN_$fname
+       cp  $config_file  $sources_for_run_catalog
+       cp  $fileconnection_file  $sources_for_run_catalog
 
           # COPY SHELLSCRIPTS
-       cp  ${source_path}/../SCRIPTS/palmrun    SOURCES_FOR_RUN_$fname
-       cp  ${source_path}/../SCRIPTS/batch_scp  SOURCES_FOR_RUN_$fname
+       cp  ${source_path}/../SCRIPTS/palmrun    $sources_for_run_catalog
+       cp  ${source_path}/../SCRIPTS/batch_scp  $sources_for_run_catalog
 
     fi
@@ -1260,11 +1274,11 @@
  if [[ $create_remote_batch_job = true ]]
  then
-    column1="execution on:"; column2="$host_identifier (username: $remote_username)"
+    column1="execution on:"; column2="$host_configuration (username: $remote_username)"
  else
     if [[ $running_on_remote = true ]]
     then
-       column1="execution on:"; column2="$host_identifier (IP:$remote_ip)"
+       column1="execution on:"; column2="$host_configuration (IP:$remote_ip)"
     else
-       column1="execution on:"; column2="$host_identifier (IP:$local_ip)"
+       column1="execution on:"; column2="$host_configuration (IP:$local_ip)"
     fi
  fi
@@ -1327,4 +1341,6 @@
  if [[ $create_batch_job = true  ||  $create_remote_batch_job = true  ||  $running_in_batch_mode = true ]]
  then
+    column1="memory demand / PE":; column2="$memory MB"
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
     column1="job cpu time (h:m:s):"; column2="$timestring"
     printf "| %-25s%-45s | \n" "$column1" "$column2"
@@ -1419,12 +1435,4 @@
  fi
 
- if [[ $create_batch_job = true  ||  "$LOADLBATCH" = yes ]]
- then
-    column1="memory demand / PE":; column2="$memory MB"
-    printf "| %-25s%-45s | \n" "$column1" "$column2"
-    column1=CPU-time:; column2="$cpu_hours:$cpu_minutes:$cpu_seconds"
-    printf "| %-25s%-45s | \n" "$column1" "$column2"
- fi
-
  if [[ "$source_list" != "" ]]
  then
@@ -1535,9 +1543,8 @@
 
        line=`grep %base_directory $config_file`
-       make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host_identifier}
-       echo "make_depository=$make_depository"
-       echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1  | tee ${host_identifier}_last_make_protokoll
-
-       if [[ $(grep -c "depository not found" ${host_identifier}_last_make_protokoll) != 0 ]]
+       make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host_configuration}
+       echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1  | tee ${host_configuration}_last_make_protokoll
+
+       if [[ $(grep -c "depository not found" ${host_configuration}_last_make_protokoll) != 0 ]]
        then
           printf "\n\n  +++ make depository \"${make_depository}\""
@@ -1545,10 +1552,10 @@
           ask_for_make_depository=true
        fi
-       rm ${host_identifier}_last_make_protokoll
+       rm ${host_configuration}_last_make_protokoll
 
     else
 
           # CHECK FOR MAKE_DEPOSITORY ON THE LOCAL HOST
-       make_depository=${base_directory}/MAKE_DEPOSITORY_${host_identifier}
+       make_depository=${base_directory}/MAKE_DEPOSITORY_${host_configuration}
        if [[ ! -d ${make_depository} ]]
        then
@@ -1580,5 +1587,5 @@
        fi
 
-       palmbuild  -v  -h $host_identifier
+       palmbuild  -v  -h $host_configuration
 
        if [[ $? != 0 ]]
@@ -1595,5 +1602,5 @@
     fi
 
-    palmbuild  -v  -h $host_identifier  -d $fname
+    palmbuild  -v  $use_existing_sources_folder  -h $host_configuration  -d $fname
 
     if [[ $? != 0 ]]
@@ -1603,5 +1610,5 @@
        printf "\n  +++ error while creating executable and/or other sources"
        locat=execution
-       rm -rf  SOURCES_FOR_RUN_$fname
+       rm -rf  $sources_for_run_catalog
        exit
 
@@ -1609,5 +1616,5 @@
 
        printf "\n$dashes\n  *** executable and other sources created\n"
-       rm -rf  SOURCES_FOR_RUN_$fname
+       rm -rf  $sources_for_run_catalog
 
     fi
@@ -1630,5 +1637,5 @@
        tmpcreate=true
        cd  $TEMPDIR
-       cp  $fast_io_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  $TEMPDIR
+       cp  ${fast_io_catalog}/${sources_for_run_catalog}/{*,.[!.]*}  $TEMPDIR
        printf "\n  *** changed to temporary directory: $TEMPDIR"
 
@@ -1837,5 +1844,5 @@
        # (FILE ENVPAR WILL BE READ BY PALM)
     cat  >  ENVPAR  <<  EOF
- &envpar  run_identifier = '$fname', host = '$host_identifier',
+ &envpar  run_identifier = '$fname', host = '$host_configuration',
           write_binary = .${write_binary}., tasks_per_node = $tasks_per_node,
           maximum_parallel_io_streams = $maximum_parallel_io_streams,
@@ -2105,12 +2112,12 @@
                 transfer_failed=false
                 printf "\n  >>> OUTPUT: ${localout[$i]}$catalog_string  $append_string by SCP to"
-                printf "\n              ${pathout[$i]}/${host_identifier}_${fname}${endout[$i]}$catalog_string\n"
+                printf "\n              ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}$catalog_string\n"
 
                    # TRANSFER VIA SCP
                 if [[ "$remote_loginnode" != "" ]]
                 then
-                   echo "cd $TEMPDIR; ${fast_io_catalog}/SOURCES_FOR_RUN_${fname}/batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${host_identifier}_${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}_${fname}${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_identifier}_${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}_${fname}${endout[$i]}  ${extout[$i]}
                 fi
                 [[ $? != 0 ]]  &&  transfer_failed=true
@@ -2121,5 +2128,5 @@
                 then
                    printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
-                   printf "      ${pathout[$i]}/${host_identifier}_${fname}${endout[$i]}_$run_id\n"
+                   printf "      ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}_$run_id\n"
 
                       # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
@@ -2131,5 +2138,5 @@
                       mkdir -p  $local_catalog
                    fi
-                   eval  cp  ${localout[$i]}  ${pathout[$i]}/${host_identifier}_${fname}${endout[$i]}_$run_id
+                   eval  cp  ${localout[$i]}  ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}_$run_id
                    transfer_problems=true
                 fi
@@ -2339,5 +2346,5 @@
 
        # BUILD THE PALMRUN-COMMAND TO BE CALLED IN THE BATCH-JOB
-    palmrun_com="$palmrun_script_name -d $fname -h $host_identifier -m $memory -t $cpumax -q $queue -r $run_id -U $local_username"
+    palmrun_com="$palmrun_script_name -d $fname -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\""
@@ -2372,9 +2379,9 @@
        # DETERMINE THE FULL PATHS FOR THE JOB PROTOCOL FILES ON THE LOCAL AND
        # REMOTE HOST
-    job_protocol_file_local=${local_jobcatalog}/${host_identifier}_${job_id}
+    job_protocol_file_local=${local_jobcatalog}/${host_configuration}_${job_id}
     job_protocol_file=$job_protocol_file_local
     if [[ $create_remote_batch_job = true ]]
     then
-       job_protocol_file_remote=${remote_jobcatalog}/${host_identifier}_${job_id}
+       job_protocol_file_remote=${remote_jobcatalog}/${host_configuration}_${job_id}
        job_protocol_file=$job_protocol_file_remote
        job_transfer_protocol_file=${remote_jobcatalog}/last_job_transfer_protocol
@@ -2392,5 +2399,5 @@
     do
        (( i = i + 1 ))
-       line=`echo  "${batch_directive[$i]}" | sed 's/{{JOB_ID}}/$job_id/g' | sed 's/{{JOBFILE}}/$job_protocol_file/g' | sed 's/{{CPU_HOURS}}/$cpu_hours/g' | sed 's/{{CPU_MINUTES}}/$cpu_minutes/g' | sed 's/{{CPU_SECONDS}}/$cpu_seconds/g' | sed 's/{{NODES}}/$nodes/g' | sed 's/{{CORES}}/$cores/g' | sed 's/{{TASKS_PER_NODE}}/$tasks_per_node/g' | sed 's/{{HOST_IDENTIFIER}}/${host_identifier}/g' | sed 's/{{FNAME}}/$fname/g' | sed 's/{{QUEUE}}/$queue/g' | sed 's/{{MEMORY}}/$memory/g' | sed 's/{{PROJECT_ACCOUNT}}/$project_account/g'`
+       line=`echo  "${batch_directive[$i]}" | sed 's/{{JOB_ID}}/$job_id/g' | sed 's/{{JOBFILE}}/$job_protocol_file/g' | sed 's/{{CPU_HOURS}}/$cpu_hours/g' | sed 's/{{CPU_MINUTES}}/$cpu_minutes/g' | sed 's/{{CPU_SECONDS}}/$cpu_seconds/g' | sed 's/{{NODES}}/$nodes/g' | sed 's/{{CORES}}/$cores/g' | sed 's/{{TASKS_PER_NODE}}/$tasks_per_node/g' | sed 's/{{HOST_CONFIGURATION}}/${host_configuration}/g' | sed 's/{{FNAME}}/$fname/g' | sed 's/{{QUEUE}}/$queue/g' | sed 's/{{MEMORY}}/$memory/g' | sed 's/{{PROJECT_ACCOUNT}}/$project_account/g' | sed 's/{{PREVIOUS_JOB}}/$previous_job/g'`
        eval line=\"$line\"
        echo  "$line"                               >>  $jobfile
@@ -2414,5 +2421,5 @@
        do
           (( i = i + 1 ))
-          line=`echo  "${batch_directive_transfer[$i]}" | sed 's/{{JOB_ID}}/$job_id/g' | sed 's/{{JOBFILE}}/$job_protocol_file/g' | sed 's/{{JOB_TRANSFER_PROTOCOL_FILE}}/$job_transfer_protocol_file/g' | sed 's/{{CPU_HOURS}}/$cpu_hours/g' | sed 's/{{CPU_MINUTES}}/$cpu_minutes/g' | sed 's/{{CPU_SECONDS}}/$cpu_seconds/g' | sed 's/{{NODES}}/$nodes/g' | sed 's/{{TASKS_PER_NODE}}/$tasks_per_node/g' | sed 's/{{HOST_IDENTIFIER}}/${host_identifier}/g' | sed 's/{{FNAME}}/$fname/g' | sed 's/{{PROJECT_ACCOUNT}}/$project_account/g'`
+          line=`echo  "${batch_directive_transfer[$i]}" | sed 's/{{JOB_ID}}/$job_id/g' | sed 's/{{JOBFILE}}/$job_protocol_file/g' | sed 's/{{JOB_TRANSFER_PROTOCOL_FILE}}/$job_transfer_protocol_file/g' | sed 's/{{CPU_HOURS}}/$cpu_hours/g' | sed 's/{{CPU_MINUTES}}/$cpu_minutes/g' | sed 's/{{CPU_SECONDS}}/$cpu_seconds/g' | sed 's/{{NODES}}/$nodes/g' | sed 's/{{TASKS_PER_NODE}}/$tasks_per_node/g' | sed 's/{{HOST_CONFIGURATION}}/${host_configuration}/g' | sed 's/{{FNAME}}/$fname/g' | sed 's/{{PROJECT_ACCOUNT}}/$project_account/g'`
           eval line=\"$line\"
           echo  "$line"                            >>  $jobfile
@@ -2421,5 +2428,5 @@
 
        echo "set -x"                               >>  $jobfile
-       echo "${fast_io_catalog}/SOURCES_FOR_RUN_${fname}/batch_scp  $PORTOPT  -d  -w 10  -u $local_username $local_ip  $job_protocol_file_remote  \"$local_jobcatalog\"  ${host_identifier}_${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}_${fname}"  >>  $jobfile
        echo "%%END%%"                              >>  $jobfile
        echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" "  >>  $jobfile
@@ -2456,5 +2463,5 @@
     echo  "cd  $TEMPDIR"                 >>  $jobfile
     echo  "export TEMPDIR=$TEMPDIR"      >>  $jobfile
-    echo  "cp  $fast_io_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ."  >>  $jobfile
+    echo  "cp  ${fast_io_catalog}/${sources_for_run_catalog}/{*,.[!.]*}  ."  >>  $jobfile
     echo  "export PATH=.:\$PATH"         >>  $jobfile
     echo  "export execute_palmrun=true"  >>  $jobfile
@@ -2486,5 +2493,5 @@
           echo  "   echo \" \" "                      >>  $jobfile
           echo  "   echo \"+++ file ${remotepathin[$i]} could not be created\" "   >>  $jobfile
-          echo  "   echo \"    please check, if directory exists on $host_identifier!\" "  >>  $jobfile
+          echo  "   echo \"    please check, if directory exists on $host_configuration!\" "  >>  $jobfile
           echo  "   echo \"+++ PALMRUN will not be continued\" "  >>  $jobfile
           echo  "   execute_palmrun=false"            >>  $jobfile
@@ -2523,7 +2530,7 @@
           if [[ $do_trace = true ]]
           then
-             echo "     scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host_identifier}_${job_id}"
-          fi
-          scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host_identifier}_${job_id}
+             echo "     scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host_configuration}_${job_id}"
+          fi
+          scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host_configuration}_${job_id}
 
           echo " "
@@ -2531,7 +2538,7 @@
           if [[ $do_trace = true ]]
           then
-             echo "     cd $remote_jobcatalog; $submit_command ${host_identifier}_${job_id}; rm ${host_identifier}_${job_id}  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1"
-          fi
-          echo "cd $remote_jobcatalog; $submit_command ${host_identifier}_${job_id}; rm ${host_identifier}_${job_id}"  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1
+             echo "     cd $remote_jobcatalog; $submit_command ${host_configuration}_${job_id}; rm ${host_configuration}_${job_id}  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1"
+          fi
+          echo "cd $remote_jobcatalog; $submit_command ${host_configuration}_${job_id}; rm ${host_configuration}_${job_id}"  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1
 
        elif [[ $create_batch_job = true ]]
@@ -2539,5 +2546,5 @@
 
           eval  local_jobcatalog=$local_jobcatalog
-          cp  $jobfile  ${local_jobcatalog}/${host_identifier}_${job_id}
+          cp  $jobfile  ${local_jobcatalog}/${host_configuration}_${job_id}
           cd $local_jobcatalog
           echo " "
@@ -2545,8 +2552,8 @@
           if [[ $do_trace = true ]]
           then
-             echo "$submit_command ${host_identifier}_${job_id}"
-          fi
-          $submit_command ${host_identifier}_${job_id}
-          rm ${host_identifier}_${job_id}
+             echo "$submit_command ${host_configuration}_${job_id}"
+          fi
+          $submit_command ${host_configuration}_${job_id}
+          rm ${host_configuration}_${job_id}
           cd -  > /dev/null
 
