Ignore:
Timestamp:
Feb 23, 2018 2:04:07 PM (7 years ago)
Author:
raasch
Message:

fname renamed jobname

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmrun

    r2799 r2834  
    2727# -----------------
    2828# $Id: palmrun 2718 2018-01-02 08:49:38Z maronga $
     29# "fname" renamed to "jobname"
     30#
     31# 2718 2018-01-02 08:49:38Z maronga
    2932# parameters are allowed in output commands (OC:)
    3033#
     
    152155 execution_error=false
    153156 fileconnection_file=trunk/SCRIPTS/.palm.iofiles
    154  fname=test
     157 jobname=test
    155158 global_revision=""
    156159 host_configuration="default"
     
    238241       (B)   delete_temporary_catalog=false; prc="$prc -B";;
    239242       (C)   restart_run=true; prc="$prc -C";;
    240        (d)   fname=$OPTARG; prc="$prc -d$OPTARG";;
     243       (d)   jobname=$OPTARG; prc="$prc -d$OPTARG";;
    241244       (F)   create_jobfile_only=true;;
    242245       (G)   global_revision=$OPTARG; prc="$prc -G'$OPTARG'";;
     
    330333
    331334
     335    # FOR COMPATIBILITY REASONS SET OLD ENVIRONMENT VARIABLE
     336 export fname=$jobname
     337
     338
    332339    # BUILD THE CONFIGURATION-FILE NAME AND THE SOURCES_FOR_RUN-FOLDER NAME
    333340 config_file=.palm.config.$host_configuration
    334  sources_for_run_catalog=SOURCES_FOR_RUN_${host_configuration}_$fname
     341 sources_for_run_catalog=SOURCES_FOR_RUN_${host_configuration}_$jobname
    335342
    336343
     
    10681075       eval filename=${pathin_pre[$i]}/${endin_pre[$i]}
    10691076    else
    1070        eval filename=${pathin_pre[$i]}/${fname}${endin_pre[$i]}
     1077       eval filename=${pathin_pre[$i]}/${jobname}${endin_pre[$i]}
    10711078    fi
    10721079
     
    11001107    else
    11011108
    1102           # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME BASENAME ($fname) AND
     1109          # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME BASENAME ($jobname) AND
    11031110          # CREATE A LIST FOR THE DETECTED BASENAME ENDINGS
    11041111       if [[ "${multin[$i]}" = true ]]
     
    11291136              fi
    11301137
    1131                  # remove the fname from the beginning
    1132               length_fname=${#fname}
    1133               ending=${basefilename:${length_fname}}
     1138                 # remove the jobname from the beginning
     1139              length_jobname=${#jobname}
     1140              ending=${basefilename:${length_jobname}}
    11341141
    11351142                 # remove the ending given in the .iofiles from the beginning
     
    11931200             eval filename=${pathin[$nr_of_input_files]}/${endin[$nr_of_input_files]}
    11941201          else
    1195              eval filename=${pathin[$nr_of_input_files]}/${fname}${endin[$nr_of_input_files]}
     1202             eval filename=${pathin[$nr_of_input_files]}/${jobname}${endin[$nr_of_input_files]}
    11961203          fi
    11971204
     
    12731280                frelin[$nr_of_input_files]=${endin[$nr_of_input_files]}.$cyclestring
    12741281             else
    1275                 frelin[$nr_of_input_files]=${fname}${endin[$nr_of_input_files]}.$cyclestring
     1282                frelin[$nr_of_input_files]=${jobname}${endin[$nr_of_input_files]}.$cyclestring
    12761283             fi
    12771284          else
     
    12801287                frelin[$nr_of_input_files]=${endin[$nr_of_input_files]}
    12811288             else
    1282                 frelin[$nr_of_input_files]=${fname}${endin[$nr_of_input_files]}
     1289                frelin[$nr_of_input_files]=${jobname}${endin[$nr_of_input_files]}
    12831290             fi
    12841291          fi
     
    13141321       fi
    13151322       (( maxcycle = 0 ))
    1316        eval filename=${pathout_pre[$i]}/${fname}${endout_pre[$i]}
     1323       eval filename=${pathout_pre[$i]}/${jobname}${endout_pre[$i]}
    13171324       eval catalogname=${pathout_pre[$i]}
    13181325       if ! ls $filename* 1>/dev/null 2>&1
     
    13611368 then
    13621369    run_id=$RANDOM
    1363     job_id=${fname}.$run_id
     1370    job_id=${jobname}.$run_id
    13641371
    13651372    tempdir=$fast_io_catalog/$job_id
     
    16051612 fi
    16061613 printf "|                                                                        | \n"
    1607  column1="base name of files:"; column2=$fname
     1614 column1="base name of files:"; column2=$jobname
    16081615 printf "| %-25s%-45s | \n" "$column1" "$column2"
    16091616 column1="activation string list:"; column2=$(echo $activation_string_list)
     
    17881795
    17891796       # NOW CREATE THE SOURCES_FOR_RUN FOLDER
    1790     palmbuild  -v  $use_existing_sources_folder  -h $host_configuration  -d $fname
     1797    palmbuild  -v  $use_existing_sources_folder  -h $host_configuration  -d $jobname
    17911798
    17921799    if [[ $? != 0 ]]
     
    20532060       # (FILE ENVPAR WILL BE READ BY PALM)
    20542061    cat  >  ENVPAR  <<  EOF
    2055  &envpar  run_identifier = '$fname', host = '$host_configuration',
     2062 &envpar  run_identifier = '$jobname', host = '$host_configuration',
    20562063          write_binary = .${write_binary}., tasks_per_node = $tasks_per_node,
    20572064          maximum_parallel_io_streams = $maximum_parallel_io_streams,
     
    23032310       then
    23042311
    2305           eval filename=${pathout[$i]}/${fname}${endout[$i]}
     2312          eval filename=${pathout[$i]}/${jobname}${endout[$i]}
    23062313
    23072314             # DETERMINE THE CYCLE NUMBER
     
    24452452                transfer_failed=false
    24462453                printf "\n  >>> OUTPUT: ${localout[$i]}$catalog_string  $append_string by SCP to"
    2447                 printf "\n              ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}$catalog_string\n"
     2454                printf "\n              ${pathout[$i]}/${host_configuration}_${jobname}${endout[$i]}$catalog_string\n"
    24482455
    24492456                   # TRANSFER VIA SCP
    24502457                if [[ "$remote_loginnode" != "" ]]
    24512458                then
    2452                    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
     2459                   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
    24532460                else
    2454                    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]}
     2461                   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]}
    24552462                fi
    24562463                [[ $? != 0 ]]  &&  transfer_failed=true
     
    24612468                then
    24622469                   printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
    2463                    printf "      ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}_$run_id\n"
     2470                   printf "      ${pathout[$i]}/${host_configuration}_${jobname}${endout[$i]}_$run_id\n"
    24642471
    24652472                      # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
     
    24712478                      mkdir -p  $local_catalog
    24722479                   fi
    2473                    eval  cp  ${localout[$i]}  ${pathout[$i]}/${host_configuration}_${fname}${endout[$i]}_$run_id
     2480                   eval  cp  ${localout[$i]}  ${pathout[$i]}/${host_configuration}_${jobname}${endout[$i]}_$run_id
    24742481                   transfer_problems=true
    24752482                fi
     
    26792686
    26802687       # BUILD THE PALMRUN-COMMAND TO BE CALLED IN THE BATCH-JOB
    2681     palmrun_com="$palmrun_script_name -d $fname -h $host_configuration -m $memory -t $cpumax -q $queue -r $run_id -U $local_username"
     2688    palmrun_com="$palmrun_script_name -d $jobname -h $host_configuration -m $memory -t $cpumax -q $queue -r $run_id -U $local_username"
    26822689    [[ "$activation_string_list" != "" ]]  &&  palmrun_com=${palmrun_com}" -a \"$activation_string_list\""
    26832690    [[ "$global_revision" != "" ]]  &&  palmrun_com=${palmrun_com}" -G \"$global_revision\""
     
    27612768
    27622769       echo "set -x"                               >>  $jobfile
    2763        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
     2770       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
    27642771       echo "%%END%%"                              >>  $jobfile
    27652772       echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" "  >>  $jobfile
Note: See TracChangeset for help on using the changeset viewer.