Changeset 2479


Ignore:
Timestamp:
Sep 19, 2017 6:12:16 AM (7 years ago)
Author:
raasch
Message:

option -A for project account added to palmrun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmrun

    r2422 r2479  
    2727# -----------------
    2828# $Id$
     29# option -A (project account number) added
     30#
     31# 2422 2017-09-08 08:25:41Z raasch
    2932# initial revision
    3033#
     
    9598 palmrun_script_name=$prc
    9699 openmp=false
     100 project_account=""
    97101 queue=none
    98102 restart_run=false
     
    155159    # READ SHELLSCRIPT-OPTIONS AND REBUILD THE PALMRUN-COMMAND STRING (prc),
    156160    # WHICH WILL BE USED TO START RESTART-JOBS
    157  while  getopts  :a:bBCd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vw:xX:yY:Z option
     161 while  getopts  :a:A:bBCd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vw:xX:yY:Z option
    158162 do
    159163   case  $option  in
    160164       (a)   activation_string_list=$OPTARG; prc="$prc -a'$OPTARG'";;
     165       (A)   project_account=$OPTARG; prc="$prc -A'$OPTARG'";;
    161166       (b)   create_batch_job=true; prc="$prc -b";;
    162167       (B)   delete_temporary_catalog=false; prc="$prc -B";;
     
    204209    printf "\n      Option  Description                              Default-Value"
    205210    printf "\n        -a    activation string list                   \"\" "
     211    printf "\n        -A    project account number                   ---"
    206212    printf "\n        -b    batch-job on local machine               ---"
    207213    printf "\n        -B    do not delete temporary directory at end ---"
     
    12741280 fi
    12751281 printf "| %-25s%-45s | \n" "$column1" "$column2"
     1282
     1283 if  [[ $running_in_batch_mode = true  ||  $create_batch_job = true  ||  $create_remote_batch_job = true ]]
     1284 then
     1285    if [[ "$project_account" !="" ]]
     1286    then
     1287       column1="project account number:"
     1288       column2="$project_account"
     1289       printf "| %-25s%-45s | \n" "$column1" "$column2"
     1290    fi
     1291 fi
    12761292
    12771293 if [[ -n $cores ]]
     
    23322348    [[ "$combine_plot_fields" = false ]]  &&  palmrun_com=${palmrun_com}" -Z"
    23332349    [[ "$max_par_io_str" != "" ]]  &&  palmrun_com=${palmrun_com}" -w $max_par_io_str"
     2350    [[ "$project_account" != "" ]]  &&  palmrun_com=${palmrun_com}" -A $project_account"
    23342351    if [[ $create_remote_batch_job = true ]]
    23352352    then
     
    23712388    do
    23722389       (( i = i + 1 ))
    2373        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'`
     2390       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'`
    23742391       eval line=\"$line\"
    23752392       echo  "$line"                               >>  $jobfile
     
    23932410       do
    23942411          (( i = i + 1 ))
    2395           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'`
     2412          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'`
    23962413          eval line=\"$line\"
    23972414          echo  "$line"                            >>  $jobfile
Note: See TracChangeset for help on using the changeset viewer.