Changeset 22 for palm/trunk


Ignore:
Timestamp:
Feb 28, 2007 7:37:45 AM (17 years ago)
Author:
raasch
Message:

compilation of utilities with mbuild, mrun_path replaced by PALM_BIN, no statistik-log

Location:
palm/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS

    • Property svn:ignore set to
      *.x
  • palm/trunk/SCRIPTS/mbuild_new

    r9 r22  
    11#!/bin/ksh
    2 # mbuild - Programmuebersetzungsscript   Version:  @(#)MBUILD 1.0    10/02/07
     2# mbuild - Programmuebersetzungsscript   Version:  @(#)MBUILD 1.0    28/02/07
    33
    44     # Prozedur zur Uebersetzung von Programmteilen mittels make-Mechanismus
     
    7979     # 07/02/07 - Siggi - adapted for RIAM (neck)
    8080     # 10/02/07 - Siggi - all hpmuk-related code removed
     81     # 28/02/07 - Siggi - compilation of utility programs added (option -u)
    8182
    8283
    8384
    8485    # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
     86 compile_utility_programs=false
    8587 config_file=.mrun.config
    8688 host=all
     
    122124
    123125    # SHELLSCRIPT-OPTIONEN EINLESEN
    124  while  getopts  :c:h:m:rs:  option
     126 while  getopts  :c:h:m:rs:u  option
    125127 do
    126128   case  $option  in
     
    130132       (r)   remote_mode=batch;;
    131133       (s)   suf=$OPTARG;;
     134       (u)   compile_utility_programs=true;;
    132135       (\?)  printf "\n  +++ unknown option $OPTARG \n";
    133136             locat=parameter; exit;;
     
    754757    fi
    755758
     759    remote_ud=${remote_source_path}/../UTIL
    756760
    757761       # REMOTE-PFAD FUER MAKE-DEPOSITORY ERMITTELN
     
    12221226
    12231227
     1228             # GLEICHE AKTIONEN FUER DIE UTILITY-PROGRAMME DURCHFUEHREN
     1229             # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
     1230             # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
     1231          if [[ $compile_utility_programs = true ]]
     1232          then
     1233
     1234             echo "  *** copying utility programs to \"${remote_addres}:${remote_ud}/\" "
     1235             cd  ${local_source_path}/../UTIL
     1236             echo "      remote_ud=\"$remote_ud\" "
     1237
     1238             if [[ $remote_host != lctit ]]
     1239             then
     1240                ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud})"
     1241             else
     1242                   # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS
     1243                   # MIT SSH, DESHALB AUFRUF PER PIPE
     1244                print "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud})"  |  ssh ${remote_username}@${remote_addres}  2>&1
     1245             fi
     1246
     1247             if [[ $local_host = decalpha ]]
     1248             then
     1249                   # DECALPHA BENUTZT BEI NICHTANGABE DES VOLLSTÄNDIGEN PFADES
     1250                   # IRGENDEIN ANDERES SCP (WAS NICHT FUNKTIONIERT). AUSSERDEM
     1251                   # KOENNEN DOLLAR-ZEICHEN NICHT BENUTZT WERDEN
     1252                remote_ud=`echo $remote_ud | sed 's/\$HOME\///'`
     1253                /bin/scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}
     1254             else
     1255                scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}
     1256             fi
     1257
     1258
     1259
     1260                # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
     1261                # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
     1262                # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
     1263                # Z.B. DIE PFADE ZUM COMPILER)
     1264             echo "  *** execute \"make\" on remote host"
     1265
     1266             if [[ $remote_host = nech ]]
     1267             then
     1268                make_call_string="sxmake  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
     1269             else
     1270                make_call_string="make  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$loader_options\" "
     1271             fi
     1272
     1273             if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
     1274             then
     1275
     1276                ssh  ${remote_username}@${remote_addres}  "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" 2>&1 | tee ${remote_host}_last_make_protokoll
     1277
     1278             elif [[ $remote_host = ibmb  ||  $remote_host = ibmh ]]
     1279             then
     1280
     1281                print "export OBJECT_MODE=64; cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
     1282
     1283             elif [[ $remote_host = lctit ]]
     1284             then
     1285
     1286                echo  " "  >  ${remote_host}_last_make_protokoll
     1287                while [[ $(cat ${remote_host}_last_make_protokoll | grep -c "Forwarding to N1GE") = 0 ]]
     1288                do
     1289                   print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
     1290                done
     1291
     1292             else
     1293
     1294                print "cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
     1295
     1296             fi
     1297
     1298             if [[ $(grep -c MAKE_ERROR ${remote_host}_last_make_protokoll) != 0 ]]
     1299             then
     1300                printf "\a\n  +++ error(s) occurred during compiling or linking on host \"$remote_host\" "
     1301                if [[ $silent = false ]]
     1302                then
     1303                   answer=dummy
     1304                   printf "\n"
     1305                   while [[ "$answer" != c  &&  "$answer" != k ]]
     1306                   do
     1307                      printf "  >>> continue / list errors / kill mbuild (c/l/k) ? "
     1308                      read  answer
     1309                      if [[ "$answer" = l ]]
     1310                      then
     1311                         more ${remote_host}_last_make_protokoll
     1312                      fi
     1313                   done
     1314                   if [[ $answer = k ]]
     1315                   then
     1316                      locat=user_abort; exit
     1317                   fi
     1318                fi
     1319             fi
     1320          fi    # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME
     1321
     1322
    12241323             # NUR AUF EINEM HLRN-RECHNER UEBERSETZEN
    12251324          [[ $remote_host = ibmb  ||  $remote_host = ibmh ]]  &&  ibm_hb_done=true
     
    12281327
    12291328             # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF LOKALEM RECHNER AUSFUEHREN
     1329          echo " "
    12301330          echo "  *** execute \"make\" on local host"
    12311331
     
    12601360          tar -cf  ${mainprog}_current_version.tar  *.$suf *.o *.mod
    12611361
     1362
     1363             # COMPILE THE UTILITY PROGRAMS
     1364          if [[ $compile_utility_programs = true ]]
     1365          then
     1366             printf "\n\n"
     1367             echo "  *** compiling the utility programs ..."
     1368             cd ${local_source_path}/../UTIL
     1369             make  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$loader_options"
     1370             cd  -  > /dev/null
     1371          fi
     1372
     1373
    12621374             # NUR EINMAL AUF LCMUK UEBERSETZEN
    12631375          [[ $remote_host = lcmuk ]]  &&  lcmuk_done=true
  • palm/trunk/SCRIPTS/mrun_new

    r21 r22  
    109109     # 14/02/07 - Siggi  - dvrp support for neck added
    110110     # 28/02/07 - Siggi  - empty lines in configuration file are accepted
     111     #                     mrun_path replaced by PALM_BIN
    111112
    112113
     
    243244 trap 'if [[ $locat != localhost ]]
    244245       then
    245           if [[ ! -f ${mrun_path}/statistik/mrun_statistik ]]
    246           then
    247              cat  >  ${mrun_path}/statistik/mrun_statistik  <<  %STATEND%
    248 MRUN-calls on $localhost
    249 
    250 date and time                      user        localhost   remotehost  termination mrun-command
    251 --------------------------------------------------------------------------------------------------------------------
    252 %STATEND%
    253              chmod  666  ${mrun_path}/statistik/mrun_statistik
    254           fi
    255 
    256              # EINTRAG IN DIE STATISTIK-DATEI
    257           string4=$host
    258           string5=$locat
    259           if [[ "$job_on_file" = ""  &&  $locat != control_c  &&  $locat != user_abort ]]
    260           then
    261              if [[ $do_batch = true ]]
    262              then
    263                 printf "$string1$string2$string3$string4$string5$mrun_com \n"  >>  ${mrun_path}/statistik/mrun_statistik
    264              else
    265                 printf "$string1$string2$string3$string4$string5$mc \n"  >>  ${mrun_path}/statistik/mrun_statistik
    266              fi
    267           fi
     246#          if [[ ! -f ${mrun_path}/statistik/mrun_statistik ]]
     247#          then
     248#             cat  >  ${mrun_path}/statistik/mrun_statistik  <<  %STATEND%
     249#MRUN-calls on $localhost
     250#
     251#date and time                      user        localhost   remotehost  termination mrun-command
     252#--------------------------------------------------------------------------------------------------------------------
     253#%STATEND%
     254#             chmod  666  ${mrun_path}/statistik/mrun_statistik
     255#          fi
     256#
     257#             # EINTRAG IN DIE STATISTIK-DATEI
     258#          string4=$host
     259#          string5=$locat
     260#          if [[ "$job_on_file" = ""  &&  $locat != control_c  &&  $locat != user_abort ]]
     261#          then
     262#             if [[ $do_batch = true ]]
     263#             then
     264#                printf "$string1$string2$string3$string4$string5$mrun_com \n"  >>  ${mrun_path}/statistik/mrun_statistik
     265#             else
     266#                printf "$string1$string2$string3$string4$string5$mc \n"  >>  ${mrun_path}/statistik/mrun_statistik
     267#             fi
     268#          fi
     269          continue
    268270       fi
    269271
     
    313315
    314316
     317    # CHECK IF THE PATH FOR THE PALM BINARIES (SCRIPTS+UTILITY-PROGRAMS) HAS
     318    # BEEN SET
     319 if [[ "$PALM_BIN" = "" ]]
     320 then
     321    printf "\n  +++ environment variable PALM_BIN has not been set"
     322    printf "\n      please set it to the directory where the PALM scripts are located"
     323    locat=palm_bin; exit
     324 fi
     325
     326
    315327    # EVTL. NAMEN DES LOKALEN RECHNERS MIT UEBERGREIFENDEM NAMEN VERSEHEN
    316328 case  $localhost_realname  in
    317      (atmos)                mrun_path=/home/siggi/pub
    318                             localhost=lcide;;
    319      (bora|breva|elephanta|gallego|gregale|hababai|irifi|levanto|maestro|orkan|ostria|poniente|quanero|scirocco|vorias)  mrun_path=/home/raasch/pub
    320                             localhost=lcmuk;;
    321      (breg*-en0|berni*-en0) mrun_path=/home/b/niksiraa/pub
    322                             localhost=ibmb; archive_system=tivoli;;
    323      (cs*)                  mrun_path=/pf/b/b323011/pub
    324                             localhost=nech; archive_system=ut;;
    325      (gate|n-sx)            mrun_path=/home/DSRC/NC/tatuyama/pub
    326                             PATH=$PATH:/usr/bin/nqsII:$mrun_path
    327                             localhost=neck;;
    328      (ground.yonsei.ac.kr)  mrun_path=/usr/users/raasch/pub
    329                             localhost=decalpha;;
    330      (gfdl3.yonsei.ac.kr)   mrun_path=/usr2/users/raasch/pub
    331                             localhost=decalpha;;
    332      (gfdl5)                mrun_path=/usr1/users/raasch/pub
    333                             localhost=ibmy;;
    334      (gwdk081.gwdg.de|gwdk082.gwdg.de|gwdk083.gwdg.de)  mrun_path=/usr/users/sraasch/pub
    335                             localhost=ibm;;
    336      (hreg*-en0|hanni*-en0) mrun_path=/home/h/niksiraa/pub
    337                             localhost=ibmh; archive_system=tivoli;;
    338      (nobel*)               mrun_path=/edun/z051nyg/pub
    339                             localhost=ibms;;
    340      (sun1|sun2)            mrun_path=/home/nhbksira/pub/
    341                             localhost=unics;;
    342      (tgg*)                 mrun_path=/home2/usr5/mkanda/pub
    343                             localhost=lctit;;
     329     (atmos)                localhost=lcide;;
     330     (bora|breva|elephanta|gallego|gregale|hababai|irifi|levanto|maestro|orkan|ostria|poniente|quanero|scirocco|vorias)  localhost=lcmuk;;
     331     (breg*-en0|berni*-en0) localhost=ibmb; archive_system=tivoli;;
     332     (cs*)                  localhost=nech; archive_system=ut;;
     333     (gate|n-sx)            PATH=$MRUN_BIN:$PATH:/usr/bin/nqsII; localhost=neck;;
     334     (ground.yonsei.ac.kr)  localhost=decalpha;;
     335     (gfdl3.yonsei.ac.kr)   localhost=decalpha;;
     336     (gfdl5)                localhost=ibmy;;
     337     (hreg*-en0|hanni*-en0) localhost=ibmh; archive_system=tivoli;;
     338     (nobel*)               localhost=ibms;;
     339     (sun1|sun2)            localhost=unics;;
     340     (tgg*)                 localhost=lctit;;
    344341     (*)                    printf "\n  +++ Host \"$localhost_realname\" not admitted for mrun \n"
    345342                            locat=localhost; exit;;
     
    37943791       # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
    37953792    echo  "cat > $mrun_script_name <<\"%END%\""  >>  $jobfile
    3796     cat   ${mrun_path}/$mrun_script_name         >>  $jobfile
     3793    cat   ${PALM_BIN}/$mrun_script_name          >>  $jobfile
    37973794    echo  "%END%"                                >>  $jobfile
    37983795    if [[ $host = lctit ]]
     
    38493846
    38503847       # EBENSO LOKALEN MRUN-KATALOG UEBERGEBEN
    3851     echo  "LOCAL_MRUN_PATH=$mrun_path"                  >>  $jobfile
     3848    echo  "LOCAL_MRUN_PATH=$PALM_BIN"                   >>  $jobfile
    38523849    echo  "export LOCAL_MRUN_PATH"                      >>  $jobfile
    38533850
Note: See TracChangeset for help on using the changeset viewer.