Changeset 2420


Ignore:
Timestamp:
Sep 7, 2017 6:20:11 AM (7 years ago)
Author:
raasch
Message:

PALM_BIN setting removed from new scripts

Location:
palm/trunk/SCRIPTS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmbuild

    r2412 r2420  
    4545 column1=""
    4646 column2=""
    47  config_file=.palm.config
    48  host=default
    49  host_found=false
     47 host_identifier=default
    5048 locat=normal
    5149 makefile=""
     
    8684   case  $option  in
    8785       (d)   fname=$OPTARG;;
    88        (h)   host=$OPTARG;;
     86       (h)   host_identifier=$OPTARG;;
    8987       (m)   makefile=$OPTARG;;
    9088       (s)   suf=$OPTARG;;
     
    9896
    9997    # BUILD THE CONFIGURATION-FILE NAME
    100  config_file=${config_file}.$host
     98 config_file=.palm.config.$host_identifier
    10199
    102100
     
    256254    fi
    257255
    258     [[ "$remote_hostname" = "" ]]  &&  remote_hostname=$remote_ip
    259 
    260 
    261256       # GET SOURCE AND DEPOSITORY PATH ON THE REMOTE MACHINE WITHOUT EVALUATING
    262257       # THE $
     
    272267
    273268    line=`grep %base_directory $config_file`
    274     make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host}
     269    make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${host_identifier}
    275270
    276271 else
    277272
    278     make_depository=${base_directory}/MAKE_DEPOSITORY_${host}
     273    make_depository=${base_directory}/MAKE_DEPOSITORY_${host_identifier}
    279274
    280275 fi
     
    286281 printf "| %-40s%30s | \n" "$version" "$calltime"
    287282 printf "|                                                                        | \n"
    288  printf "| %-13s%-57s | \n" "called on:" "$local_hostname"
     283 printf "| %-13s%-57s | \n" "called on:" "$(hostname) (IP:$local_ip)"
    289284 column2=$(echo $config_file | cut -c1-57 )
    290285 printf "| %-13s%-57s | \n" "config file:" "$column2"
     
    337332
    338333    # GET CONFIRMATION TO CONTINUE
    339  printf "\n  *** update will be made for host \"$host\" "
     334 printf "\n  *** update will be made for host \"$host_identifier\" "
    340335
    341336
     
    362357    if [[ "$remote_ip" != "" ]]
    363358    then
    364        column2=$remote_hostname
    365        printf "| %-20s%-50s | \n" "remote host:" "$column2"
     359       column2="$host_identifier"
     360       printf "| %-20s%-50s | \n" "host identifier:" "$column2"
    366361       printf "|                                                                        | \n"
    367362       column2=$(echo "$make_depository" | cut -c1-50 )
    368363       printf "| %-20s%-50s | \n" "remote depository:" "$column2"
    369364    else
    370        column2=$local_hostname
    371        printf "| %-20s%-50s | \n" "local host:" "$column2"
     365       column2="$host_identifier"
     366       printf "| %-20s%-50s | \n" "host identifier:" "$column2"
    372367       printf "|                                                                        | \n"
    373368       column2=$(echo "$make_depository" | cut -c1-50 )
     
    513508          echo "  *** creating utilities on remote host"
    514509          make_call_string="make  -f Makefile_utilities  $make_options  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$linker_options\" "
    515           echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
    516 
    517           if [[ $(grep -c MAKE_ERROR ${remote_hostname}_last_make_protokoll) != 0 ]]
     510          echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
     511
     512          if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protokoll) != 0 ]]
    518513          then
    519514             printf "\a\n  +++ error(s) occurred during compiling or linking of utilities"
    520              printf "\n      on host \"$remote_hostname\" "
     515             printf "\n      for host \"$host_identifier\" "
    521516             if [[ $silent = false ]]
    522517             then
     
    529524                   if [[ "$answer" = l ]]
    530525                   then
    531                       more ${remote_hostname}_last_make_protokoll
     526                      more ${host_identifier}_last_make_protokoll
    532527                   fi
    533528                done
     
    547542          echo "  *** compile PALM sources on remote host"
    548543          make_call_string="make  $make_options  PROG=$program_name  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$linker_options\" "
    549           echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
    550 
    551           if [[ $(grep -c MAKE_ERROR ${remote_hostname}_last_make_protokoll) != 0 ]]
    552           then
    553              printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_hostname\" "
     544          echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
     545
     546          if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protokoll) != 0 ]]
     547          then
     548             printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
    554549             if [[ $silent = false ]]
    555550             then
     
    562557                   if [[ "$answer" = l ]]
    563558                   then
    564                       more ${remote_hostname}_last_make_protokoll
     559                      more ${host_identifier}_last_make_protokoll
    565560                   fi
    566561                done
     
    584579
    585580             # FIRST CHECK, IF A DEPOSITORY EXISTS ON THE REMOTE MACHINE
    586           echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
     581          echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
    587582
    588583
    589584             # COPY MAKE DEPOSITORY ON REMOTE MACHINE TO SOURCES_FOR_RUN_...
    590           printf "\n  *** copy MAKE_DEPOSITORY_${host} on remote host to SOURCES_FOR_RUN_$fname \n"
     585          printf "\n  *** copy MAKE_DEPOSITORY_${host_identifier} on remote host to SOURCES_FOR_RUN_$fname \n"
    591586          echo  "rm -rf $fast_io_catalog/SOURCES_FOR_RUN_$fname; mkdir -p $fast_io_catalog/SOURCES_FOR_RUN_$fname; cp ${make_depository}/${program_name}_current_version.tar  $fast_io_catalog/SOURCES_FOR_RUN_$fname; cd $fast_io_catalog/SOURCES_FOR_RUN_$fname; tar xf ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
    592587
    593588
    594589             # COPY CONTENTS OF SOURCES_FOR_RUN_... TO SOURCES_FOR_RUN_... ON THE REMOTE MACHINE
    595           printf "\n  *** copy $base_directory/SOURCES_FOR_RUN_$fname to SOURCES_FOR_RUN_$fname on remote host \n"
     590          printf "\n  *** copy $base_directory/SOURCES_FOR_RUN_$fname"
     591          printf "\n      to SOURCES_FOR_RUN_$fname on remote host \n"
    596592          scp  -q  $ssh_key  $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ${remote_username}@${remote_ip}:${fast_io_catalog}/SOURCES_FOR_RUN_$fname
    597593
     
    605601             [[ "$module_commands" != "" ]]  &&  module_commands=${module_commands}";"
    606602             echo "  *** execute \"make\" on remote host"
    607              echo "$login_init_cmd $module_commands cd ${fast_io_catalog}/SOURCES_FOR_RUN_$fname; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${remote_hostname}_last_make_protokoll
    608 
    609              if [[ $(grep -c MAKE_ERROR ${remote_hostname}_last_make_protokoll) != 0 ]]
     603             echo "$login_init_cmd $module_commands cd ${fast_io_catalog}/SOURCES_FOR_RUN_$fname; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
     604
     605             if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protokoll) != 0 ]]
    610606             then
    611                 printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_hostname\" "
     607                printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
    612608                if [[ $silent = false ]]
    613609                then
     
    620616                      if [[ "$answer" = l ]]
    621617                      then
    622                          more ${remote_hostname}_last_make_protokoll
     618                         more ${host_identifier}_last_make_protokoll
    623619                      fi
    624620                   done
     
    638634       fi
    639635
    640        rm -rf  ${remote_hostname}_last_make_protokoll
     636       rm -rf  ${host_identifier}_last_make_protokoll
    641637
    642638
     
    698694          echo "  *** compile PALM sources on local host"
    699695
    700           make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"  2>&1 | tee ${local_hostname}_last_make_protokoll
     696          make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"  2>&1 | tee ${host_identifier}_last_make_protokoll
    701697
    702698          if [[ $? != 0 ]]
    703699          then
    704              printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$local_hostname\" "
     700             printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
    705701             if [[ $silent = false ]]
    706702             then
     
    713709                   if [[ "$answer" = l ]]
    714710                   then
    715                       more ${local_hostname}_last_make_protokoll
     711                      more ${host_identifier}_last_make_protokoll
    716712                   fi
    717713                done
     
    739735             printf "\n  +++ directory for local make depository:"
    740736             printf "\n           $make_depository"
    741              printf "\n      not found. Please run \"palmbuild -h $host\" "
     737             printf "\n      not found. Please run \"palmbuild -h $host_identifier\" "
    742738             locat=make_depository; exit
    743739          fi
     
    745741
    746742             # COPY MAKE DEPOSITORY ON LOCAL MACHINE TO SOURCES_FOR_RUN_...
    747           printf "\n  *** copy MAKE_DEPOSITORY_${host} on local host to "
     743          printf "\n  *** copy MAKE_DEPOSITORY_${host_identifier} on local host to "
    748744          printf "\n      $fast_io_catalog/SOURCES_FOR_RUN_$fname \n"
    749745          rm -rf $fast_io_catalog/SOURCES_FOR_RUN_$fname
     
    774770             then
    775771
    776                 printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$local_hostname\" "
     772                printf "\a\n  +++ error(s) occurred during compiling or linking for host \"$host_identifier\" "
    777773                if [[ $silent = false ]]
    778774                then
  • palm/trunk/SCRIPTS/palmrun

    r2410 r2420  
    5959 compiler_name_ser=""
    6060 compiler_options=""
    61  config_file=""
    6261 cores=""
    6362 cores_atmos=0
     
    8079 fname=test
    8180 global_revision=""
    82  host="default"
     81 host_identifier="default"
    8382 hostfile=""
    8483 hp=""
     
    157156
    158157
    159     # CHECK IF THE PATH FOR THE PALM BINARIES (SCRIPTS+UTILITY-PROGRAMS) HAS
    160     # BEEN SET
    161  if [[ "$PALM_BIN" = "" ]]
    162  then
    163     printf "\n  +++ environment variable PALM_BIN has not been set"
    164     printf "\n      please set it to the directory where the PALM scripts are located"
    165     locat=palm_bin; exit
    166  fi
    167  export PATH=$PALM_BIN:$PATH
    168 
    169 
    170 
    171158    # READ SHELLSCRIPT-OPTIONS AND REBUILD THE PALMRUN-COMMAND STRING (prc),
    172159    # WHICH WILL BE USED TO START RESTART-JOBS
    173  while  getopts  :a:bBc:Cd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vw:xX:yY:Z option
     160 while  getopts  :a:bBCd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vw:xX:yY:Z option
    174161 do
    175162   case  $option  in
     
    177164       (b)   create_batch_job=true; prc="$prc -b";;
    178165       (B)   delete_temporary_catalog=false; prc="$prc -B";;
    179        (c)   config_file=$OPTARG; prc="$prc -c$OPTARG";;
    180166       (C)   restart_run=true; prc="$prc -C";;
    181167       (d)   fname=$OPTARG; prc="$prc -d$OPTARG";;
    182168       (F)   create_jobfile_only=true;;
    183169       (G)   global_revision=$OPTARG; prc="$prc -G'$OPTARG'";;
    184        (h)   host=$OPTARG; prc="$prc -h$OPTARG";;
     170       (h)   host_identifier=$OPTARG; prc="$prc -h$OPTARG";;
    185171       (j)   running_in_batch_mode=true;;
    186172       (k)   keep_data_from_previous_run=true; prc="$prc -k";;
     
    223209    printf "\n        -b    batch-job on local machine               ---"
    224210    printf "\n        -B    do not delete temporary directory at end ---"
    225     printf "\n        -c    configuration file                       .palm.config.default"
    226211    printf "\n        -d    base name of files attached to program   test"
    227212    printf "\n        -F    create batch job file only               ---"
    228     printf "\n        -h    execution host                           \"default\" "
     213    printf "\n        -h    host identifier                          \"default\" "
    229214    printf "\n        -k    keep data from previous run"
    230215    printf "\n        -m    memory demand in MB (batch-jobs)         0 MB"
     
    268253
    269254    # BUILD THE CONFIGURATION-FILE NAME
    270  if [[ "$config_file" = "" ]]
    271  then
    272     config_file=.palm.config.$host
    273  fi
     255 config_file=.palm.config.$host_identifier
    274256
    275257
     
    462444       # BATCH MODE AND ...
    463445    running_on_remote=true
    464     host_name=$remote_hostname
    465446 
    466447 else
     
    474455
    475456     fi
    476      host_name=$local_hostname
    477457     running_on_remote=false
    478458 fi
     
    12131193       fi
    12141194    done
     1195    cpumax=$cputime
    12151196
    12161197       # CHECK THE MEMORY DEMAND
     
    12341215       while [[ -z $remote_username ]]
    12351216       do
    1236           printf "\n  +++ username on remote host \"$remote_ip\" is undefined"
     1217          printf "\n  +++ username on remote host with IP \"$remote_ip\" is undefined"
    12371218          printf "\n  >>> Please type username:"
    12381219          printf "\n  >>> "
     
    12431224 else
    12441225
    1245     cputime=10000000  # NO LIMT FOR INTERACTIVE RUNS
    1246 
    1247  fi
    1248  cpumax=$cputime
     1226    if [[ $running_in_batch_mode = false ]]
     1227    then
     1228       cputime=10000000  # NO LIMT FOR INTERACTIVE RUNS
     1229       cpumax=$cputime
     1230    else
     1231       cputime=$cpumax
     1232    fi
     1233
     1234 fi
    12491235
    12501236
     
    12671253 if [[ $create_remote_batch_job = true ]]
    12681254 then
    1269     column1="execution on:"; column2="$remote_hostname (username: $remote_username)"
     1255    column1="execution on:"; column2="$host_identifier (username: $remote_username)"
    12701256 else
    12711257    if [[ $running_on_remote = true ]]
    12721258    then
    1273        column1="execution on:"; column2="$remote_hostname"
     1259       column1="execution on:"; column2="$host_identifier (IP:$remote_ip)"
    12741260    else
    1275        column1="execution on:"; column2="$local_hostname"
     1261       column1="execution on:"; column2="$host_identifier (IP:$local_ip)"
    12761262    fi
    12771263 fi
     
    15251511    fi
    15261512
    1527     palmbuild  -v  -h $host  -d $fname
    1528     rm -rf  SOURCES_FOR_RUN_$fname
     1513    palmbuild  -v  -h $host_identifier  -d $fname
    15291514
    15301515    if [[ $? != 0 ]]
     
    15341519       printf "\n  +++ error while creating executable and/or other sources"
    15351520       locat=execution
     1521       rm -rf  SOURCES_FOR_RUN_$fname
    15361522       exit
    15371523
     
    15391525
    15401526       printf "\n$dashes\n  *** executable and other sources created\n"
     1527       rm -rf  SOURCES_FOR_RUN_$fname
    15411528
    15421529    fi
     
    17661753       # (FILE ENVPAR WILL BE READ BY PALM)
    17671754    cat  >  ENVPAR  <<  EOF
    1768  &envpar  run_identifier = '$fname', host = '$host',
     1755 &envpar  run_identifier = '$fname', host = '$host_identifier',
    17691756          write_binary = .${write_binary}., tasks_per_node = $tasks_per_node,
    17701757          maximum_parallel_io_streams = $maximum_parallel_io_streams,
     
    20342021                transfer_failed=false
    20352022                printf "\n  >>> OUTPUT: ${localout[$i]}$catalog_string  $append_string by SCP to"
    2036                 printf "\n              ${pathout[$i]}/${remote_hostname}_${fname}${endout[$i]}$catalog_string\n"
     2023                printf "\n              ${pathout[$i]}/${host_identifier}_${fname}${endout[$i]}$catalog_string\n"
    20372024
    20382025                   # TRANSFER VIA SCP
    20392026                if [[ "$remote_loginnode" != "" ]]
    20402027                then
    2041                    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]}\" ${remote_hostname}_${fname}${endout[$i]}  ${extout[$i]}"  |  ssh -q $remote_username@$remote_loginnode
     2028                   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
    20422029                else
    2043                    batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} "${pathout[$i]}" ${remote_hostname}_${fname}${endout[$i]}  ${extout[$i]}
     2030                   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]}
    20442031                fi
    20452032                [[ $? != 0 ]]  &&  transfer_failed=true
     
    20502037                then
    20512038                   printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
    2052                    printf "      ${pathout[$i]}/${remote_hostname}_${fname}${endout[$i]}_$run_id\n"
     2039                   printf "      ${pathout[$i]}/${host_identifier}_${fname}${endout[$i]}_$run_id\n"
    20532040
    20542041                      # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
     
    20602047                      mkdir -p  $local_catalog
    20612048                   fi
    2062                    eval  cp  ${localout[$i]}  ${pathout[$i]}/${remote_hostname}_${fname}${endout[$i]}_$run_id
     2049                   eval  cp  ${localout[$i]}  ${pathout[$i]}/${host_identifier}_${fname}${endout[$i]}_$run_id
    20632050                   transfer_problems=true
    20642051                fi
     
    22212208          if [[ "$remote_loginnode" != "" ]]
    22222209          then
    2223              echo "echo \" PATH=\\\$PATH:$LOCAL_PALMRUN_PATH; export PALM_BIN=$LOCAL_PALMRUN_PATH; cd $LOCAL_PWD; $prc\" |  ssh -q $SSH_PORTOPT  $local_username@$return_address  " |  ssh -q $remote_username@$remote_loginnode
     2210             echo "echo \" PATH=\\\$PATH:$LOCAL_PALMRUN_PATH; cd $LOCAL_PWD; $prc\" |  ssh -q $SSH_PORTOPT  $local_username@$return_address  " |  ssh -q $remote_username@$remote_loginnode
    22242211          else
    2225              echo \" PATH=\\\$PATH:$LOCAL_PALMRUN_PATH; export PALM_BIN=$LOCAL_PALMRUN_PATH; cd $LOCAL_PWD; $prc\" |  ssh -q $SSH_PORTOPT  $local_username@$return_address
     2212             echo \" PATH=\\\$PATH:$LOCAL_PALMRUN_PATH; cd $LOCAL_PWD; $prc\" |  ssh -q $SSH_PORTOPT  $local_username@$return_address
    22262213          fi
    22272214
     
    22682255
    22692256       # BUILD THE PALMRUN-COMMAND TO BE CALLED IN THE BATCH-JOB
    2270     palmrun_com="$palmrun_script_name -c $config_file -d $fname -h $host -m $memory -t $cpumax -q $queue -r $run_id -U $local_username"
     2257    palmrun_com="$palmrun_script_name -d $fname -h $host_identifier -m $memory -t $cpumax -q $queue -r $run_id -U $local_username"
    22712258    [[ "$activation_string_list" != "" ]]  &&  palmrun_com=${palmrun_com}" -a \"$activation_string_list\""
    22722259    [[ "$global_revision" != "" ]]  &&  palmrun_com=${palmrun_com}" -G \"$global_revision\""
     
    22842271    then
    22852272       palmrun_com=${palmrun_com}" -j -u $remote_username -R $local_ip"
    2286        printf "\n *** PALMRUN-command on remote host:\n     $palmrun_com \n"
     2273       if [[ $do_trace = true ]]
     2274       then
     2275          printf "\n *** PALMRUN-command on remote host:\n     $palmrun_com \n"
     2276       fi
    22872277    elif [[ $create_batch_job = true ]]
    22882278    then
    22892279       palmrun_com=${palmrun_com}" -j"
    2290        printf "\n *** PALMRUN-command on local host:\n     $palmrun_com \n"
     2280       if [[ $do_trace = true ]]
     2281       then
     2282          printf "\n *** PALMRUN-command on local host:\n     $palmrun_com \n"
     2283       fi
    22912284    fi
    22922285
     
    22942287       # DETERMINE THE FULL PATHS FOR THE JOB PROTOCOL FILES ON THE LOCAL AND
    22952288       # REMOTE HOST
    2296     job_protocol_file_local=${local_jobcatalog}/${host}_${job_id}
     2289    job_protocol_file_local=${local_jobcatalog}/${host_identifier}_${job_id}
    22972290    job_protocol_file=$job_protocol_file_local
    22982291    if [[ $create_remote_batch_job = true ]]
    22992292    then
    2300        job_protocol_file_remote=${remote_jobcatalog}/${host}_${job_id}
     2293       job_protocol_file_remote=${remote_jobcatalog}/${host_identifier}_${job_id}
    23012294       job_protocol_file=$job_protocol_file_remote
    23022295       job_transfer_protocol_file=${remote_jobcatalog}/last_job_transfer_protocol
     
    23142307    do
    23152308       (( i = i + 1 ))
    2316        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/{{LOCAL_HOSTNAME}}/${local_hostname}/g' | sed 's/{{HOST}}/${host}/g' | sed 's/{{FNAME}}/$fname/g' | sed 's/{{QUEUE}}/$queue/g' | sed 's/{{MEMORY}}/$memory/g'`
     2309       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'`
    23172310       eval line=\"$line\"
    23182311       echo  "$line"                               >>  $jobfile
     
    23362329       do
    23372330          (( i = i + 1 ))
    2338           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/{{LOCAL_HOSTNAME}}/${local_hostname}/g' | sed 's/{{HOST}}/${host}/g' | sed 's/{{FNAME}}/$fname/g'`
     2331          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'`
    23392332          eval line=\"$line\"
    23402333          echo  "$line"                            >>  $jobfile
     
    23432336
    23442337       echo "set -x"                               >>  $jobfile
    2345        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}_${fname}"  >>  $jobfile
     2338       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
    23462339       echo "%%END%%"                              >>  $jobfile
    23472340       echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" "  >>  $jobfile
     
    24082401          echo  "   echo \" \" "                      >>  $jobfile
    24092402          echo  "   echo \"+++ file ${remotepathin[$i]} could not be created\" "   >>  $jobfile
    2410           echo  "   echo \"    please check, if directory exists on $host!\" "  >>  $jobfile
     2403          echo  "   echo \"    please check, if directory exists on $host_identifier!\" "  >>  $jobfile
    24112404          echo  "   echo \"+++ PALMRUN will not be continued\" "  >>  $jobfile
    24122405          echo  "   execute_palmrun=false"            >>  $jobfile
     
    24242417
    24252418       # PROVIDE THE PATH OF THE LOCAL PALMRUN-SCRIPT FOR THE SAME REASON
    2426     echo  "LOCAL_PALMRUN_PATH=$PALM_BIN"                   >>  $jobfile
     2419    echo  "LOCAL_PALMRUN_PATH=${source_path}/../SCRIPTS"   >>  $jobfile
    24272420    echo  "export LOCAL_PALMRUN_PATH"                      >>  $jobfile
    24282421
     
    24412434       then
    24422435
    2443           echo " *** transfer of job to remote host via scp"
    2444           echo "     scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host}_${job_id}"
    2445           scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host}_${job_id}
    2446 
     2436          echo " "
     2437          echo "  *** transfer of job to remote host via scp"
     2438          if [[ $do_trace = true ]]
     2439          then
     2440             echo "     scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host_identifier}_${job_id}"
     2441          fi
     2442          scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${host_identifier}_${job_id}
     2443
     2444          echo " "
     2445          echo "  *** submit the job (output of submit command, e.g. the job-id, may follow)"
     2446          if [[ $do_trace = true ]]
     2447          then
     2448             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"
     2449          fi
     2450          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
     2451
     2452       elif [[ $create_batch_job = true ]]
     2453       then
     2454
     2455          eval  local_jobcatalog=$local_jobcatalog
     2456          cp  $jobfile  ${local_jobcatalog}/${host_identifier}_${job_id}
     2457          cd $local_jobcatalog
    24472458          echo " "
    24482459          echo " *** submit the job"
    2449           echo "     cd $remote_jobcatalog; $submit_command ${host}_${job_id}; rm ${host}_${job_id}  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1"
    2450           echo "cd $remote_jobcatalog; $submit_command ${host}_${job_id}; rm ${host}_${job_id}"  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1
    2451 
    2452        elif [[ $create_batch_job = true ]]
    2453        then
    2454 
    2455           eval  local_jobcatalog=$local_jobcatalog
    2456           cp  $jobfile  ${local_jobcatalog}/${host}_${job_id}
    2457           cd $local_jobcatalog
    2458           echo " "
    2459           echo "--- submit the job"
    2460           echo "$submit_command ${host}_${job_id}"
    2461           $submit_command ${host}_${job_id}
    2462           rm ${host}_${job_id}
     2460          if [[ $do_trace = true ]]
     2461          then
     2462             echo "$submit_command ${host_identifier}_${job_id}"
     2463          fi
     2464          $submit_command ${host_identifier}_${job_id}
     2465          rm ${host_identifier}_${job_id}
    24632466          cd -  > /dev/null
    24642467
Note: See TracChangeset for help on using the changeset viewer.