Ignore:
Timestamp:
Sep 7, 2017 6:20:11 AM (7 years ago)
Author:
raasch
Message:

PALM_BIN setting removed from new scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmbuild

    r2412 r2420  
    4545 column1=""
    4646 column2=""
    47  config_file=.palm.config
    48  host=default
    49  host_found=false
     47 host_identifier=default
    5048 locat=normal
    5149 makefile=""
     
    8684   case  $option  in
    8785       (d)   fname=$OPTARG;;
    88        (h)   host=$OPTARG;;
     86       (h)   host_identifier=$OPTARG;;
    8987       (m)   makefile=$OPTARG;;
    9088       (s)   suf=$OPTARG;;
     
    9896
    9997    # BUILD THE CONFIGURATION-FILE NAME
    100  config_file=${config_file}.$host
     98 config_file=.palm.config.$host_identifier
    10199
    102100
     
    256254    fi
    257255
    258     [[ "$remote_hostname" = "" ]]  &&  remote_hostname=$remote_ip
    259 
    260 
    261256       # GET SOURCE AND DEPOSITORY PATH ON THE REMOTE MACHINE WITHOUT EVALUATING
    262257       # THE $
     
    272267
    273268    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}
    275270
    276271 else
    277272
    278     make_depository=${base_directory}/MAKE_DEPOSITORY_${host}
     273    make_depository=${base_directory}/MAKE_DEPOSITORY_${host_identifier}
    279274
    280275 fi
     
    286281 printf "| %-40s%30s | \n" "$version" "$calltime"
    287282 printf "|                                                                        | \n"
    288  printf "| %-13s%-57s | \n" "called on:" "$local_hostname"
     283 printf "| %-13s%-57s | \n" "called on:" "$(hostname) (IP:$local_ip)"
    289284 column2=$(echo $config_file | cut -c1-57 )
    290285 printf "| %-13s%-57s | \n" "config file:" "$column2"
     
    337332
    338333    # 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\" "
    340335
    341336
     
    362357    if [[ "$remote_ip" != "" ]]
    363358    then
    364        column2=$remote_hostname
    365        printf "| %-20s%-50s | \n" "remote host:" "$column2"
     359       column2="$host_identifier"
     360       printf "| %-20s%-50s | \n" "host identifier:" "$column2"
    366361       printf "|                                                                        | \n"
    367362       column2=$(echo "$make_depository" | cut -c1-50 )
    368363       printf "| %-20s%-50s | \n" "remote depository:" "$column2"
    369364    else
    370        column2=$local_hostname
    371        printf "| %-20s%-50s | \n" "local host:" "$column2"
     365       column2="$host_identifier"
     366       printf "| %-20s%-50s | \n" "host identifier:" "$column2"
    372367       printf "|                                                                        | \n"
    373368       column2=$(echo "$make_depository" | cut -c1-50 )
     
    513508          echo "  *** creating utilities on remote host"
    514509          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_protokoll
    516 
    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 ]]
    518513          then
    519514             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\" "
    521516             if [[ $silent = false ]]
    522517             then
     
    529524                   if [[ "$answer" = l ]]
    530525                   then
    531                       more ${remote_hostname}_last_make_protokoll
     526                      more ${host_identifier}_last_make_protokoll
    532527                   fi
    533528                done
     
    547542          echo "  *** compile PALM sources on remote host"
    548543          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_protokoll
    550 
    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\" "
    554549             if [[ $silent = false ]]
    555550             then
     
    562557                   if [[ "$answer" = l ]]
    563558                   then
    564                       more ${remote_hostname}_last_make_protokoll
     559                      more ${host_identifier}_last_make_protokoll
    565560                   fi
    566561                done
     
    584579
    585580             # 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_protokoll
     581          echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${host_identifier}_last_make_protokoll
    587582
    588583
    589584             # 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"
    591586          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
    592587
    593588
    594589             # 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"
    596592          scp  -q  $ssh_key  $base_directory/SOURCES_FOR_RUN_$fname/{*,.[!.]*}  ${remote_username}@${remote_ip}:${fast_io_catalog}/SOURCES_FOR_RUN_$fname
    597593
     
    605601             [[ "$module_commands" != "" ]]  &&  module_commands=${module_commands}";"
    606602             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_protokoll
    608 
    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 ]]
    610606             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\" "
    612608                if [[ $silent = false ]]
    613609                then
     
    620616                      if [[ "$answer" = l ]]
    621617                      then
    622                          more ${remote_hostname}_last_make_protokoll
     618                         more ${host_identifier}_last_make_protokoll
    623619                      fi
    624620                   done
     
    638634       fi
    639635
    640        rm -rf  ${remote_hostname}_last_make_protokoll
     636       rm -rf  ${host_identifier}_last_make_protokoll
    641637
    642638
     
    698694          echo "  *** compile PALM sources on local host"
    699695
    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_protokoll
     696          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
    701697
    702698          if [[ $? != 0 ]]
    703699          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\" "
    705701             if [[ $silent = false ]]
    706702             then
     
    713709                   if [[ "$answer" = l ]]
    714710                   then
    715                       more ${local_hostname}_last_make_protokoll
     711                      more ${host_identifier}_last_make_protokoll
    716712                   fi
    717713                done
     
    739735             printf "\n  +++ directory for local make depository:"
    740736             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\" "
    742738             locat=make_depository; exit
    743739          fi
     
    745741
    746742             # 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 "
    748744          printf "\n      $fast_io_catalog/SOURCES_FOR_RUN_$fname \n"
    749745          rm -rf $fast_io_catalog/SOURCES_FOR_RUN_$fname
     
    774770             then
    775771
    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\" "
    777773                if [[ $silent = false ]]
    778774                then
Note: See TracChangeset for help on using the changeset viewer.