- Timestamp:
- Sep 21, 2017 12:57:25 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmbuild
r2487 r2489 27 27 # ----------------- 28 28 # $Id$ 29 # ask for compilation, if SOURCES_FOR_RUN_... exists 30 # 31 # 2487 2017-09-21 11:30:10Z raasch 29 32 # bugfix: abort in case of compiling/linking errors in silent mode 30 33 # … … 70 73 printf "\n\n *** palmbuild finished \n\n" 71 74 exit 0 72 fi' exit 75 fi 76 rm -rf ${source_path}/${host_identifier}_last_make_protocol 77 ' exit 73 78 74 79 75 80 # IN CASE OF TERMINAL-BREAK: 76 81 trap 'printf "\n\n +++ palmbuild killed by \"^C\" \n\n" 82 rm -rf ${source_path}/${host_identifier}_last_make_protocol 77 83 exit 78 84 ' 2 … … 509 515 echo " *** creating utilities on remote host" 510 516 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\" " 511 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_proto koll512 513 if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_proto koll) != 0 ]]517 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_protocol 518 519 if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protocol) != 0 ]] 514 520 then 515 521 printf "\a\n +++ error(s) occurred during compiling or linking of utilities" … … 525 531 if [[ "$answer" = l ]] 526 532 then 527 more ${host_identifier}_last_make_proto koll533 more ${host_identifier}_last_make_protocol 528 534 fi 529 535 done … … 546 552 echo " *** compile PALM sources on remote host" 547 553 make_call_string="make $make_options PROG=$program_name F90=$compiler_name COPT=\"$cpp_options\" F90FLAGS=\"$compiler_options\" LDFLAGS=\"$linker_options\" " 548 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_proto koll549 550 if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_proto koll) != 0 ]]554 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_protocol 555 556 if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protocol) != 0 ]] 551 557 then 552 558 printf "\a\n +++ error(s) occurred during compiling or linking for host \"$host_identifier\" " … … 561 567 if [[ "$answer" = l ]] 562 568 then 563 more ${host_identifier}_last_make_proto koll569 more ${host_identifier}_last_make_protocol 564 570 fi 565 571 done … … 585 591 then 586 592 587 # FIRST CHECK, IF A DEPOSITORY EXISTS ON THE REMOTE MACHINE 588 echo "[[ ! -d ${make_depository} ]] && echo depository not found" | ssh -q $ssh_key ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll 589 593 # FIRST CHECK, IF COMPILED SOURCES FOR THIS RUN IDENTIFIER EXISTS 594 # AND ASK, IF THEY SHALL BE USED 595 echo "[[ -d $fast_io_catalog/SOURCES_FOR_RUN_$fname ]] && echo sources for run found" | ssh -q $ssh_key ${remote_username}@${remote_ip} 2>&1 > ${host_identifier}_last_make_protocol 596 if [[ $(grep -c "sources for run found" ${host_identifier}_last_make_protocol) != 0 ]] 597 then 598 printf "\a\n *** compiled sources for run \"$fname\" found on remote host in folder" 599 printf "\n $fast_io_catalog/SOURCES_FOR_RUN_$fname" 600 answer=dummy 601 printf "\n\n" 602 while [[ "$answer" != y && "$answer" != n ]] 603 do 604 printf " >>> shall they be used (y/n) ? " 605 read answer 606 done 607 if [[ $answer = y ]] 608 then 609 exit 610 fi 611 fi 590 612 591 613 # COPY MAKE DEPOSITORY ON REMOTE MACHINE TO SOURCES_FOR_RUN_... … … 608 630 [[ "$module_commands" != "" ]] && module_commands=${module_commands}";" 609 631 echo " *** execute \"make\" on remote host" 610 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_proto koll611 612 if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_proto koll) != 0 ]]632 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_protocol 633 634 if [[ $(grep -c MAKE_ERROR ${host_identifier}_last_make_protocol) != 0 ]] 613 635 then 614 636 printf "\a\n +++ error(s) occurred during compiling or linking for host \"$host_identifier\" " … … 623 645 if [[ "$answer" = l ]] 624 646 then 625 more ${host_identifier}_last_make_proto koll647 more ${host_identifier}_last_make_protocol 626 648 fi 627 649 done … … 644 666 fi 645 667 646 rm -rf ${host_identifier}_last_make_proto koll668 rm -rf ${host_identifier}_last_make_protocol 647 669 648 670 … … 704 726 echo " *** compile PALM sources on local host" 705 727 706 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_proto koll728 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_protocol 707 729 708 730 if [[ $? != 0 ]] … … 719 741 if [[ "$answer" = l ]] 720 742 then 721 more ${host_identifier}_last_make_proto koll743 more ${host_identifier}_last_make_protocol 722 744 fi 723 745 done … … 743 765 # COLLECTED IN DIRECTORY SOURCES_FOR_RUN_... 744 766 745 # FIRST CHECK, IF A DEPOSITORY EXISTS ON THE LOCAL MACHINE 767 # FIRST CHECK, IF COMPILED SOURCES FOR THIS RUN IDENTIFIER EXISTS 768 # AND ASK, IF THEY SHALL BE USED 769 if [[ -d $fast_io_catalog/SOURCES_FOR_RUN_$fname ]] 770 then 771 printf "\a\n *** compiled sources for run \"$fname\" found on local host in folder" 772 printf "\n $fast_io_catalog/SOURCES_FOR_RUN_$fname" 773 answer=dummy 774 printf "\n\n" 775 while [[ "$answer" != y && "$answer" != n ]] 776 do 777 printf " >>> shall they be used (y/n) ? " 778 read answer 779 done 780 if [[ $answer = y ]] 781 then 782 exit 783 fi 784 fi 785 786 # SECOND CHECK, IF A DEPOSITORY EXISTS ON THE LOCAL MACHINE 746 787 if [[ ! -d ${make_depository} ]] 747 788 then
Note: See TracChangeset
for help on using the changeset viewer.