Changeset 2404 for palm/trunk/SCRIPTS/palmrun
- Timestamp:
- Sep 5, 2017 9:33:14 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmrun
r2396 r2404 110 110 threads_per_task=1 111 111 tmpcreate=false 112 tmp_data_catalog=""113 112 transfer_problems=false 114 113 user_source_path="" … … 121 120 122 121 # 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 ]] 125 123 then 126 124 … … 152 150 153 151 # 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) 156 153 printf "\n+++ palmrun killed by \"^C\" \n\n" 157 154 locat=control_c … … 297 294 298 295 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 299 314 # READ AND EVALUATE THE CONFIGURATION-FILE 300 315 [[ $silent = false ]] && printf "\n\n Reading the configuration file... " … … 439 454 fi 440 455 441 if [[ "$write_binary" = "" ]]442 then443 write_binary=false444 fi445 456 446 457 # DETERMINE THE CALL STATUS … … 611 622 then 612 623 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" 616 627 printf "\n Please check the output of the palmrun-call" 617 628 printf "\n that you did on your local host." … … 659 670 # LIST ALL MODIFIED SOURCE CODE FILES 660 671 Filenames="" 661 svn status > tmp_ mrun672 svn status > tmp_svnstatus 662 673 while read line 663 674 do … … 672 683 fi 673 684 fi 674 done < tmp_mrun 685 done < tmp_svnstatus 686 rm -rf tmp_svnstatus 675 687 676 688 … … 1170 1182 job_id=${fname}.$run_id 1171 1183 1172 TEMPDIR=$ tmp_user_catalog/$job_id1184 TEMPDIR=$fast_io_catalog/$job_id 1173 1185 fi 1174 1186 … … 1547 1559 tmpcreate=true 1548 1560 cd $TEMPDIR 1549 cp $ tmp_user_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*} $TEMPDIR1561 cp $fast_io_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*} $TEMPDIR 1550 1562 printf "\n *** changed to temporary directory: $TEMPDIR" 1551 1563 … … 1927 1939 if [[ $running_on_remote = true && "$remote_loginnode" != "" ]] 1928 1940 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\" " 1930 1943 fi 1931 1944 printf "\n$dashes" … … 2026 2039 if [[ "$remote_loginnode" != "" ]] 2027 2040 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_loginnode2041 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 2029 2042 else 2030 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]} … … 2301 2314 do 2302 2315 (( 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'` 2304 2317 eval line=\"$line\" 2305 2318 echo "$line" >> $jobfile … … 2330 2343 2331 2344 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}" >> $jobfile2345 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 2333 2346 echo "%%END%%" >> $jobfile 2334 2347 echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" " >> $jobfile 2335 2348 echo "$submit_command $scpjob_file" >> $jobfile 2336 2349 echo "rm $scpjob_file" >> $jobfile 2337 echo "rm $job_transfer_protocol_file">> $jobfile2350 echo "rm -rf $job_transfer_protocol_file" >> $jobfile 2338 2351 echo "set -x" >> $jobfile 2339 2352 echo " ' exit" >> $jobfile … … 2365 2378 echo "cd $TEMPDIR" >> $jobfile 2366 2379 echo "export TEMPDIR=$TEMPDIR" >> $jobfile 2367 echo "cp $ tmp_user_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*} ." >> $jobfile2380 echo "cp $fast_io_catalog/SOURCES_FOR_RUN_$fname/{*,.[!.]*} ." >> $jobfile 2368 2381 echo "export PATH=.:\$PATH" >> $jobfile 2369 2382 echo "export execute_palmrun=true" >> $jobfile
Note: See TracChangeset
for help on using the changeset viewer.