Changeset 2834 for palm/trunk/SCRIPTS/palmrun
- Timestamp:
- Feb 23, 2018 2:04:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmrun
r2799 r2834 27 27 # ----------------- 28 28 # $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 29 32 # parameters are allowed in output commands (OC:) 30 33 # … … 152 155 execution_error=false 153 156 fileconnection_file=trunk/SCRIPTS/.palm.iofiles 154 fname=test157 jobname=test 155 158 global_revision="" 156 159 host_configuration="default" … … 238 241 (B) delete_temporary_catalog=false; prc="$prc -B";; 239 242 (C) restart_run=true; prc="$prc -C";; 240 (d) fname=$OPTARG; prc="$prc -d$OPTARG";;243 (d) jobname=$OPTARG; prc="$prc -d$OPTARG";; 241 244 (F) create_jobfile_only=true;; 242 245 (G) global_revision=$OPTARG; prc="$prc -G'$OPTARG'";; … … 330 333 331 334 335 # FOR COMPATIBILITY REASONS SET OLD ENVIRONMENT VARIABLE 336 export fname=$jobname 337 338 332 339 # BUILD THE CONFIGURATION-FILE NAME AND THE SOURCES_FOR_RUN-FOLDER NAME 333 340 config_file=.palm.config.$host_configuration 334 sources_for_run_catalog=SOURCES_FOR_RUN_${host_configuration}_$ fname341 sources_for_run_catalog=SOURCES_FOR_RUN_${host_configuration}_$jobname 335 342 336 343 … … 1068 1075 eval filename=${pathin_pre[$i]}/${endin_pre[$i]} 1069 1076 else 1070 eval filename=${pathin_pre[$i]}/${ fname}${endin_pre[$i]}1077 eval filename=${pathin_pre[$i]}/${jobname}${endin_pre[$i]} 1071 1078 fi 1072 1079 … … 1100 1107 else 1101 1108 1102 # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME BASENAME ($ fname) AND1109 # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME BASENAME ($jobname) AND 1103 1110 # CREATE A LIST FOR THE DETECTED BASENAME ENDINGS 1104 1111 if [[ "${multin[$i]}" = true ]] … … 1129 1136 fi 1130 1137 1131 # remove the fname from the beginning1132 length_ fname=${#fname}1133 ending=${basefilename:${length_ fname}}1138 # remove the jobname from the beginning 1139 length_jobname=${#jobname} 1140 ending=${basefilename:${length_jobname}} 1134 1141 1135 1142 # remove the ending given in the .iofiles from the beginning … … 1193 1200 eval filename=${pathin[$nr_of_input_files]}/${endin[$nr_of_input_files]} 1194 1201 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]} 1196 1203 fi 1197 1204 … … 1273 1280 frelin[$nr_of_input_files]=${endin[$nr_of_input_files]}.$cyclestring 1274 1281 else 1275 frelin[$nr_of_input_files]=${ fname}${endin[$nr_of_input_files]}.$cyclestring1282 frelin[$nr_of_input_files]=${jobname}${endin[$nr_of_input_files]}.$cyclestring 1276 1283 fi 1277 1284 else … … 1280 1287 frelin[$nr_of_input_files]=${endin[$nr_of_input_files]} 1281 1288 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]} 1283 1290 fi 1284 1291 fi … … 1314 1321 fi 1315 1322 (( maxcycle = 0 )) 1316 eval filename=${pathout_pre[$i]}/${ fname}${endout_pre[$i]}1323 eval filename=${pathout_pre[$i]}/${jobname}${endout_pre[$i]} 1317 1324 eval catalogname=${pathout_pre[$i]} 1318 1325 if ! ls $filename* 1>/dev/null 2>&1 … … 1361 1368 then 1362 1369 run_id=$RANDOM 1363 job_id=${ fname}.$run_id1370 job_id=${jobname}.$run_id 1364 1371 1365 1372 tempdir=$fast_io_catalog/$job_id … … 1605 1612 fi 1606 1613 printf "| | \n" 1607 column1="base name of files:"; column2=$ fname1614 column1="base name of files:"; column2=$jobname 1608 1615 printf "| %-25s%-45s | \n" "$column1" "$column2" 1609 1616 column1="activation string list:"; column2=$(echo $activation_string_list) … … 1788 1795 1789 1796 # NOW CREATE THE SOURCES_FOR_RUN FOLDER 1790 palmbuild -v $use_existing_sources_folder -h $host_configuration -d $ fname1797 palmbuild -v $use_existing_sources_folder -h $host_configuration -d $jobname 1791 1798 1792 1799 if [[ $? != 0 ]] … … 2053 2060 # (FILE ENVPAR WILL BE READ BY PALM) 2054 2061 cat > ENVPAR << EOF 2055 &envpar run_identifier = '$ fname', host = '$host_configuration',2062 &envpar run_identifier = '$jobname', host = '$host_configuration', 2056 2063 write_binary = .${write_binary}., tasks_per_node = $tasks_per_node, 2057 2064 maximum_parallel_io_streams = $maximum_parallel_io_streams, … … 2303 2310 then 2304 2311 2305 eval filename=${pathout[$i]}/${ fname}${endout[$i]}2312 eval filename=${pathout[$i]}/${jobname}${endout[$i]} 2306 2313 2307 2314 # DETERMINE THE CYCLE NUMBER … … 2445 2452 transfer_failed=false 2446 2453 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" 2448 2455 2449 2456 # TRANSFER VIA SCP 2450 2457 if [[ "$remote_loginnode" != "" ]] 2451 2458 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_loginnode2459 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 2453 2460 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]} 2455 2462 fi 2456 2463 [[ $? != 0 ]] && transfer_failed=true … … 2461 2468 then 2462 2469 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" 2464 2471 2465 2472 # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY … … 2471 2478 mkdir -p $local_catalog 2472 2479 fi 2473 eval cp ${localout[$i]} ${pathout[$i]}/${host_configuration}_${ fname}${endout[$i]}_$run_id2480 eval cp ${localout[$i]} ${pathout[$i]}/${host_configuration}_${jobname}${endout[$i]}_$run_id 2474 2481 transfer_problems=true 2475 2482 fi … … 2679 2686 2680 2687 # 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" 2682 2689 [[ "$activation_string_list" != "" ]] && palmrun_com=${palmrun_com}" -a \"$activation_string_list\"" 2683 2690 [[ "$global_revision" != "" ]] && palmrun_com=${palmrun_com}" -G \"$global_revision\"" … … 2761 2768 2762 2769 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}" >> $jobfile2770 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 2764 2771 echo "%%END%%" >> $jobfile 2765 2772 echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" " >> $jobfile
Note: See TracChangeset
for help on using the changeset viewer.