Changeset 2420
- Timestamp:
- Sep 7, 2017 6:20:11 AM (7 years ago)
- Location:
- palm/trunk/SCRIPTS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmbuild
r2412 r2420 45 45 column1="" 46 46 column2="" 47 config_file=.palm.config 48 host=default 49 host_found=false 47 host_identifier=default 50 48 locat=normal 51 49 makefile="" … … 86 84 case $option in 87 85 (d) fname=$OPTARG;; 88 (h) host =$OPTARG;;86 (h) host_identifier=$OPTARG;; 89 87 (m) makefile=$OPTARG;; 90 88 (s) suf=$OPTARG;; … … 98 96 99 97 # BUILD THE CONFIGURATION-FILE NAME 100 config_file= ${config_file}.$host98 config_file=.palm.config.$host_identifier 101 99 102 100 … … 256 254 fi 257 255 258 [[ "$remote_hostname" = "" ]] && remote_hostname=$remote_ip259 260 261 256 # GET SOURCE AND DEPOSITORY PATH ON THE REMOTE MACHINE WITHOUT EVALUATING 262 257 # THE $ … … 272 267 273 268 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} 275 270 276 271 else 277 272 278 make_depository=${base_directory}/MAKE_DEPOSITORY_${host }273 make_depository=${base_directory}/MAKE_DEPOSITORY_${host_identifier} 279 274 280 275 fi … … 286 281 printf "| %-40s%30s | \n" "$version" "$calltime" 287 282 printf "| | \n" 288 printf "| %-13s%-57s | \n" "called on:" "$ local_hostname"283 printf "| %-13s%-57s | \n" "called on:" "$(hostname) (IP:$local_ip)" 289 284 column2=$(echo $config_file | cut -c1-57 ) 290 285 printf "| %-13s%-57s | \n" "config file:" "$column2" … … 337 332 338 333 # 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\" " 340 335 341 336 … … 362 357 if [[ "$remote_ip" != "" ]] 363 358 then 364 column2= $remote_hostname365 printf "| %-20s%-50s | \n" " remote host:" "$column2"359 column2="$host_identifier" 360 printf "| %-20s%-50s | \n" "host identifier:" "$column2" 366 361 printf "| | \n" 367 362 column2=$(echo "$make_depository" | cut -c1-50 ) 368 363 printf "| %-20s%-50s | \n" "remote depository:" "$column2" 369 364 else 370 column2= $local_hostname371 printf "| %-20s%-50s | \n" " local host:" "$column2"365 column2="$host_identifier" 366 printf "| %-20s%-50s | \n" "host identifier:" "$column2" 372 367 printf "| | \n" 373 368 column2=$(echo "$make_depository" | cut -c1-50 ) … … 513 508 echo " *** creating utilities on remote host" 514 509 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_protokoll516 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 ]] 518 513 then 519 514 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\" " 521 516 if [[ $silent = false ]] 522 517 then … … 529 524 if [[ "$answer" = l ]] 530 525 then 531 more ${ remote_hostname}_last_make_protokoll526 more ${host_identifier}_last_make_protokoll 532 527 fi 533 528 done … … 547 542 echo " *** compile PALM sources on remote host" 548 543 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_protokoll550 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\" " 554 549 if [[ $silent = false ]] 555 550 then … … 562 557 if [[ "$answer" = l ]] 563 558 then 564 more ${ remote_hostname}_last_make_protokoll559 more ${host_identifier}_last_make_protokoll 565 560 fi 566 561 done … … 584 579 585 580 # 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_protokoll581 echo "[[ ! -d ${make_depository} ]] && echo depository not found" | ssh -q $ssh_key ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll 587 582 588 583 589 584 # 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" 591 586 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 592 587 593 588 594 589 # 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" 596 592 scp -q $ssh_key $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*} ${remote_username}@${remote_ip}:${fast_io_catalog}/SOURCES_FOR_RUN_$fname 597 593 … … 605 601 [[ "$module_commands" != "" ]] && module_commands=${module_commands}";" 606 602 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_protokoll608 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 ]] 610 606 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\" " 612 608 if [[ $silent = false ]] 613 609 then … … 620 616 if [[ "$answer" = l ]] 621 617 then 622 more ${ remote_hostname}_last_make_protokoll618 more ${host_identifier}_last_make_protokoll 623 619 fi 624 620 done … … 638 634 fi 639 635 640 rm -rf ${ remote_hostname}_last_make_protokoll636 rm -rf ${host_identifier}_last_make_protokoll 641 637 642 638 … … 698 694 echo " *** compile PALM sources on local host" 699 695 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_protokoll696 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 701 697 702 698 if [[ $? != 0 ]] 703 699 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\" " 705 701 if [[ $silent = false ]] 706 702 then … … 713 709 if [[ "$answer" = l ]] 714 710 then 715 more ${ local_hostname}_last_make_protokoll711 more ${host_identifier}_last_make_protokoll 716 712 fi 717 713 done … … 739 735 printf "\n +++ directory for local make depository:" 740 736 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\" " 742 738 locat=make_depository; exit 743 739 fi … … 745 741 746 742 # 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 " 748 744 printf "\n $fast_io_catalog/SOURCES_FOR_RUN_$fname \n" 749 745 rm -rf $fast_io_catalog/SOURCES_FOR_RUN_$fname … … 774 770 then 775 771 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\" " 777 773 if [[ $silent = false ]] 778 774 then -
palm/trunk/SCRIPTS/palmrun
r2410 r2420 59 59 compiler_name_ser="" 60 60 compiler_options="" 61 config_file=""62 61 cores="" 63 62 cores_atmos=0 … … 80 79 fname=test 81 80 global_revision="" 82 host ="default"81 host_identifier="default" 83 82 hostfile="" 84 83 hp="" … … 157 156 158 157 159 # CHECK IF THE PATH FOR THE PALM BINARIES (SCRIPTS+UTILITY-PROGRAMS) HAS160 # BEEN SET161 if [[ "$PALM_BIN" = "" ]]162 then163 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; exit166 fi167 export PATH=$PALM_BIN:$PATH168 169 170 171 158 # READ SHELLSCRIPT-OPTIONS AND REBUILD THE PALMRUN-COMMAND STRING (prc), 172 159 # WHICH WILL BE USED TO START RESTART-JOBS 173 while getopts :a:bB c:Cd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vw:xX:yY:Z option160 while getopts :a:bBCd:FG:h:jkm:M:O:q:r:R:s:t:T:u:U:vw:xX:yY:Z option 174 161 do 175 162 case $option in … … 177 164 (b) create_batch_job=true; prc="$prc -b";; 178 165 (B) delete_temporary_catalog=false; prc="$prc -B";; 179 (c) config_file=$OPTARG; prc="$prc -c$OPTARG";;180 166 (C) restart_run=true; prc="$prc -C";; 181 167 (d) fname=$OPTARG; prc="$prc -d$OPTARG";; 182 168 (F) create_jobfile_only=true;; 183 169 (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";; 185 171 (j) running_in_batch_mode=true;; 186 172 (k) keep_data_from_previous_run=true; prc="$prc -k";; … … 223 209 printf "\n -b batch-job on local machine ---" 224 210 printf "\n -B do not delete temporary directory at end ---" 225 printf "\n -c configuration file .palm.config.default"226 211 printf "\n -d base name of files attached to program test" 227 212 printf "\n -F create batch job file only ---" 228 printf "\n -h execution host\"default\" "213 printf "\n -h host identifier \"default\" " 229 214 printf "\n -k keep data from previous run" 230 215 printf "\n -m memory demand in MB (batch-jobs) 0 MB" … … 268 253 269 254 # 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 274 256 275 257 … … 462 444 # BATCH MODE AND ... 463 445 running_on_remote=true 464 host_name=$remote_hostname465 446 466 447 else … … 474 455 475 456 fi 476 host_name=$local_hostname477 457 running_on_remote=false 478 458 fi … … 1213 1193 fi 1214 1194 done 1195 cpumax=$cputime 1215 1196 1216 1197 # CHECK THE MEMORY DEMAND … … 1234 1215 while [[ -z $remote_username ]] 1235 1216 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" 1237 1218 printf "\n >>> Please type username:" 1238 1219 printf "\n >>> " … … 1243 1224 else 1244 1225 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 1249 1235 1250 1236 … … 1267 1253 if [[ $create_remote_batch_job = true ]] 1268 1254 then 1269 column1="execution on:"; column2="$ remote_hostname(username: $remote_username)"1255 column1="execution on:"; column2="$host_identifier (username: $remote_username)" 1270 1256 else 1271 1257 if [[ $running_on_remote = true ]] 1272 1258 then 1273 column1="execution on:"; column2="$ remote_hostname"1259 column1="execution on:"; column2="$host_identifier (IP:$remote_ip)" 1274 1260 else 1275 column1="execution on:"; column2="$ local_hostname"1261 column1="execution on:"; column2="$host_identifier (IP:$local_ip)" 1276 1262 fi 1277 1263 fi … … 1525 1511 fi 1526 1512 1527 palmbuild -v -h $host -d $fname 1528 rm -rf SOURCES_FOR_RUN_$fname 1513 palmbuild -v -h $host_identifier -d $fname 1529 1514 1530 1515 if [[ $? != 0 ]] … … 1534 1519 printf "\n +++ error while creating executable and/or other sources" 1535 1520 locat=execution 1521 rm -rf SOURCES_FOR_RUN_$fname 1536 1522 exit 1537 1523 … … 1539 1525 1540 1526 printf "\n$dashes\n *** executable and other sources created\n" 1527 rm -rf SOURCES_FOR_RUN_$fname 1541 1528 1542 1529 fi … … 1766 1753 # (FILE ENVPAR WILL BE READ BY PALM) 1767 1754 cat > ENVPAR << EOF 1768 &envpar run_identifier = '$fname', host = '$host ',1755 &envpar run_identifier = '$fname', host = '$host_identifier', 1769 1756 write_binary = .${write_binary}., tasks_per_node = $tasks_per_node, 1770 1757 maximum_parallel_io_streams = $maximum_parallel_io_streams, … … 2034 2021 transfer_failed=false 2035 2022 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" 2037 2024 2038 2025 # TRANSFER VIA SCP 2039 2026 if [[ "$remote_loginnode" != "" ]] 2040 2027 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_loginnode2028 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 2042 2029 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]} 2044 2031 fi 2045 2032 [[ $? != 0 ]] && transfer_failed=true … … 2050 2037 then 2051 2038 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" 2053 2040 2054 2041 # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY … … 2060 2047 mkdir -p $local_catalog 2061 2048 fi 2062 eval cp ${localout[$i]} ${pathout[$i]}/${ remote_hostname}_${fname}${endout[$i]}_$run_id2049 eval cp ${localout[$i]} ${pathout[$i]}/${host_identifier}_${fname}${endout[$i]}_$run_id 2063 2050 transfer_problems=true 2064 2051 fi … … 2221 2208 if [[ "$remote_loginnode" != "" ]] 2222 2209 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_loginnode2210 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 2224 2211 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_address2212 echo \" PATH=\\\$PATH:$LOCAL_PALMRUN_PATH; cd $LOCAL_PWD; $prc\" | ssh -q $SSH_PORTOPT $local_username@$return_address 2226 2213 fi 2227 2214 … … 2268 2255 2269 2256 # 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" 2271 2258 [[ "$activation_string_list" != "" ]] && palmrun_com=${palmrun_com}" -a \"$activation_string_list\"" 2272 2259 [[ "$global_revision" != "" ]] && palmrun_com=${palmrun_com}" -G \"$global_revision\"" … … 2284 2271 then 2285 2272 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 2287 2277 elif [[ $create_batch_job = true ]] 2288 2278 then 2289 2279 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 2291 2284 fi 2292 2285 … … 2294 2287 # DETERMINE THE FULL PATHS FOR THE JOB PROTOCOL FILES ON THE LOCAL AND 2295 2288 # REMOTE HOST 2296 job_protocol_file_local=${local_jobcatalog}/${host }_${job_id}2289 job_protocol_file_local=${local_jobcatalog}/${host_identifier}_${job_id} 2297 2290 job_protocol_file=$job_protocol_file_local 2298 2291 if [[ $create_remote_batch_job = true ]] 2299 2292 then 2300 job_protocol_file_remote=${remote_jobcatalog}/${host }_${job_id}2293 job_protocol_file_remote=${remote_jobcatalog}/${host_identifier}_${job_id} 2301 2294 job_protocol_file=$job_protocol_file_remote 2302 2295 job_transfer_protocol_file=${remote_jobcatalog}/last_job_transfer_protocol … … 2314 2307 do 2315 2308 (( 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'` 2317 2310 eval line=\"$line\" 2318 2311 echo "$line" >> $jobfile … … 2336 2329 do 2337 2330 (( 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'` 2339 2332 eval line=\"$line\" 2340 2333 echo "$line" >> $jobfile … … 2343 2336 2344 2337 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}" >> $jobfile2338 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 2346 2339 echo "%%END%%" >> $jobfile 2347 2340 echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" " >> $jobfile … … 2408 2401 echo " echo \" \" " >> $jobfile 2409 2402 echo " echo \"+++ file ${remotepathin[$i]} could not be created\" " >> $jobfile 2410 echo " echo \" please check, if directory exists on $host !\" " >> $jobfile2403 echo " echo \" please check, if directory exists on $host_identifier!\" " >> $jobfile 2411 2404 echo " echo \"+++ PALMRUN will not be continued\" " >> $jobfile 2412 2405 echo " execute_palmrun=false" >> $jobfile … … 2424 2417 2425 2418 # PROVIDE THE PATH OF THE LOCAL PALMRUN-SCRIPT FOR THE SAME REASON 2426 echo "LOCAL_PALMRUN_PATH=$ PALM_BIN">> $jobfile2419 echo "LOCAL_PALMRUN_PATH=${source_path}/../SCRIPTS" >> $jobfile 2427 2420 echo "export LOCAL_PALMRUN_PATH" >> $jobfile 2428 2421 … … 2441 2434 then 2442 2435 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 2447 2458 echo " " 2448 2459 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} 2463 2466 cd - > /dev/null 2464 2467
Note: See TracChangeset
for help on using the changeset viewer.