Ignore:
Timestamp:
Feb 14, 2007 1:53:31 AM (17 years ago)
Author:
raasch
Message:

html-documentation added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mrun_new

    r1 r5  
    33##!/home/DSRC/NC/tatuyama/pub/ksh   NEEDED ON NEC AT RIAM !!!!!!!!!!
    44
    5 # mrun - Plot-Shellskript         Version:  @(#)MRUN 1.8   07/02/07
     5# mrun - Plot-Shellskript         Version:  @(#)MRUN 1.8   10/02/07
    66
    77     # Prozedur zum Starten von Modellaeufen
     
    103103     #                     sampled in SOURCES_FOR_RUN_$fname which is a
    104104     #                     subdirectory of the current working directory,
    105      #                     -s TEST  changed to  -s CHANGED_FILES  or -s CF,
     105     #                     -s TEST  changed to  -s WRITE_PERMIT  or -s WP,
    106106     #                     adapted for RIAM (neck)
     107     #                     bugfix for cycle number of output file (extout)
     108     #                     all hpmuk-related code removed
    107109
    108110
     
    125127 cond2=""
    126128 config_file=.mrun.config
    127  continuation_run=false
    128129 cpp_opts=""
    129130 cpumax=0
     
    174175 queue=none
    175176 read_from_config=""
     177 restart_run=false
    176178 return_addres=$(nslookup `hostname` 2>&1 | grep "Address:" | tail -1 | awk '{print $2}')
    177179 if [[ $return_addres = 130.75.105.158 ]]
     
    314316     (bora|breva|elephanta|gallego|gregale|hababai|irifi|levanto|maestro|orkan|ostria|poniente|quanero|scirocco|vorias)  mrun_path=/home/raasch/pub
    315317                            localhost=lcmuk;;
    316      (caurus|caver|gharra|samun|twister|viracao|yalka)  mrun_path=/home/raasch/pub/
    317                                                          localhost=hpmuk;;
    318318     (breg*-en0|berni*-en0) mrun_path=/home/b/niksiraa/pub
    319319                            localhost=ibmb; archive_system=tivoli;;
     
    357357       (B)   delete_temporary_catalog=false; mc="$mc -B";;
    358358       (c)   config_file=$OPTARG; mc="$mc -c$OPTARG";;
    359        (C)   continuation_run=true; mc="$mc -C";;
     359       (C)   restart_run=true; mc="$mc -C";;
    360360       (d)   fname=$OPTARG; mc="$mc -d$OPTARG";;
    361361       (D)   cpp_opts="$cpp_opts $OPTARG"; mc="$mc -D$OPTARG";;
     
    500500    do_remote=true
    501501    case  $host  in
    502         (hpmuk|ibm|ibmb|ibmh|ibms|ibmy|nech|neck|lctit|unics)  true;;
     502        (ibm|ibmb|ibmh|ibms|ibmy|nech|neck|lctit|unics)  true;;
    503503        (*)  printf "\n"
    504504             printf "\n  +++ execution host \"$host\" not admitted for MRUN,"
     
    843843    do_remote=true
    844844    case  $host  in
    845         (hpmuk|ibm|ibmb|ibmh|ibms|ibmy|lctit|nech|neck|unics)  true;;
     845        (ibm|ibmb|ibmh|ibms|ibmy|lctit|nech|neck|unics)  true;;
    846846        (*)  printf "\n"
    847847             printf "\n  +++ execution host \"$host\" not admitted for MRUN,"
     
    995995 then
    996996    case  $host  in
    997         (hpmuk)      queue=hpmuk;;
    998997        (ibmb)       if [[ $node_usage = shared ]]
    999998                     then
     
    12971296 then
    12981297
    1299     [[ "$source_list" = CF ]]  &&  source_list=CHANGED_FILES
    1300 
    1301     if [[ "$source_list" = CHANGED_FILES  ||  $continuation_run != true ]]
     1298    [[ "$source_list" = LM ]]  &&  source_list=LOCALLY_MODIFIED
     1299    [[ "$source_list" = WP ]]  &&  source_list=WRITE_PERMIT
     1300
     1301    if [[ $restart_run != true ]]
    13021302    then
    13031303       rm -rf  SOURCES_FOR_RUN_$fname
     
    13151315       # ALLE ERMITTELTEN DATEIEN WERDEN IM VERZEICHNIS SOURCES_FOR_RUN_...
    13161316       # GESAMMELT
    1317     if [[ "$source_list" = CHANGED_FILES ]]
     1317    if [[ "$source_list" = WRITE_PERMIT ]]
    13181318    then
    13191319
    13201320       source_list=""
    1321 
    1322           # ZUERST DAS DURCH DIE KONFIGURATIONSDATEI FESTGELEGTE
    1323           # QUELLTEXTVERZEICHNIS DURCHSUCHEN
    13241321       cd  $source_path
    13251322
     
    13541351
    13551352
     1353    elif [[ "$source_list" = LOCALLY_MODIFIED ]]
     1354    then
     1355
     1356          # MODIFIZIERTE DATEIEN DER SVN-ARBEITSKOPIE BESTIMMEN
     1357       source_list=""
     1358       cd  $source_path
     1359
     1360
     1361          # PRUEFEN, OB VERZEICHNIS UEBERHAUPT UNTER SVN-KONTROLLE STEHT
     1362       if [[ ! -d .svn ]]
     1363       then
     1364          printf "\n\n  +++ source directory"
     1365          printf "\n         \"$source_path\" "
     1366          printf "\n         is not under control of \"subversion\"."
     1367          printf "\n         Please do not use mrun-option \"-s LOCALLY MODIFIED\"\n"
     1368       fi
     1369
     1370
     1371          # ALLE MODIFIZIERTEN QUELLCODEDATEIEN AUFLISTEN
     1372       Filenames=""
     1373       svn status  |  while  read line
     1374       do
     1375          firstc=`echo $line | cut -c1`
     1376          if [[ $firstc = M  ||  $firstc = "?" ]]
     1377          then
     1378             Name=`echo "$line" | cut -c8-`
     1379             extension=`echo $Name | cut -d. -f2`
     1380             if [[ "$extension" = f90 || "$extension" = F90 || "$extension" = f || "$extension" = F || "$extension" = c ]]
     1381             then
     1382                Filenames="$Filenames "$Name
     1383             fi
     1384          fi
     1385       done
     1386
     1387
     1388          # DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN
     1389       for  dateiname  in  $Filenames
     1390       do
     1391          cp  $dateiname  $working_directory/SOURCES_FOR_RUN_$fname
     1392          source_list=$source_list"$dateiname "
     1393       done
     1394
     1395       cd -  > /dev/null
     1396
     1397
    13561398       # MITTELS OPTION -s ANGEGEBENE DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN
    13571399       # BEI AUTOMATISCHEN FORTSETZUNGSLAEUFEN SIND DORT SCHON ALLE DATEIEN
    13581400       # VORHANDEN
    1359     elif [[ "$source_list" != ""  &&  $continuation_run != true ]]
     1401    elif [[ "$source_list" != ""  &&  $restart_run != true ]]
    13601402    then
    13611403
     
    13921434       # LISTE DER ZU UEBERSETZENDEN PROGRAMMTEILE MIT ENTHALTEN IST (WENN
    13931435       # NICHT, WIRD ES DIESER LISTE HINZUGEFUEGT)
    1394     if [[ $continuation_run != true ]]
     1436    if [[ $restart_run != true ]]
    13951437    then
    13961438
     
    14121454
    14131455       # DATEIEN AUS ZUSAETZLICHEM QUELLVERZEICHNIS HINZUFUEGEN
    1414     if [[ $continuation_run != true  &&  "$add_source_path" != "" ]]
     1456    if [[ $restart_run != true  &&  "$add_source_path" != "" ]]
    14151457    then
    14161458
     
    14821524       # ALLE UNTERPROGRAMME, DIE ZU VEREINBARTEN SOFTWAREPAKETEN GEHOEREN,
    14831525       # DER LISTE DER ZU UEBERSETZENDEN DATEIEN HINZUFUEGEN
    1484     if [[ $continuation_run != true  &&  -n $package_list ]]
     1526    if [[ $restart_run != true  &&  -n $package_list ]]
    14851527    then
    14861528
     
    15221564       # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
    15231565       # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
    1524     if [[ "$use_makefile" = true  &&  "$continuation_run" != true ]]
     1566    if [[ "$use_makefile" = true  &&  "$restart_run" != true ]]
    15251567    then
    15261568       [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
     
    16631705 then
    16641706    case  $localhost  in
    1665         (hpmuk|unics)                           compiler_name=f77;;
     1707        (unics)                                 compiler_name=f77;;
    16661708        (lcmuk)                                 if [[ "$cond1" = parallel  ||  "$cond2" = parallel ]]
    16671709                                                then
     
    16951737 case  $localhost  in
    16961738     (decalpha|ibm|ibmb|ibmh|ibms|ibmy|unics)  praeproc=cpp;;
    1697      (hpmuk)                                   praeproc=/usr/ccs/lbin/cpp;;
    16981739 esac
    16991740
     
    21542195             cp  $make_depository  $TEMPDIR_COMPILE
    21552196             cd  $TEMPDIR_COMPILE
    2156              tar -xf  $make_depository  >  /dev/null
     2197             tar -xf  $make_depository  >  /dev/null  2>&1
    21572198             cd -  > /dev/null
    21582199          fi
     
    22292270       else
    22302271
    2231              # HPMUK EVTL. PRAEPROZESSOR LAUFEN LASSEN
    2232           if [[ $localhost = hpmuk ]]
    2233           then
    2234              (( i = 0 ))
    2235              new_source_list=""
    2236              for  filename  in  $source_list
    2237              do
    2238                 basename=`print $filename | cut -f1 -d"."`
    2239                 extension=`print $filename | cut -f2 -d"."`
    2240                 if [[ $extension = F  &&  $localhost != hpmuk ]]
    2241                 then
    2242                    (( i = i + 1 ))
    2243                    if (( i == 1 ))
    2244                    then
    2245                       printf "\n\n  *** preprocessor-calls:\n$striche"
    2246                    fi
    2247                    printf "\n      $praeproc  $PPOPTS  -P  $filename  >  ${basename}.f  2> /dev/null"
    2248                    $praeproc  $PPOPTS  -P  $filename  >  ${basename}.f  2> /dev/null
    2249                    new_source_list="$new_source_list "${basename}.f
    2250                    elif [[ $extension = f90 ]]
    2251                 then
    2252                    (( i = i + 1 ))
    2253                    if (( i == 1 ))
    2254                    then
    2255                       printf "\n\n  *** preprocessor-calls:\n$striche"
    2256                    fi
    2257                    mv  $filename  ${basename}.F90
    2258                    printf "\n      $praeproc  $PPOPTS  -C  -P  ${basename}.F90  >  $filename  2> /dev/null"
    2259                    $praeproc  $PPOPTS  -C  -P  ${basename}.F90  >  $filename  2> /dev/null
    2260                    new_source_list="$new_source_list "$filename
    2261                    rm -f  ${basename}.F90
    2262                 else
    2263                    new_source_list="$new_source_list "$filename
    2264                 fi
    2265              done
    2266              source_list="$new_source_list"
    2267              if (( i != 0 ))
    2268              then
    2269                 printf "\n$striche\n  *** preprocessor-calls finished\n"
    2270              fi
    2271           fi
    2272 
    22732272
    22742273             # UEBERSETZUNG DER QUELLTEXT-DATEIEN UND DES HAUPTPROGRAMMS
     
    23282327          printf "      linker-options:                    $LOPTS \n"
    23292328          printf "      source code files:                 $source_list \n"
    2330           if [[ $localhost = hpmuk ]]
    2331           then
    2332              if [[ $localhost_realname = caurus ]]
    2333              then
    2334                 $compiler_name  $C_PPOPTS  $FOPTS  $MODULE_OPTIONS  $source_list  $LOPTS
    2335              else
    2336                 remsh  caurus  "export PATH=/opt/fortran90/bin:$PATH; cd `pwd`; $compiler_name  $C_PPOPTS  $FOPTS  $MODULE_OPTIONS  $source_list  $LOPTS"
    2337              fi
    2338           else
    2339              $compiler_name  $C_PPOPTS  $FOPTS  $MODULE_OPTIONS  $LOPTS  $source_list 
    2340           fi
     2329
     2330          $compiler_name  $C_PPOPTS  $FOPTS  $MODULE_OPTIONS  $LOPTS  $source_list 
     2331
    23412332       fi
    23422333       if [[ $? != 0  ||  "$compile_error" = true  ||  "$module_compile_error" = true ]]
     
    26832674          exit
    26842675       fi
    2685        if [[ $localhost = hpmuk ]]
    2686        then
    2687           echo  "property sdir .,${source_path}, ${add_source_path}"  >  .dderc
    2688           dde  a.out
    2689        elif [[ $localhost = decalpha ]]
     2676       if [[ $localhost = decalpha ]]
    26902677       then
    26912678          dxladebug  a.out
     
    35463533
    35473534                # KOPIEREN AUF EINPROZESSORMASCHINE
    3548              if [[ "${extout[$i]}" != " " ]]
     3535             if [[ "${extout[$i]}" != " "  &&  "${extout[$i]}" != "" ]]
    35493536             then
    35503537                printf "\n  >>> OUTPUT: ${localout[$i]}  to  ${pathout[$i]}.${extout[$i]}\n"
Note: See TracChangeset for help on using the changeset viewer.