Ignore:
Timestamp:
Sep 5, 2017 9:33:14 AM (7 years ago)
Author:
raasch
Message:

further simplifications in palmrun and palmbuild

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmrun

    r2396 r2404  
    110110 threads_per_task=1
    111111 tmpcreate=false
    112  tmp_data_catalog=""
    113112 transfer_problems=false
    114113 user_source_path=""
     
    121120
    122121    # ERROR HANDLING IN CASE OF EXIT
    123  trap 'rm -rf  $working_directory/tmp_mrun
    124        if [[ $locat != normal  &&  $locat != control_c ]]
     122 trap 'if [[ $locat != normal  &&  $locat != control_c ]]
    125123       then
    126124
     
    152150
    153151    # ACTIONS IN CASE OF TERMINAL-BREAK (CONTROL-C):
    154  trap 'rm -rf  $working_directory/tmp_mrun
    155        [[ $tmpcreate = true ]]  &&  (cd; rm -rf $TEMPDIR)
     152 trap '[[ $tmpcreate = true ]]  &&  (cd; rm -rf $TEMPDIR)
    156153       printf "\n+++ palmrun killed by \"^C\" \n\n"
    157154       locat=control_c
     
    297294
    298295
     296    # CHECK, IF THE ACTIVATION_STRING_LIST HAS BEEN GIVEN
     297 if [[ "$activation_string_list" = "" ]]
     298 then
     299    printf "\n\n  +++ no activation string list given: "
     300    printf "\n        please set palmrun option \"-a\" "
     301    locat=palmrun_option; exit 
     302 fi
     303
     304
     305    # SET VARIABLE TO ACTIVATE PALM BINARY OUTPUT FOR RESTARTS
     306 if [[ $(echo $activation_string_list | grep -c "restart") != 0 ]]
     307 then
     308    write_binary=true
     309 else
     310    write_binary=false
     311 fi
     312
     313
    299314    # READ AND EVALUATE THE CONFIGURATION-FILE
    300315 [[ $silent = false ]]  &&  printf "\n\n    Reading the configuration file... "
     
    439454 fi
    440455
    441  if [[ "$write_binary" = "" ]]
    442  then
    443     write_binary=false
    444  fi
    445456
    446457    # DETERMINE THE CALL STATUS
     
    611622 then
    612623 
    613     if [[ ! -d ${tmp_user_catalog}/SOURCES_FOR_RUN_$fname ]]
    614     then
    615        printf "\n  +++ directory ${tmp_user_catalog}/SOURCES_FOR_RUN_$fname is missing"
     624    if [[ ! -d ${fast_io_catalog}/SOURCES_FOR_RUN_$fname ]]
     625    then
     626       printf "\n  +++ directory ${fast_io_catalog}/SOURCES_FOR_RUN_$fname is missing"
    616627       printf "\n      Please check the output of the palmrun-call"
    617628       printf "\n      that you did on your local host."
     
    659670             # LIST ALL MODIFIED SOURCE CODE FILES
    660671          Filenames=""
    661           svn status  >  tmp_mrun
     672          svn status  >  tmp_svnstatus
    662673          while  read line
    663674          do
     
    672683                fi
    673684             fi
    674           done < tmp_mrun
     685          done < tmp_svnstatus
     686          rm -rf  tmp_svnstatus
    675687
    676688
     
    11701182    job_id=${fname}.$run_id
    11711183
    1172     TEMPDIR=$tmp_user_catalog/$job_id
     1184    TEMPDIR=$fast_io_catalog/$job_id
    11731185 fi
    11741186
     
    15471559       tmpcreate=true
    15481560       cd  $TEMPDIR
    1549        cp  $tmp_user_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  $TEMPDIR
     1561       cp  $fast_io_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  $TEMPDIR
    15501562       printf "\n  *** changed to temporary directory: $TEMPDIR"
    15511563
     
    19271939          if [[ $running_on_remote = true  &&  "$remote_loginnode" != "" ]]
    19281940          then
    1929              printf "\n  *** SCP transfers to local host via remote login-node \"$remote_loginnode\" "
     1941             printf "\n  *** in case of SCP transfers to local host"
     1942             printf "\n      they will be done via remote login-node \"$remote_loginnode\" "
    19301943          fi
    19311944          printf "\n$dashes"
     
    20262039                if [[ "$remote_loginnode" != "" ]]
    20272040                then
    2028                    echo "cd $TEMPDIR; ${tmp_user_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
     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
    20292042                else
    20302043                   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]}
     
    23012314    do
    23022315       (( i = i + 1 ))
    2303        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'`
     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'`
    23042317       eval line=\"$line\"
    23052318       echo  "$line"                               >>  $jobfile
     
    23302343
    23312344       echo "set -x"                               >>  $jobfile
    2332        echo "${tmp_user_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
     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
    23332346       echo "%%END%%"                              >>  $jobfile
    23342347       echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" "  >>  $jobfile
    23352348       echo "$submit_command  $scpjob_file"        >>  $jobfile
    23362349       echo "rm $scpjob_file"                      >>  $jobfile
    2337        echo "rm $job_transfer_protocol_file"       >>  $jobfile
     2350       echo "rm -rf $job_transfer_protocol_file"   >>  $jobfile
    23382351       echo "set -x"                               >>  $jobfile
    23392352       echo "     ' exit"                          >>  $jobfile
     
    23652378    echo  "cd  $TEMPDIR"                 >>  $jobfile
    23662379    echo  "export TEMPDIR=$TEMPDIR"      >>  $jobfile
    2367     echo  "cp  $tmp_user_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ."  >>  $jobfile
     2380    echo  "cp  $fast_io_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ."  >>  $jobfile
    23682381    echo  "export PATH=.:\$PATH"         >>  $jobfile
    23692382    echo  "export execute_palmrun=true"  >>  $jobfile
Note: See TracChangeset for help on using the changeset viewer.