Changeset 1289


Ignore:
Timestamp:
Mar 4, 2014 7:12:34 AM (8 years ago)
Author:
raasch
Message:

script comments translated to English
version update to 3.10

Location:
palm/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mbuild

    r1275 r1289  
    2222# Current revisions:
    2323# ------------------
    24 #
     24# comments translated from German to English
     25# fimm-, scirocco-, ibmy-, and sgi-specific code removed
    2526#
    2627# Former revisions:
     
    8586 compile_utility_programs=false
    8687 config_file=.mrun.config
    87  fimm=false
    8888 host=all
    8989 host_found=false
     
    9292 module_calls=""
    9393 util_compiled_localhost=false
    94  scirocco=false
    9594 silent=false
    9695 suf=f90
     
    189188
    190189
    191 
    192  [[ $local_host_real_name = scirocco ]]  &&  scirocco=true
    193  [[ $local_host_real_name = fimm.bccs.uib.no ]]  &&  fimm=true
    194 
    195 
    196 
    197190 if [[ $local_host != ibms ]]
    198191 then
     
    203196
    204197
    205     # determine the block conditions
     198    # DETERMINE THE BLOCK CONDITIONS
    206199 if [[ $block_conditions != none ]]
    207200 then
     
    422415
    423416   
    424     # GENERIERUNG DER AKTUELLEN MODELLVERSION FUER ALLE RECHNER-/UEBERSETZUNGS-
    425     # VERSIONEN, DIE IN DER KONFIGURATIONSDATEI GEFUNDEN WERDEN
     417    # GENERATE MODEL-VERSIONS FOR ALL HOST-BLOCKS
     418    # FOUND IN THE CONFIGURATION-FILE
    426419 printf "\n  *** scanning configuration file for host(s) ..."
    427420
     
    429422 while read line
    430423 do
    431        # KOMMENTARZEILEN UEBERSPRINGEN
     424       # SKIP COMMENT-LINES
    432425    [[ $(echo $line | cut -c1) = "#" ]]  &&  continue
    433426    (( ihost = ihost + 1 ))
     
    441434    (( ih = ih + 1 ))
    442435
    443        # determine remote host and conditions for the respective block
    444        # continue, only if this host has been chosen via -h option and if
    445        # conditions have been chosen via -K option
     436       # DETERMINE REMOTE HOST AND CONDITIONS FOR THE RESPECTIVE BLOCK
     437       # CONTINUE, ONLY IF THIS HOST HAS BEEN CHOSEN VIA -h OPTION AND IF
     438       # CONDITIONS HAVE BEEN CHOSEN VIA -K OPTION
    446439    remote_host_string=`echo ${hostline[$ih]} | cut -d" " -s -f3-`
    447440    remote_host=`echo $remote_host_string | cut -d" " -f1`
     
    475468    make_options=""
    476469
    477        # IP-ADRESSE DES REMOTE-RECHNERS BESTIMMEN
     470       # DETERMINE IP-ADDRES OF THE REMOTE-HOST
    478471    case  $remote_host  in
    479472        (lccrayb)        remote_addres=130.73.233.1;;
     
    484477        (lcrte)          remote_addres=133.5.185.60;;
    485478        (lcsb)           remote_addres=147.46.30.151;;
    486         (lcsgib)         remote_addres=130.73.232.102;;
    487         (lcsgih)         remote_addres=130.75.4.101;;
    488479        (lck)            remote_addres=165.132.26.61;;
    489480        (lckiaps)        remote_addres=118.128.66.223;;
     
    496487        (ibmku)          remote_addres=133.5.4.129;;
    497488        (ibms)           remote_addres=150.183.5.101;;
    498         (ibmy)           remote_addres=165.132.26.58;;
    499489        (nech)           remote_addres=136.172.44.192;;
    500490        (neck)           remote_addres=133.5.178.11;;
     
    509499
    510500
    511        # REMOTE-USERNAMEN ERMITTELN
     501       # DETERMINE REMOTE-USERNAME
    512502    line=""
    513503    found=false
     
    537527
    538528
    539        # REMOTE-QUELLTEXTPFAD ERMITTELN
     529       # DETERMINE REMOTE-SOURCE-CODE-PATH
    540530    line=""
    541531    remote_source_path=""
     
    572562
    573563
    574        # REMOTE-PFAD FUER MAKE-DEPOSITORY ERMITTELN
     564       # DETERMINE REMOTE-PATH FOR MAKE-DEPOSITORY
    575565    remote_md=""
    576566    line=""
     
    611601
    612602
    613        # COMPILERNAMEN ERMITTELN
     603       # DETERMINE COMPILERNAME
    614604    line=""
    615605    found=false
     
    639629
    640630
    641        # BEI BENUTZUNG EINES PARALLELEN COMPILERS MUSS AUCH EIN
    642        # SERIELLER COMPILERNAME ERMITTELT WERDEN
     631       # IN CASE OF PARALLEL EXECUTION (COMPILER FOR PARALLEL EXECUTION),
     632       # A SERIAL COMPILERNAME MUST BE DETERMINED ALSO
    643633    if [[ $(echo $remote_host_string | grep -c parallel) = 1 ]]
    644634    then
     
    674664
    675665
    676        # PRAEPROZESSOR-OPTIONEN/DIREKTIVEN ERMITTELN
     666       # DETERMINE PREPROCESSOR-OPTIONS AND DIRECTIVES
    677667    line=""
    678668    found=false
     
    688678       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    689679       then
    690              # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     680             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    691681          cpp_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    692682          found=true
     
    703693
    704694
    705        # RECHNERSPEZIFISCHE CPP-DIREKTIVEN HINZUFUEGEN
     695       # ADD HOST-SPECIFIC PREPROCESSOR-DIRECTIVES
    706696    for  string  in  $remote_host_string
    707697    do
     
    727717
    728718
    729        # get netCDF options
     719       # GET netCDF OPTIONS
    730720    line=""
    731721    grep  "$remote_host_string" $config_file | grep "%netcdf_inc"  >  $tmp_mbuild
     
    740730       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    741731       then
    742              # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     732             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    743733          netcdf_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    744734       fi
     
    758748       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    759749       then
    760              # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     750             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    761751          netcdf_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    762752       fi
     
    766756
    767757
    768        # get fftw options
     758       # GET FFTW OPTIONS
    769759    line=""
    770760    grep  "$remote_host_string" $config_file | grep "%fftw_inc"  >  $tmp_mbuild
     
    779769       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    780770       then
    781              # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     771             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    782772          fftw_inc=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    783773       fi
     
    797787       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    798788       then
    799              # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING ENTFERNEN
     789             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    800790          fftw_lib=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    801791       fi
     
    805795
    806796
    807        # get make options
     797       # GET MAKE OPTIONS
    808798    line=""
    809799    found=false
     
    819809       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    820810       then
    821              # remove colons from directive string
     811             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    822812          make_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    823813
     
    828818
    829819
    830        # COMPILEROPTIONEN ERMITTELN
     820       # GET COMPILER OPTIONS
    831821    line=""
    832822    found=false
     
    842832       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    843833       then
    844              # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
     834             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    845835          compiler_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    846836          found=true
    847837
    848              # add include paths for netCDF and fftw
     838             # ADD INCLUDE PATHS FOR netCDF AND FFTW
    849839          compiler_options="$compiler_options $netcdf_inc $fftw_inc"
    850840       fi
     
    860850
    861851
    862        # get login init commands, "::" is replacing a space
     852       # GET LOGIN INIT COMMANDS
    863853    line=""
    864854    grep  "$remote_host_string" $config_file | grep "%login_init_cmd"  >  $tmp_mbuild
     
    873863       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    874864       then
    875              # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
     865             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    876866          init_cmds=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    877867          init_cmds="${init_cmds};"
     
    880870
    881871
    882        # get modules to be loaded
     872       # GET MODULES TO BE LOADED
    883873    line=""
    884874    grep  "$remote_host_string" $config_file | grep "%modules"  >  $tmp_mbuild
     
    893883       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    894884       then
    895              # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
     885             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    896886          modules=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    897887       fi
     
    900890
    901891
    902        # LADER-OPTIONEN ERMITTELN
     892       # GET LINKER OPTIONS
    903893    line=""
    904894    found=false
     
    914904       if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    915905       then
    916              # EVENTUELLE DOPPELPUNKTE AUS DIREKTIVENSTRING ENTFERNEN
     906             # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    917907          loader_options=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    918908          found=true
    919909
    920              # add netCDF- and fftw-library
     910             # ADD netCDF- AND FFTW-LIBRARY
    921911          loader_options="$loader_options $netcdf_lib $fftw_lib"
    922912       fi
     
    10431033
    10441034
    1045        # make on remote host
     1035       # MAKE ON REMOTE HOST
    10461036    if [[ $remote_host != $local_host ]]
    10471037    then
     
    10491039       then
    10501040
    1051              # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
    1052              # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
     1041             # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST
     1042             # CREATE THIS DIRECTORY, IF IT DOES NOT EXIST
    10531043          echo "  *** copying \"${mainprog}_sources.tar\" to \"${remote_addres}:${remote_md}/\" "
    10541044          if [[ $remote_host != lctit ]]
     
    10561046             ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"
    10571047          else
    1058                 # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
    1059                 # MIT SSH, DESHALB AUFRUF PER PIPE
     1048                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
    10601049             print "[[ ! -d ${remote_md} ]]  &&  (echo \"  *** ${remote_md} will be created\"; mkdir -p  ${remote_md})"  |  ssh ${remote_username}@${remote_addres}  2>&1
    10611050          fi
     
    10651054
    10661055
    1067              # FALLS VORHANDEN, LETZTE VERSION AUF DEM REMOTE-RECHNER AUSPACKEN
     1056             # UNTAR PREVIOUS UPDATE ON REMOTE HOST, IF EXISTING
    10681057          echo "  *** untar previous update on remote host, if existing"
    10691058          if [[ $remote_host != lctit ]]
     
    10711060             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"
    10721061          else
    1073                 # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
    1074                 # MIT SSH, DESHALB AUFRUF PER PIPE
     1062                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
    10751063             print  "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]]  &&  tar -xf  ${mainprog}_current_version.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
    10761064          fi
    10771065
    10781066
    1079              # AKTUELLE QUELLTEXTVERSION AUF REMOTE-RECHNER AUSPACKEN
    1080           echo "  *** untar actual sources on remote host"
     1067             # UNTAR CURRENT SOURCES ON REMOTE HOST
     1068          echo "  *** untar current sources on remote host"
    10811069          if [[ $remote_host != lctit ]]
    10821070          then
    10831071             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"
    10841072          else
    1085                 # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
    1086                 # MIT SSH, DESHALB AUFRUF PER PIPE
     1073                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
    10871074             print  "cd ${remote_md}; tar -xf  ${mainprog}_sources.tar"  |  ssh  ${remote_username}@${remote_addres}  2>&1
    10881075          fi
    10891076
    10901077
    1091              # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
    1092              # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
    1093              # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
    1094              # Z.B. DIE PFADE ZUM COMPILER)
     1078             # EXECUTE MAKE WITH THOSE OPTIONS DETERMINED ABOVE
     1079             # COMMANDS WILL BE COMMUNICATED TO SSH VIA PIPE, SINCE THIS WAY THE SYSTEM- AND
     1080             # USER-PROFILES OF THE SHELL ARE COMPLETELY EXECUTED (OTHERWISE, MAKE
     1081             # WILL E.G. MISS THE COMPILER-PATHS)
    10951082          echo "  *** execute \"make\" on remote host"
    10961083
    10971084
    1098              # generate make call with make options
     1085             # GENERATE MAKE CALL WITH MAKE OPTIONS
    10991086          if [[ $remote_host = nech ]]
    11001087          then
     
    11041091          fi
    11051092
    1106              # generate command to load modules, if modules are given
     1093             # GENERATE COMMAND TO LOAD MODULES, IF MODULES ARE GIVEN
    11071094          if [[ "$modules" != "" ]]
    11081095          then
     
    11131100                module_calls="module load ${modules};"
    11141101             fi
    1115 
    1116                 # bugfix for wrong netcdf module
    1117              if [[ $remote_host = lcsgib  ||  $remote_host = lcsgih ]]
    1118              then
    1119                 if [[ $(echo $module_calls | grep -c netcdf/3.6.3-intel) != 0 ]]
    1120                 then
    1121                    module_calls="$module_calls export LD_LIBRARY_PATH=/sw/dataformats/netcdf/3.6.3-intel/lib:\$LD_LIBRARY_PATH;"
    1122                 fi
    1123              fi
    11241102          else
    11251103             module_calls=""
    11261104          fi
    11271105
    1128           if [[ $remote_host = ibmkisti  ||  $remote_host = ibms  ||  $remote_host = ibmy ]]
     1106          if [[ $remote_host = ibmkisti  ||  $remote_host = ibms ]]
    11291107          then
    11301108
     
    11351113
    11361114             print "$init_cmds $module_calls export OBJECT_MODE=64; cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
    1137 
    1138           elif [[ $remote_host = lcsgib  ||  $remote_host = lcsgih ]]
    1139           then
    1140 #             print ". /usr/share/modules/init/bash; $module_calls  cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
    1141              print "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  ${remote_username}@${remote_addres} 2>&1 | tee ${remote_host}_last_make_protokoll
    11421115
    11431116          elif [[ $remote_host = lctit ]]
     
    11861159
    11871160
    1188              # NEUE VERSION AUF REMOTE-RECHNER ZUSAMMENPACKEN
     1161             # TAR UPDATED VERSION ON THE REMOTE HOST
    11891162          printf "\n  *** tar update on remote host ..."
    11901163          if [[ $remote_host != lctit ]]
     
    11921165             ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"
    11931166          else
    1194                 # TIT ERLAUBT NUR DIE AUSFï¿œHRUNG GANZ BESTIMMTER KOMMANDOS
    1195                 # MIT SSH, DESHALB AUFRUF PER PIPE
     1167                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
    11961168             print  "cd ${remote_md}; chmod u+w *; tar -cf  ${mainprog}_current_version.tar  ${mainprog}  *.f90 *.o *.mod"  |  ssh  ${remote_username}@${remote_addres}  2>&1
    11971169          fi
    11981170
    11991171
    1200              # AKTUELLES VERSIONSVERZEICHNIS AUF REMOTE-RECHNER BEREINIGEN
    1201 #          printf "\n  *** \"make clean\" on remote host ..."
    1202 #          ssh  ${remote_username}@${remote_addres}  "cd ${remote_md}; make clean; rm ${mainprog}_sources.tar; rm *.f90 Makefile"
    1203 #          printf "\n"
    1204 
    1205 
    1206 
    1207 
    1208           # GLEICHE AKTIONEN FUER DIE UTILITY-PROGRAMME DURCHFUEHREN
    1209           # AKTUELLE QUELLTEXTVERSION INS REMOTE-QUELLTEXTVERZEICHNIS KOPIEREN
    1210           # FALLS DIESES NOCH NICHT EXISTIERT, WIRD ES ERZEUGT
     1172
     1173          # DO THE SAME THINGS FOR THE UTILITY-ROUTINES:
     1174          # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST
     1175          # CREATE THIS DIRECTORY, IF IT DOES NOT EXIST
    12111176       elif [[ $compile_utility_programs = true ]]
    12121177       then
     
    12201185             ssh  ${remote_username}@${remote_addres} "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)"
    12211186          else
    1222                 # TIT ERLAUBT NUR DIE AUSFUEHRUNG GANZ BESTIMMTER KOMMANDOS
    1223                 # MIT SSH, DESHALB AUFRUF PER PIPE
     1187                # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS
    12241188             print "[[ ! -d ${remote_ud} ]]  &&  (echo \"  *** ${remote_ud} will be created\"; mkdir -p  ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]]  &&  (echo \"  *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p  ${remote_ud}/../SCRIPTS)"  |  ssh ${remote_username}@${remote_addres}  2>&1
    12251189          fi
    12261190
    1227              # KOPIEREN DER SCRIPTE
     1191             # COPY SHELL-SCRIPTS
    12281192          scp  batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob batch_nc2vdf nc2vdf nc2vdf.ncl nc2vdf.config ${remote_username}@${remote_addres}:${remote_ud}/../SCRIPTS  >  /dev/null
    12291193
     
    12321196
    12331197
    1234              # KOPIEREN DER UTILITY-PROGRAMME
     1198             # COPY UTILITY-ROUTINES
    12351199          scp  Makefile  *.f90  ${remote_username}@${remote_addres}:${remote_ud}  >  /dev/null
    12361200
    12371201
    12381202
    1239              # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF REMOTE RECHNER AUSFUEHREN
    1240              # KOMMANDOUEBERGABE AN SSH PER PIPE, DA SO DIE SYSTEM- UND
    1241              # BENUTZERPROFILE VOLLSTAENDIG AUSGEFUEHRT WERDEN (SONST FEHLEN MAKE
    1242              # Z.B. DIE PFADE ZUM COMPILER)
     1203             # EXECUTE MAKE WITH THOSE OPTIONS DETERMINED ABOVE
     1204             # COMMANDS WILL BE COMMUNICATED TO SSH VIA PIPE, SINCE THIS WAY THE SYSTEM- AND
     1205             # USER-PROFILES OF THE SHELL ARE COMPLETELY EXECUTED (OTHERWISE, MAKE
     1206             # WILL E.G. MISS THE COMPILER-PATHS)
    12431207          echo "  *** execute \"make\" on remote host"
    12441208
     
    12501214          fi
    12511215
    1252              # generate command to load modules, if modules are given
     1216             # GENERATE COMMAND TO LOAD MODULES, IF MODULES ARE GIVEN
    12531217          if [[ "$modules" != "" ]]
    12541218          then
     
    12591223                module_calls="module load ${modules};"
    12601224             fi
    1261 
    1262                 # bugfix for wrong netcdf module
    1263              if [[ $remote_host = lcsgib  ||  $remote_host = lcsgih ]]
    1264              then
    1265                 if [[ $(echo $module_calls | grep -c netcdf/3.6.3-intel) != 0 ]]
    1266                 then
    1267                    module_calls="$module_calls export LD_LIBRARY_PATH=/sw/dataformats/netcdf/3.6.3-intel/lib:\$LD_LIBRARY_PATH;"
    1268                 fi
    1269              fi
    12701225          else
    12711226             module_calls=""
     
    12731228
    12741229
    1275           if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]
     1230          if [[ $remote_host = ibms ]]
    12761231          then
    12771232
     
    13031258          fi
    13041259
    1305        fi    # ENDE UEBERSETZUNG DER UTILITY-PROGRAMME
     1260       fi    # END OF COMPILING UTILITY-ROUTINES
    13061261
    13071262       rm -rf  ${remote_host}_last_make_protokoll
    13081263
    1309        # make on local host
     1264       # MAKE ON LOCAL HOST
    13101265    else
    13111266
    1312           # workaround for lcxe6
     1267          # INIT WORKAROUND FOR lcxe6
    13131268       if [[ $remote_host = lcxe6  ||  $remote_host = lccrayb  ||  $remote_host = lccrayf ||  $remote_host = lccrayh ]]
    13141269       then
     
    13181273       fi
    13191274
    1320        # first load modules, if given
     1275       # FIRST LOAD MODULES, IF GIVEN
    13211276       if [[ "$modules" != "" ]]
    13221277       then
     
    13361291       then
    13371292
    1338              # DEPOSITORY VERZEICHNIS ERZEUGEN, FALLS NOCH NICHT VORHANDEN
     1293             # CREATE MAKE-DEPOSITORY, IF IT DOES NOT EXIST
    13391294          eval remote_md=$remote_md
    13401295          if [[ ! -d $remote_md ]]
     
    13531308          fi
    13541309
    1355              # QUELLTEXT-DATEIEN AUS REPOSITORY INS DEPOSITORY KOPIEREN
     1310             # COPY SOURCE-CODE FROM REPOSITORY TO MAKE-DEPOSITORY
    13561311          echo " "
    13571312          echo "  *** updating sources in $remote_md"
     
    13601315          tar xf  ${mainprog}_sources.tar
    13611316
    1362              # MAKE MIT ZUVOR ERMITTELTEN OPTIONEN AUF LOKALEM RECHNER AUSFUEHREN
     1317             # CALL MAKE ON LOCAL HOST USING THE  OPTIONS DETERMINED FURTHER ABOVE
    13631318          echo " "
    13641319          echo "  *** execute \"make\" on local host"
     
    14231378             fi
    14241379
    1425              # COMPILE CHECK_NAMELIST_FILES (ONLY FOR ONE BRANCH on LOCALHOST NEEDED)
    1426 
     1380                # COMPILE CHECK_NAMELIST_FILES (ONLY FOR ONE BRANCH on LOCALHOST NEEDED)
    14271381             printf "\n\n"
    14281382             echo "  *** compiling check_namelist_files ..."
    14291383
    1430              # GET CHECK OPTIONS
     1384                # GET CHECK OPTIONS
    14311385             line=""
    14321386             found=false
     
    14421396                if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    14431397                then
    1444                    # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING UND ALLE -D ENTFERNEN
     1398                      # REMOVE COLONS FROM THE OPTION-STRING, IF THERE ARE ANY
    14451399                   line="$line "
    14461400                   copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'`
     
    14981452 rm -f  hosts_found_in_config_file
    14991453 rm -f ${local_source_path}/${mainprog}_sources_check.tar
    1500 
  • palm/trunk/SCRIPTS/mrun

    r1282 r1289  
    2222# Current revisions:
    2323# ------------------
    24 #
     24# comments translated to English
     25# necriam-, fimm-, ibmy-, and sgi-specific code removed
     26# export of variables for palm and interpret_config removed
    2527#
    2628# Former revisions:
     
    143145
    144146 
    145     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
    146 
    147  set +o allexport    # SICHERHEITSHALBER UNTERBINDEN, DA SONST EVTL. STAGEOUT
    148                      # NICHT LAUEFT (TOO MANY ARGUMENTS - PROBLEM)
    149  set +o noclobber    # EXISTIERENDE DATEIEN DUERFEN UEBERSCHRIEBEN WERDEN
     147    # DECLARATION OF VARIABLES AND THEIR DEFUALT VALUES
     148
     149 set +o allexport    # SUPPRESS EXPORT OF ALL VARIABLES, SINCE IN THE PAST THIS
     150                     # LES TO PROBLEMS IN ROUTINES CALLED BY MRUN
     151                     # (TOO MANY ARGUMENTS - PROBLEM)
     152 set +o noclobber    # EXISTING FILES ARE ALLOWED TO BE OVERWRITTEN
    150153
    151154 AddFilenames=""
     
    182185 fftw_lib=""
    183186 fftw_support=false
    184  fimm=false
    185  fname=test
     187  fname=test
    186188 fromhost=""
    187189 global_revision=""
     
    199201 link_local_output=false
    200202 localhost_realname=$(hostname)
    201  local_compile=false
    202203 local_dvrserver_running=.FALSE.
    203204 locat=normal
     
    223224 output_list=""
    224225 package_list=""
    225  punkte="..........................................................."
    226226 queue=none
    227227 read_from_config=""
     
    248248 run_coupled_model=false
    249249 run_mode=""
    250  scirocco=false
    251250 store_on_archive_system=false
    252  striche="  ----------------------------------------------------------------------------"
     251 dashes="  ----------------------------------------------------------------------------"
    253252 silent=false
    254253 source_list=""
     
    261260 usern=$LOGNAME
    262261 use_openmp=false
    263  version="MRUN  2.0 Rev$Rev$"
     262 version="MRUN  2.1 Rev$Rev$"
    264263 working_directory=`pwd`
    265264 TOPT=""
     
    268267
    269268 typeset -i  iec=0 iic=0 iin=0 ioc=0 iout=0 stagein_anz=0 stageout_anz=0
    270  typeset -x -i  memory=0   # has to be exported here, otherwise an unknown side
    271                            # effect may cause data loss when getopts is reading the
    272                            # script-option arguments
     269 typeset -x -i  memory=0   # HAS TO BE EXPORTED HERE, OTHERWISE AN UNKNOWN SIDE
     270                           # SIDE EFFECT MAY CAUSE DATA LOSS WHEN GETOPTS IS READING THE
     271                           # SCRIPT-OPTION ARGUMENTS
    273272 typeset -i  cputime i ii iia iii iio icycle inode ival jobges jobsek last_char_int maxcycle minuten nodes pes remaining_pes sekunden tp1
    274273
    275274
    276275
    277 
    278     # EINZELNE VARIABLE FUER HAUPTPROGRAMM EXPORTIEREN
    279  export  cpurest fname host localhost return_addres return_username remotecall tasks_per_node
    280 
    281     # FOLGENDE VARIABLEN MUESSEN FUER DIE INTERPRETATION DER KONFIGURATIONSDATEI
    282     # EXPORTIERT WERDEN
    283  export  afname config_file cpp_opts cpumax do_batch do_trace fname fromhost
    284  export  group_number input_list numprocs output_list queue run_mode
    285 
    286 
    287  
    288     # FEHLERBEHANDLUNG
    289     # BEI EXIT:
     276    # ERROR HANDLING IN CASE OF EXIT
    290277 trap 'rm -rf  $working_directory/tmp_mrun
    291        if [[ $locat != localhost ]]
    292        then
    293 #          if [[ ! -f ${mrun_path}/statistik/mrun_statistik ]]
    294 #          then
    295 #             cat  >  ${mrun_path}/statistik/mrun_statistik  <<  %STATEND%
    296 #MRUN-calls on $localhost
    297 #
    298 #date and time                      user        localhost   remotehost  termination mrun-command
    299 #--------------------------------------------------------------------------------------------------------------------
    300 #%STATEND%
    301 #             chmod  666  ${mrun_path}/statistik/mrun_statistik
    302 #          fi
    303 #
    304 #             # EINTRAG IN DIE STATISTIK-DATEI
    305 #          string1=`date`                  #-L35
    306 #          string2=$usern                  #-L12
    307 #          string3=$localhost_realname     #-L12
    308 #          string4=$host                   #-L12
    309 #          string5=$locat                  #-L12
    310 #          if [[ "$job_on_file" = ""  &&  $locat != control_c  &&  $locat != user_abort ]]
    311 #          then
    312 #             if [[ $do_batch = true ]]
    313 #             then
    314 #                printf "$string1$string2$string3$string4$string5$mrun_com \n"  >>  ${mrun_path}/statistik/mrun_statistik
    315 #             else
    316 #                printf "$string1$string2$string3$string4$string5$mc \n"  >>  ${mrun_path}/statistik/mrun_statistik
    317 #             fi
    318 #          fi
    319           echo " " > /dev/null
    320        fi
    321 
    322        if [[ $locat != normal  &&  $locat != control_c  &&  $locat != local_compile ]]
    323        then
    324 
    325               # EVENTUELLE ERROR-KOMMANDOS ABARBEITEN
     278       if [[ $locat != normal  &&  $locat != control_c ]]
     279       then
     280
     281              # CARRY OUT ERROR-COMMANDS GIVEN IN THE CONFIGURATION FILE (EC:)
    326282          (( i = 0 ))
    327283          while (( i < iec ))
     
    363319
    364320
    365     # BEI TERMINAL-BREAK:
     321    # ACTIONS IN CASE OF TERMINAL-BREAK (CONTROL-C):
    366322 trap 'rm -rf  $working_directory/tmp_mrun
    367323       rm -rf  $working_directory/tmp_check_namelist_files
     
    394350
    395351
    396     # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES
    397     # FUER FOLGEJOBS BENOETIGT WIRD
     352    # READ SHELLSCRIPT-OPTIONS AND REBUILD THE MRUN-COMMAND STRING (MC),
     353    # WHICH WILL BE USED TO START RESTART-JOBS
    398354 while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:zZ option
    399355 do
     
    447403
    448404
    449     # EVTL. POSITIONSPARAMETER EINLESEN
    450     # ZUR ZEIT GIBT ES NUR DEN PARAMETER ? (=KURZINFO)
     405    # SKIP GIVEN OPTIONS TO READ POSITIONAL PARAMETER, IF GIVEN
     406    # CURRENTLY ONLY PARAMETER ? (TO OUTPUT A SHORT COMMAND INFO) IS ALLOWED
    451407 (( to_shift = $OPTIND - 1 ))
    452408 shift $to_shift
    453409
    454     # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN
     410    # PRINT SHORT DESCRIPTION OF MRUN OPTIONS
    455411 if [[ "$1" = "?" ]]
    456412 then
     
    515471
    516472
    517     # KURZE STARTMELDUNG
     473    # SHORT STARTING MESSAGE
    518474 printf "\n*** $version "
    519475 printf "\n    will be executed.     Please wait ..."
     
    521477
    522478
    523     # PRUEFEN, OB KONFIGURATIONS-DATEI VORHANDEN
     479    # CHECK, IF CONFIGURATION FILE EXISTS
    524480 if [[ ! -f $config_file ]]
    525481 then
     
    531487
    532488
    533     # HOST-IDENTIFIER (local_host) AUS KONFIGURATIONSDATEI BESTIMMEN
     489    # DETERMINE THE HOST-IDENTIFIER (localhost) FROM THE CONFIGURATION FILE
    534490 line=""
    535491 grep  "%host_identifier"  $config_file  >  tmp_mrun
     
    559515
    560516
    561     # HOSTSPEZIFISCHE VARIABLEN SETZEN
     517    # SET HOST-SPECIFIC VARIABLES
    562518 case  $localhost_realname  in
    563519     (r1*|r2*|h01*|b01*)     archive_system=tivoli;;
    564520     (cs*)                   archive_system=ut;;
    565      (fimm.bccs.uib.no)      fimm=true;;
    566      (gate|n-sx)             PATH=$PALM_BIN:$PATH:/usr/bin/nqsII;;
    567      (scirocco)              scirocco=true;;
    568521 esac
    569522
    570523
    571  
    572     # BASISNAME DER INPUT-DATEIEN GLEICH ALLGEMEINEM BASISNAMEN SETZEN,
    573     # WENN NICHT VOM BENUTZER ANDERS BESTIMMT
     524    # ??? THIS SHOULD BE DECRIBED IN THE MRUN DOCUMENTATION ???
     525    # SET BASENAME OF THE INPUT-FILES TO THE GENERAL BASENAME (GIVEN BY OPTION -d),
     526    # IF IT HAS NOT BEEN SET BY THE USER DIFFERENTLY (USING OPTION -a)
    574527 [[ "$afname" = "" ]]  &&  afname=$fname
    575528
    576529
    577     # EVTL. RUN-MODUS DEN I/O-LISTEN HINZUFUEGEN
     530    # ADD RUN-FILE ACTIVATION STRINGS (GIVEN BY OPTION -r) TO THE
     531    # RESPECTIVE LISTS FOR ACTIVATING THE INPUT/OUTPUT FILE CONNECTION
     532    # STATEMENTS IN THE CONFIGURATION FILE
    578533 if [[ "$run_mode" != "" ]]
    579534 then
     
    583538
    584539
    585     # RECHNERNAMEN ABSPEICHERN, VON DEM AUS JOB GESTARTET WIRD,
    586     # ALLERDINGS NUR DANN, WENN NICHT PER OPTION -H BEREITS EIN WERT
    587     # ZUGEWIESEN WURDE (MRUN MACHT DIES IMMER, WENN ES SELBST BATCH-JOBS
    588     # STARTET)
     540    # ??? is this (and the respective option -H) really required ???
     541    # STORE HOSTNAME, FROM WHICH THE JOB IS STARTED,
     542    # BUT ONLY IF IT HASN'T BEEN ALREADY SET BY OPTION -H
     543    # (MRUN IS AUTOMATICALLY SETTING THIS OPTION IN THE MRUN-CALLS WITHIN
     544    # THOSE BATCH-JOBS, WHICH ARE CREATED BY MRUN ITSELF)
    589545 if [[ "$fromhost" = "" ]]
    590546 then
     
    593549
    594550
    595     # PRUEFEN, OB AUF REMOTE-MASCHINE GERECHNET WERDEN SOLL
    596     # WERT VON do_remote WIRD FUER DATEIVERBINDUNGEN BENOETIGT.
    597     # WENN AUF REMOTE-MASCHINE GERECHNET WIRD, IST GLEICHZEITIG KLAR,
    598     # DASS EIN BATCH-JOB GESTARTET WERDEN MUSS
     551    # CHECK, IF EXECUTION SHALL TO BE DONE ON THE REMOTE-MACHINE.
     552    # VALUE OF do_remote IS IMPORTANT FOR THE FILE CONNECTIONS.
     553    # IN CASE OF EXECUTION ON A REMOTE-MACHINE, A BATCH-JOB HAS
     554    # TO BE SUBMITTED (I.E. do_bacth=true)
    599555 if [[ -n $host  &&  "$host" != $localhost ]]
    600556 then
     
    602558    do_remote=true
    603559    case  $host  in
    604         (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|nech|necriam|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|lcsgib|lcsgih|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
     560        (ibm|ibmh|ibmkisti|ibmku|ibms|nech|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
    605561        (*)  printf "\n"
    606562             printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
     
    613569
    614570
    615      # ZUSATZBEDINGUNGEN (OPTION -K) AUSWERTEN
     571     # EVALUATE ADDITIONAL CONDITIONS GIVEN BY OPTION -K
    616572 if [[ -n $additional_conditions ]]
    617573 then
    618 #    echo $additional_conditions | cut -d" " -f1-3 | read  cond1  cond2  dummy
    619574    cond1=`echo $additional_conditions | cut -d" " -f1`
    620575    cond2=`echo $additional_conditions | cut -d" " -s -f2`
     
    630585
    631586
    632       # KOPPLUNGSEIGENSCHAFTEN (-Y) AUSWERTEN UND coupled_mode BESTIMMEN
     587      # EVALUATE MODEL COUPLING FEATURES (OPTION -Y) AND DETERMINE coupled_mode
    633588 if [[ $run_coupled_model = true ]]
    634589 then
    635590
    636     if  [[ -n $coupled_dist ]]
    637     then
    638 
    639        numprocs_atmos=`echo $coupled_dist | cut -d" " -s -f1`
    640        numprocs_ocean=`echo $coupled_dist | cut -d" " -s -f2`
    641 
    642        if (( $numprocs_ocean + $numprocs_atmos != $numprocs ))
    643        then
    644 
    645           printf "\n  +++ number of processors does not fit to specification by \"-Y\"."
    646           printf "\n      PEs (total)     : $numprocs"
    647           printf "\n      PEs (atmosphere): $numprocs_atmos"
    648           printf "\n      PEs (ocean)     : $numprocs_ocean"
    649           locat=coupling; exit
    650 
    651        fi
    652 
    653     else
    654 
    655        (( numprocs_ocean = $numprocs / 2 ))
    656        (( numprocs_atmos = $numprocs / 2 ))
    657 
    658     fi
    659     coupled_dist=`echo "$numprocs_atmos $numprocs_ocean"`
     591    numprocs_atmos=`echo $coupled_dist | cut -d" " -s -f1`
     592    numprocs_ocean=`echo $coupled_dist | cut -d" " -s -f2`
     593
     594    if (( $numprocs_ocean + $numprocs_atmos != $numprocs ))
     595    then
     596
     597       printf "\n  +++ number of processors does not fit to specification by \"-Y\"."
     598       printf "\n      PEs (total)     : $numprocs"
     599       printf "\n      PEs (atmosphere): $numprocs_atmos"
     600       printf "\n      PEs (ocean)     : $numprocs_ocean"
     601       locat=coupling; exit
     602
     603    fi
     604
    660605
    661606       # GET coupled_mode FROM THE CONFIG FILE
     
    673618
    674619
    675     # PRUEFEN, OB EVTL. BEI VORHERGEHENDEM LAUF (KETTENJOB) EINE
    676     # ARCHIVIERUNG FEHLGESCHLAGEN IST
     620    # CHECK, IF FILE-ARCHIVING HAS FAILED IN PREVIOUS JOB (OF A JOB-CHAIN)
    677621 if [[ -f ~/job_queue/ARCHIVE_ERROR_$fname ]]
    678622 then
     
    689633
    690634
    691     # WERTE VON MRUN-OPTIONEN SICHERN UND DAMIT GEGEBENENFALLS SPAETER DIE
    692     # IN DER KONFIGURAIONSDATEI ANGEGEBENEN WERTE UEBERSTEUERN
     635    # SAVE VALUES OF MRUN-OPTIONS SICHERN IN ORDER TO OVERWRITE
     636    # THOSE VALUES GIVEN IN THE CONFIGURATION-FILE
    693637 mrun_memory=$memory
    694638 mrun_group_number=$group_number
     
    697641
    698642
    699     # LESEN UND INTERPRETIEREN DER KONFIGURATIONS-DATEI VOM SHELLSCRIPT AUS
    700     # VORUEBERGEHEND ZWINGEND AUF LINUX-RECHNERN
     643    # READ AND EVALUATE THE CONFIGURATION-FILE FROM WITHIN THIS SHELLSCRIPT
     644    # (OPTION -S). THE DEFAULT IS USING THE ROUTINE interpret_config
    701645 if [[ "$read_from_config" = false ]]
    702646 then
    703647
    704648    [[ $silent = false ]]  &&  printf "\n    Reading the configuration file... "
     649
     650       # READ THE CONFIGURATION FILE LINE BY LINE
    705651    while  read zeile
    706652    do
     
    708654
    709655
    710           # ZUERST EVENTUELL VORKOMMENDE ENVIRONMENT-VARIABLEN DURCH IHRE WERTE
    711           # ERSETZEN
     656          # FIRST REPLACE ENVIRONMENT-VARIABLES BY THEIR RESPECTIVE VALUES
    712657       eval  zeile=\"$zeile\"
    713658
    714659
    715           # INTERPRETATION DER ZEILE
     660          # INTERPRET THE LINE
    716661       if [[ "$(echo $zeile)" = "" ]]
    717662       then
    718              # LEERZEILE, KEINE AKTION
     663             # EMPTY LINE, NO ACTION
    719664          continue
    720665
     
    722667       then
    723668
    724              # ZEILE IST KOMMENTARZEILE
     669             # LINE IS A COMMENT LINE
    725670          true
    726671
     
    728673       then
    729674
    730              # ZEILE DEFINIERT ENVIRONMENT-VARIABLE
     675             # LINE DEFINES AN ENVIRONMENT-VARIABLE
    731676          zeile=$(echo $zeile | cut -c2-)
    732 #          echo $zeile | cut -d" " -f1-5 | read  var  value  for_host  for_cond1  for_cond2
    733677          var=`echo $zeile | cut -d" " -f1`
    734678          value=`echo $zeile | cut -d" " -s -f2`
     
    740684          then
    741685
    742                 # BEI COMPILER- CPP- ODER LINKEROPTIONEN EVTL ":" DURCH " "
    743                 # ERSETZEN. "::" WIRD DURCH ":" ERSETZT.
     686                # REPLACE ":" BY " " IN COMPILER- CPP- OR LINKER-OPTIONS,
     687                # "::" IS REPLACED BY ":".
    744688             value=`echo $value | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
    745689
    746690
    747                 # ENVIRONMENT-VARIABLE WIRD WERT AUS KONFIGURATIONSDATEI
    748                 # ZUGEWIESEN, WENN SIE SELBST NOCH KEINEN WERT UEBER DIE
    749                 # ENTSPRECHENDE SCRIPT-OPTION ERHALTEN HAT. SOLCHE
    750                 # VARIABLEN HAETTEN DANN DEN WERT "" ODER IM INTEGER-FALL DEN
    751                 # WERT 0.  ALLGEMEINE REGEL ALSO: SCRIPT-OPTION GEHT UEBER
    752                 # KONFIGURATIONSDATEI
     691                # VALUE FROM THE CONFIGURATION-FILE IS ASSIGNED TO THE
     692                # ENVIRONMENT-VARIABLE, BUT ONLY IF NO VALUE HAS BEEN ALREADY
     693                # ASSIGNED WITHIN THIS SCRIPT (E.G. BY SCRIPT-OPTIONS).
     694                # NON-ASSIGNED VARIABLES HAVE VALUE "" OR 0 (IN CASE OF INTEGER).
     695                # HENCE THE GENERAL RULE IS: SCRIPT-OPTION OVERWRITES THE
     696                # CONFIGURATION-FILE.
    753697             if [[ "$(eval echo \$$var)" = ""  ||  "$(eval echo \$$var)" = "0" ]]
    754698             then
    755699                eval  $var=\$value
    756700
    757                    # EVTL. BILDSCHIRMAUSGABEN DER ENVIRONMENT-VARIABLEN
     701                   # TERMINAL OUTPUT OF ENVIRONMENT-VARIABLES, IF TRACEBACK IS SWITCHED on
    758702                if [[ $do_trace = true ]]
    759703                then
     
    762706             fi
    763707
    764                 # WENN ENVIRONMENT-VARIABLE HOST VEREINBART, DANN SOFORT AUSWERTEN
    765                 # WERT VON do-remote WIRD BEI DATEIVERBINDUNGEN BENOETIGT
    766                 # WENN AUF REMOTE-MASCHINE GERECHNET WIRD, IST GLEICHZEITIG KLAR,
    767                 # DASS EIN BATCH-JOB GESTARTET WERDEN MUSS
     708                # IF AN ENVIRONMENT-VARIABLE DETERMINES THE HOST, THEN EVALUATE IT IMMEDIATELY:
     709                # VALUE OF do-remote IS REQUIRED FOR THE FILE CONNECTIONS (COPY OF I/O FILES).
     710                # IF EXECUTION IS SCHEDULED FOR A REMOTE-MASCHINE, A BATCH-JOB
     711                # MUST HAVE TO BE STARTED
    768712             if [[ $var = host ]]
    769713             then
     
    773717                   do_remote=true
    774718                   case  $host  in
    775                        (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
     719                       (ibm|ibmh|ibmkisti|ibmku|ibms|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
    776720                       (*)  printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
    777721                            printf "\n      is not available"
     
    783727             fi
    784728
    785                 # VOM BENUTZER DEFINIERTE ENVIRONMENT VARIABLEN MUESSEN PRINZIPIELL
    786                 # EXPORTIERT WERDEN, DA SIE VIELLEICHT IN WEITER UNTEN AUFZURUFEN-
    787                 # DEN PROGRAMMEN BENOETIGT WERDEN
     729                # USER-DEFINED ENVIRONMENT VARIABLES MUST BE EXPORTED,
     730                # BECAUSE THEY MAY BE REQUIRED IN OTHER SCRIPTS CALLED
     731                # BY MRUN (E.G. subjob)
    788732             export  $var
    789733          fi
     
    795739       then
    796740
    797              # ZEILE DEFINIERT ERROR-KOMMANDO
     741             # LINE DEFINES ERROR-COMMAND
    798742          (( iec = iec + 1 ))
    799743          zeile=$(echo $zeile | cut -c4-)
     
    803747       then
    804748
    805              # ZEILE DEFINIERT INPUT-KOMMANDO
     749             # LINE DEFINES INPUT-COMMAND
    806750          (( iic = iic + 1 ))
    807751          zeile=$(echo $zeile | cut -c4-)
     
    811755       then
    812756
    813              # ZEILE DEFINIERT OUTPUT-KOMMANDO
     757             # LINE DEFINES OUTPUT-COMMAND
    814758          (( ioc = ioc + 1 ))
    815759          zeile=$(echo $zeile | cut -c4-)
     
    818762       else
    819763
    820              # ZEILE DEFINIERT DATEIVERBINDUNG. EINLESEN DER DATEIEIGENSCHAFTEN
    821              # s2a: in/out - Feld
    822              # s2b: loc    - Feld (optional)
    823              # s2c: tr/ar  - Feld (optional)
    824 #          echo $zeile | cut -d" " -f1-2 | read  s1  s2
     764             # LINE DEFINES FILE CONNECTION. READ THE FILE ATTRIBUTES.
     765             # s2a: in/out - field
     766             # s2b: loc    - field (optional)
     767             # s2c: tr/ar  - field (optional)
    825768          s1=`echo $zeile | cut -d" " -f1`
    826769          s2=`echo $zeile | cut -d" " -s -f2`
     
    831774             s2c=""
    832775          else
    833 #             echo $s2 | cut -d":" -f2-3 | sed 's/:/ /g' | read  s2b  s2c
    834776             s2b=`echo $s2 | cut -d":" -f2 | sed 's/:/ /g'`
    835777             s2c=`echo $s2 | cut -d":" -s -f3 | sed 's/:/ /g'`
    836778          fi
    837 #          echo $zeile | cut -d" " -f3-6 | read  s3  s4  s5  s6
    838779          s3=`echo $zeile | cut -d" " -f3`
    839780          s4=`echo $zeile | cut -d" " -s -f4`
     
    842783
    843784       
    844              # ABSPEICHERN DER DATEIVERBINDUNG, FALLS IN INPUT- ODER OUTPUT-LIST
    845              # VERMERKT. VARIABLE S3 KANN AUCH LISTE ENTHALTEN (FELDTRENNER ":")
    846              # DATEIVERBINDUNG WIRD DANN NICHT ABGESPEICHERT UND GEPRUEFT, WENN
    847              # PROGRAMMLAUF AUF REMOTE-MASCHINE ERFOLGT UND DATEI NUR LOKAL VOR-
    848              # HANDEN SEIN MUSS (D.H. s2b = loc)
     785             # STORE FILE CONNECTION, IF ACTIVATED BY ACTIVATION-STRING FROM
     786             # INPUT- OR OUTPUT-LIST.
     787             # VARIABLE S3 MAY CONTAIN A LIST OF ACTIVATION STRINGS (FIELD-SEPERATOR ":").
     788             # IF EXECUTION IS SCHEDULED FOR A REMOTE-MACHINE AND THE FILE IS ONLY
     789             # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b = loc), THE FILE CONNECTION
     790             # IS NOT CHECKED AND STORED.
    849791          IFSALT="$IFS"; IFS="$IFS:"
    850792          if [[ "$s2a" = in  &&  ! ( $do_remote = true  &&  ( "$s2b" = loc  ||  "$s2b" = locopt ) ) ]]
     
    894836
    895837
    896        # INTERPRETATION DER KONFIGURATIONSDATEI MITTELS FORTRAN 90 - PROGRAMM
     838       # EVALUATE THE CONFIGURATION-FILE BY FORTRAN-PROGRAM
    897839    [[ $silent = false ]]  &&  printf "..."
    898     export  cond1 cond2 config_file do_remote do_trace input_list localhost output_list
    899     export  interpreted_config_file=.icf.$RANDOM
    900 
    901 
    902 
    903        # ENVIRONMENT-VARIABLEN FUER INTERPRET_CONFIG UEBER NAMELIST_DATEI ZUR
    904        # VERFUEGUNG STELLEN
     840    interpreted_config_file=.icf.$RANDOM
     841
     842
     843
     844       # PROVIDE VALUES OF ENVIRONMENT-VARIABLE FOR interpret_config VIA NAMELIST-FILE
    905845    cat  >  .mrun_environment  <<  %%END%%
    906846 &mrun_environment  cond1 = '$cond1', cond2 = '$cond2',
     
    912852%%END%%
    913853
    914     if [[ $localhost_realname = "sx-fep" ]]
    915     then
    916        /home/COAR/NC/raasch/pub/interpret_config_necriam.x
     854    if [[ "$host" != $localhost ]]
     855    then
     856
     857          # REMOTE JOB FROM LOCAL HOST: JUST TAKE THE FIRST EXECUTABLE FOUND
     858       interpret_config_executable=`ls -1 ${PALM_BIN}/interpret_config*.x 2>/dev/null`
     859       if [[ $? != 0 ]]
     860       then
     861          printf "\n\n  +++ no interpret_config found"
     862          printf "\n      run \"mbuild -u -h ...\" to generate utilities for this host"
     863          locat=interpret_config; exit
     864       fi
     865       interpret_config_executable=`echo $interpret_config_executable | cut -d" " -f1`
     866       $interpret_config_executable
     867
    917868    else
    918869
    919        if [[ "$host" != $localhost ]]
    920        then
    921 
    922              # REMOTE JOB FROM LOCAL HOST: JUST TAKE THE FIRST EXECUTABLE FOUND
    923           interpret_config_executable=`ls -1 ${PALM_BIN}/interpret_config*.x 2>/dev/null`
    924           if [[ $? != 0 ]]
    925           then
    926              printf "\n\n  +++ no interpret_config found"
    927              printf "\n      run \"mbuild -u -h ...\" to generate utilities for this host"
    928              locat=interpret_config; exit
    929           fi
    930           interpret_config_executable=`echo $interpret_config_executable | cut -d" " -f1`
    931           $interpret_config_executable
    932 
     870          # CHECK, IF THERE IS AN EXECUTABLE FOR THE BLOCK
     871       if [[ ! -f ${PALM_BIN}/interpret_config${block}.x ]]
     872       then
     873          printf "\n\n  +++ no interpret_config found for given block \"$cond1 $cond2\""
     874          printf "\n      run \"mbuild -u -h ...\" to generate utilities for this block"
     875          locat=interpret_config; exit
    933876       else
    934 
    935              # CHECK, IF THERE IS AN EXECUTABLE FOR THE BLOCK
    936           if [[ ! -f ${PALM_BIN}/interpret_config${block}.x ]]
    937           then
    938              printf "\n\n  +++ no interpret_config found for given block \"$cond1 $cond2\""
    939              printf "\n      run \"mbuild -u -h ...\" to generate utilities for this block"
    940              locat=interpret_config; exit
    941           else
    942              interpret_config${block}.x
    943           fi
    944 
    945        fi
     877          interpret_config${block}.x
     878       fi
     879
    946880    fi
    947881    rm .mrun_environment
    948882
    949883
    950        # AUSFUEHRUNG DER GENERIERTEN SHELL-KOMMANDOS IN DIESER SHELL
     884       # EXECUTE SHELL-COMMANDS GENERATED BY interpret_config WITHIN THIS SHELL
    951885    chmod  u+x  $interpreted_config_file
    952886    export PATH=$PATH:.
     
    957891
    958892
    959     # OPTIONSWERTE UEBERSTEUERN KONFIGURATIONSDATEI
     893    # VALUES OF MRUN-OPTIONS OVERWRITE THOSE FROM THE CONFIGURATION-FILE
    960894 [[ $mrun_memory     != 0   ]]  &&  memory=$mrun_memory
    961895 [[ "$mrun_group_number" != "none" ]]  &&  group_number=$mrun_group_number
     
    966900
    967901
    968     # QUELLTEXTVERZEICHNIS AUF LOKALER MASCHINE AUS KONFIGURATIONSDATEI
    969     # BESTIMMEN (WUERDE SONST EVTL. DAS VERZEICHNIS DES JEWEILS UNTER -h
    970     # ANGEGEBENEN REMOTE-RECHNERS SEIN)
    971     # BEI BATCH-JOBS SIND DIE ZU UEBERSETZENDEN PROGRAMMTEILE SCHON KOMPLETT
     902    # ON THE LOCAL MACHINE, DETERMINE (FROM THE CONFIGURATION-FILE) THE PATH
     903    # FOR SOURCE-FILES TO BE COMPILED.
     904    # IN A BATCH-JOB, SOURCES (ROUTINES TO BE COMPILED) ARE COMPLETE ALREADY.
     905    # BEFORE MRUN IS CALLED IN THE JOB, SOURCES_COMPLETE = true IS ASSIGNED (SEE FURTHER BELOW).
    972906 if [[ "$SOURCES_COMPLETE" = "" ]]
    973907 then
    974908
    975        # ZUERST PRUEFEN, OB EIN GLOBALER QUELLTEXTPFAD FUER ALLE RECHNER
    976        # VEREINBART WURDE
     909       # FIRST CHECK, IF A GLOBAL SOURCE PATH (TO BE USED FOR ALL HOSTS)
     910       # HAS BEEN DEFINED
    977911    source_path=""
    978912    line=""
     
    1031965
    1032966
    1033     # GLOBALE REVISIONSNUMMER ERMITTELN (FORTSETZUNGSLAEUFEN WIRD DIESE
    1034     # DURCH OPTION -G MITGETEILT)
    1035  if [[ "$global_revision" = ""   &&  $host != "ibmkisti" ]]
     967    # GET THE GLOBAL REVISION-NUMBER OF THE SVN-REPOSITORY
     968    # (HANDED OVER TO RESTART-RUNS USING OPTION -G)
     969 if [[ "$global_revision" = ""  &&  $host != "ibmkisti" ]]
    1036970 then
    1037971    global_revision=`svnversion $source_path  2>/dev/null`
     
    1040974
    1041975
    1042     # NOCHMAL PRUEFEN, OB AUF REMOTE-MASCHINE GERECHNET WERDEN SOLL
    1043     # (HOST KANN IN KONFIGURATIONSDATEI ANDERS FESTGELEGT WORDEN SEIN)
    1044     # WERT VON do_remote WIRD FUER DATEIVERBINDUNGEN BENOETIGT.
    1045     # WENN AUF REMOTE-MASCHINE GERECHNET WIRD, IST GLEICHZEITIG KLAR,
    1046     # DASS EIN BATCH-JOB GESTARTET WERDEN MUSS
     976    # ??? das darf doch eigentlich garnicht passieren, weil optionen config-datei uebersteuern ???
     977    # CHECK AGAIN, IF EXECUTION SHALL BE DONE ON A REMOTE-HOST (BATCH-JOB).
     978    # (HOST MAY HAVE CHANGED DUE TO SETTINGS IN THE CONFIGURATION-FILE)
    1047979 if [[ -n $host  &&  "$host" != $localhost ]]
    1048980 then
     
    1050982    do_remote=true
    1051983    case  $host  in
    1052         (ibm|ibmh|ibmkisti|ibmku|ibms|ibmy|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|lcsgib|lcsgih|nech|necriam|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
     984        (ibm|ibmh|ibmkisti|ibmku|ibms|lccrayb|lccrayh|lccrayf|lcflow|lckyoto|nech|unics|lcxe6|lcxt5m|lck|lckiaps|lckordi|lckyuh|lckyut|lcsb)  true;;
    1053985        (*)  printf "\n"
    1054986             printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
     
    1061993
    1062994
    1063     # PRUEFUNG EINIGER PROZESSORZAHLANGABEN BEI RECHNUNGEN AUF PARALLELRECHNERN
     995    # IN CASE OF PARALLEL EXECUTION, CHECK SOME SPECIFICATIONS CONCERNING PROCESSOR NUMBERS
    1064996 if [[ "$cond1" = parallel  ||  "$cond2" = parallel ]]
    1065997 then
    1066998
    1067        # PRUEFEN, OB DIE ANZAHL DER ZU VERWENDENDEN PES ANGEGEBEN WURDE
     999       # CHECK, IF NUMBER OF CORES TO BE USED HAS BEEN GIVEN
    10681000    if [[ ! -n $numprocs ]]
    10691001    then
     
    10761008    fi
    10771009
    1078        # PRUEFEN, OB DIE PROZESSORANZAHL PRO KNOTEN ANGEGEBEN WURDE (GGF.
    1079        # DEFAULT-WERT SETZEN) UND OB SIE EIN GANZZAHLIGER TEILER DER
    1080        # GESAMTPROZESSORANZAHL IST
     1010       # CHECK, IF THE NUMBER OF CORES PER NODE HAS BEEN GIVEN UND IF IT IS AN
     1011       # INTEGRAL DIVISOR OF THE TOTAL NUMBER OF CORES GIVEN BY OPTION -X
    10811012    if [[ "$tasks_per_node" = ""  &&  $host != lcflow  &&  $host != lcxt5m ]]
    10821013    then
     
    11141045
    11151046
    1116        # IBMY HAT NUR EINEN KNOTEN
    1117     if [[ $host = ibmy ]]
    1118     then
    1119        if [[ "$tasks_per_node" != ""  &&  "$tasks_per_node" != "$numprocs" ]]
    1120        then
    1121           printf "\n"
    1122           printf "\n  +++ on ibmy, tasks per node (option \"-T\") must be equal to the"
    1123           printf "\n      total number of processors (option \"-X\")"
    1124           printf "\n      values of this mrun-call: \"-T $tasks_per_node\" \"-X $numprocs\""
    1125           locat=tasks_per_node; (( iec = 0 )); exit
    1126        fi
    1127     fi
    1128 
    1129 
    11301047       # SETTINGS FOR SUBJOB-COMMAND
    11311048    OOPT="-O $threads_per_task"
    11321049
    1133        # GESAMTZAHL DER KNOTEN BESTIMMEN
     1050       # SET THE TOTAL NUMBER OF NODES, REQUIRED FOR THE SUBJOB-COMMAND (SEE FURTHER BELOW)
    11341051    if [[ "$tasks_per_node" != "" ]]
    11351052    then
     
    11371054    fi
    11381055
    1139        # PRUEFEN, OB NODE USAGE EINEN ERLAUBTEN WERT HAT BZW. DEN DEFAULT
    1140        # SETZEN
     1056       # CHECK node_usage FOR ALLOWED VALUES AND SET DEFAULT VALUE, IF NECESSARY
    11411057    if [[ $node_usage = default ]]
    11421058    then
     
    11441060       then
    11451061          node_usage=shared
    1146        elif [[ $(echo $host | cut -c1-5) = lcsgi ]]
    1147        then
    1148           node_usage=singlejob
    11491062       else
    11501063          node_usage=not_shared
     
    11621075 fi
    11631076
    1164     # PRUEFEN, OB HOSTFILE EXISTIERT
     1077    # CHECK IF HOSTFILE EXISTS
    11651078 if [[ -n $hostfile ]]
    11661079 then
     
    11731086 fi
    11741087
    1175     # PRUEFEN, OB RHOSTS DATEI EXISTIERT. GEGEBENENFALLS ANLEGEN BZW. ERWEITERN
    1176  if [[ $host = ibmy  &&  $do_remote = false ]]
    1177  then
    1178     if [[ ! -f $HOME/.rhosts ]]
    1179     then
    1180        echo  "gfdl5.yonsei.ac.kr"  >  $HOME/.rhosts
    1181        printf "\n\n  *** file:"
    1182        printf "\n           $HOME/.rhosts"
    1183        printf "\n      was created\n"
    1184     fi
    1185     if [[ $(grep -c gfdl5.yonsei.ac.kr $HOME/.rhosts) = 0 ]]
    1186     then
    1187        echo  "gfdl5.yonsei.ac.kr"  >>  $HOME/.rhosts
    1188        printf "\n\n  *** file:"
    1189        printf "\n           $HOME/.rhosts"
    1190        printf "\n      was extended by the name of the current host\n"
    1191     fi
    1192  fi
    1193 
    1194 
    1195     # Set default value for the maximum number of parallel io streams
     1088
     1089    # SET DEFAULT VALUE FOR THE MAXIMUM NUMBER OF PARALLEL IO STREAMS
    11961090 if [[ "$maximum_parallel_io_streams" = "" ]]
    11971091 then
     
    12001094
    12011095
    1202     # Set port number option for calls of ssh/scp, subjob and batch_scp scripts
     1096    # SET PORT NUMBER OPTION FOR CALLS OF SSH/SCP, subjob AND batch_scp SCRIPTS
    12031097 if [[ "$scp_port" != "" ]]
    12041098 then
     
    12081102
    12091103
    1210     # FALLS NICHT VORGEGEBEN, DEFAULT-QUEUE AUF DER ZIELMASCHINE FESTLEGEN
     1104    # SET DEFAULT-QUEUE, IF NOT GIVEN
    12111105 if [[ $queue = none ]]
    12121106 then
     
    12141108        (ibmh)       queue=cluster;;
    12151109        (ibmkisti)   queue=class.32plus;;
    1216         (ibmy)       queue=parallel;;
    12171110        (lckiaps)    queue=normal;;
    12181111        (lckyoto)    queue=ph;;
    12191112        (lckyuh)     queue=fx-single;;
    12201113        (lckyut)     queue=cx-single;;
    1221         (lcsgib)     queue=testq;;
    1222         (lcsgih)     queue=testq;;
    12231114        (lctit)      queue=S;;
    12241115        (nech)       queue=none;;
    1225         (necriam)    queue=SP;;
    12261116        (unics)      queue=unics;;
    12271117    esac
     
    12291119
    12301120
    1231     # VOLLSTAENDIGE DATEINAMEN DER INPUT-FILES BILDEN,
    1232     # INPUT-DATEIEN AUF VORHANDENSEIN PRUEFEN UND EVTL. HOECHSTE ZYKLUSNUMMER
    1233     # ERMITTELN
     1121    # GENERATE FULL FILENAMES OF INPUT-FILES, INCLUDING THEIR PATH
     1122    # CHECK, IF INPUT-FILES EXIST, AND DETERMINE HIGHEST CYCLE NUMBER (IF CYCLES EXIST)
    12341123 (( i = 0 ))
    12351124 while (( i < iin ))
     
    12381127    (( maxcycle = 0 ))
    12391128
    1240        # NAMENSBILDUNG (EVTL. IST FESTER DATEINAME VORGEGEBEN)
     1129       # GENERATE PATH AND FULL FILE NAME (then-BRANCH: FIXED FULL NAME IS GIVEN, I.E. THE
     1130       # FILE IDENTIFIER IS NOT PART OF THE FILENAME))
    12411131    if [[ "${actionin[$i]}" = di ]]
    12421132    then
    1243        remotepathin[$i]=${pathin[$i]}/${endin[$i]}  # REMOTE-PFAD ERST AUF
    1244                                                     # REM-MASCHINE AUSWERTEN
     1133       remotepathin[$i]=${pathin[$i]}/${endin[$i]}  # EVALUATE REMOTE-PATH ON THE REMOTE
     1134                                                    # HOST ONLY
    12451135       eval filename=${pathin[$i]}/${endin[$i]}
    12461136    else
    1247        remotepathin[$i]=${pathin[$i]}/${afname}${endin[$i]}  # REMOTE-PFAD ERST AUF
    1248                                                              # REM-MASCHINE AUSWERTEN
     1137       remotepathin[$i]=${pathin[$i]}/${afname}${endin[$i]}  # EVALUATE REMOTE-PATH ON THE REMOTE
     1138                                                             # HOST ONLY
    12491139       eval filename=${pathin[$i]}/${afname}${endin[$i]}
    12501140    fi
    12511141    eval pathname=${pathin[$i]}
    12521142
    1253  SAVE INPUT FILE NAME FOR PARAMETER FILE CHECK
     1143       # SAVE INPUT FILE NAME FOR PARAMETER FILE CHECK
    12541144    if [[ ("${transin[$i]}" = job) && (-f $filename) ]]
    12551145    then
     
    12571147    fi
    12581148
    1259        # PRUEFEN AUF VORHANDENSEIN
     1149       # CHECK IF FILE EXISTS
    12601150    if [[ $(ls $filename* 2>&1 | grep -c "not found") = 1  || \
    12611151          $(ls $filename* 2>&1 | grep -c "nicht gefunden") = 1  || \
     
    12631153          $(ls $filename* 2>&1 | grep -c "does not exist") = 1 ]]
    12641154    then
    1265           # DATEIEN MIT EXTENSION (Z.B. NC) MUESSEN NICHT ZWINGEND VORHANDEN
    1266           # SEIN, DESHALB IN SOLCHEN FAELLEN KEIN ABBRUCH. DIES IST NUR EINE
    1267           # VORUEBERGEHENDE LOESUNG (OKT 05). NICHT ZWINGEND BENOETIGTE
    1268           # EINGABEDATEIEN SOLLTEN EINE SPEZIELLE OPTION IN DER DATEI-
    1269           # VERBINDUNGSANWEISUNG BEKOMMEN (Z.B. inopt?)
     1155
     1156          # FILES WITH ATTRIBUTE locopt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
    12701157       if [[ "${transin[$i]}" != "locopt" ]]
    12711158       then
     
    12841171    else
    12851172
    1286           # ZYKLUSNUMMER FESTSTELLEN
     1173          # DETERMINE THE FILE'S CYCLE NUMBER
    12871174       ls -1 -d $filename    >   filelist  2>/dev/null
    12881175       ls -1 -d $filename.*  >>  filelist  2>/dev/null
     
    13071194       rm filelist
    13081195
    1309           # EVTL. ZYKLUSNUMMER AN DATEINAMEN ANFUEGEN
     1196          # APPEND CYCLE NUMBER TO FILENAME
    13101197       if (( maxcycle > 0 ))
    13111198       then
     
    13231210       fi
    13241211       
    1325           # DATEINAMEN OHNE PFAD ABER MIT ZYKLUSNUMMER ABSPEICHERN,
    1326           # DA SPAETER BEI RUECKSPEICHERN VOM ARCHIVSYSTEM EVTL. BENOETIGT
     1212          # STORE FILENAME WITHOUT PATH BUT WITH CYCLE NUMBER,
     1213          # BECAUSE IT MIGHT BE REQUIRED LATER TO RESTORE THE FILE FROM AN ARCHIVE-SYSTEM
    13271214       absnamein[$i]=$filename
    13281215       if (( maxcycle > 0 ))
     
    13461233 done
    13471234   
    1348     # VOLLSTAENDIGE DATEINAMEN (OHNE $ ODER ~) DER OUTPUT-FILES BILDEN,
    1349     # OUTPUT-DATEIEN AUF VORHANDENSEIN PRUEFEN UND EVTL. HOECHSTE ZYKLUSNUMMER
    1350     # ERMITTELN ODER, FALLS NICHT VORHANDEN, PRUEFEN, OB SIE SICH ANLEGEN LASSEN
    1351     # DIESE AKTIONEN FINDEN NICHT STATT, WENN PROGRAMM AUF REMOTE-MASCHINE
    1352     # RECHNET UND DATEI ANSCHLIESSEND TRANSFERIERT WERDEN SOLL!
     1235    # GENERATE FULL FILENAMES OF OUTPUT-FILES (WITHOUT $ OR ~),
     1236    # CHECK, IF OUTPUT-FILES EXIST, AND DETERMINE HIGHEST CYCLE NUMBER (IF CYCLES EXIST),
     1237    # OR, IN CASE THAT FILE DOES NOT EXIST, CHECK, IF IT CAN BE CREATED 
     1238    # THESE ACTIONS ARE NOT CARRIED OUT, IF FILES SHALL BE TRASFERRED FROM THE REMOTE TO
     1239    # THE LOCAL HOST (BECAUSE THEIR IS NO DIRECT ACCESS TO THE LOCAL DIRECTORIES FROM THE
     1240    # REMOTE HOST)
    13531241 (( i = 0 ))
    13541242 while (( i < iout ))
     
    13761264       then
    13771265     
    1378              # OUTPUT-DATEI NICHT VORHANDEN. PRUEFEN, OB ANLEGEN MOEGLICH.
     1266             # IF OUTPUT-FILE DOES NOT EXIST CHECK, IF IT CAN BE CREATED
    13791267          if  cat /dev/null > $filename 
    13801268          then
     
    13821270          else
    13831271
    1384                 # PRUEFEN, OB KATALOG VORHANDEN UND EVTL. DIESEN ANLEGEN
     1272                # CHECK, IF THE DIRECTORY WHERE FILE SHALL BE COPIED TO EXISTS
     1273                # IF IT DOES NOT EXIST, TRY TO CREATE IT
    13851274             if [[ ! -d $catalogname ]]
    13861275             then
     
    14081297       else
    14091298
    1410              # ZYKLUSNUMMER FESTSTELLEN
     1299             # DETERMINE THE CYCLE NUMBER
    14111300          ls -1 -d $filename    >   filelist  2>/dev/null
    14121301          ls -1 -d $filename.*  >>  filelist  2>/dev/null
     
    14281317       fi
    14291318
    1430           # EVTL. ZYKLUSNUMMER AN DATEINAMEN ANFUEGEN UND PRUEFEN, OB SICH
    1431           # DATEI AUCH WIRKLICH ANLEGEN LAESST. IM APPEND-FALL MUSS AN DEN
    1432           # HOECHSTEN VORHANDENEN ZYKLUS-ANGEHAENGT WERDEN. ANLAGEPRUEFUNG
    1433           # IST DANN NATUERLICH NICHT ZULAESSIG BZW. MOEGLICH
     1319          # APPEND CYCLE NUMBER TO FILENAME AND CHECK, IF FILE CAN BE CREATED
     1320          # IN CASE OF FILE-APPEND, FILE MUST BE APPENDED TO THE ONE WITH HIGHEST CYCLE NUMBER
    14341321       if [[ "${actionout[$i]}" != a ]]
    14351322       then
     
    14551342       fi
    14561343       
    1457           # DATEINAMEN OHNE PFAD ABER MIT ZYKLUSNUMMER ABSPEICHERN,
    1458           # DA SPAETER BEI ABLAGE AUF ARCHIVSYSTEM BZW. FUER
    1459           # DATEI OUTPUT_FILE_CONNECTIONS EVTL. BENOETIGT
     1344          # STORE FILENAME WITHOUT PATH BUT WITH CYCLE NUMBER,
     1345          # BECAUSE IT MIGHT BE REQUIRED LATER TO STORE THE FILE ON AN ARCHIVE-SYSTEM
     1346          # OR TO PUT THIS FILENAME ON FILE OUTPUT_FILE_CONNECTIONS
    14601347       pathout[$i]=$filename
    14611348       if (( maxcycle > 0 ))
     
    14701357
    14711358
    1472      # DAS DVR-PAKET ERFORDERT EINE ENTSPRECHENDE BIBLIOTHEK
     1359     # THE DVR-PACKAGE REQUIRES ITS OWN LIBRARY
    14731360 if [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]]
    14741361 then
     
    14881375
    14891376
    1490      # PRUEFEN, OB ENTWEDER HAUPTPROGRAMM ODER NUR EIN AUSFUEHRBARES
    1491      # PROGRAMM VEREINBART WURDE (IN DIESEM FALL BRAUCHT IM WEITEREN NICHT
    1492      # UEBERSETZT ZU WERDEN)
     1377     # CHECK, WETHER A MAIN PROGRAM OR AN EXECUTABLE HAVE BEEN DECLARED.
     1378     # EXECUTABLES DO NOT NEED TO BE COMPILED.
    14931379 if [[ "$mainprog" = ""  &&  "$executable" = "" ]]
    14941380 then
     
    15051391
    15061392
    1507     # SOURCE-VERZEICHNIS ZUM AUFSAMMELN DER ZU UEBERSETZENDEN PROGRAMMTEILE
    1508     # ERZEUGEN. HIERHIN WERDEN SPAETER IM FALL VON BATCH-JOBS AUCH DAS MRUN-
    1509     # SCRIPTS SOWIE DIE KONFIGURATIONSDATEI KOPIERT
     1393    # CREATE SOURCE-DIRECTORY TO COLLECT ROUTINES TO BE COMPILED.
     1394    # LATER THE MRUN-SCRIPT AND CONFIGURATION-FILE WILL ALSO BE COPIED TO THIS DIRECTORY.
    15101395 if [[ $restart_run != true  &&  "$SOURCES_COMPLETE" = "" ]]
    15111396 then
     
    15151400
    15161401
    1517     # ALLE ZU UEBERSETZENDEN PROGRAMMTEILE ZUSAMMENSAMMELN
    1518     # BEI BATCH-JOBS IST DIES NICHT NOETIG, WEIL DIE PROGRAMMTEILE BEREITS DURCH
    1519     # DEN MRUN-AUFRUF ERMITTELT SIND, DER DEN BATCH-JOB GENERIERT HAT, UND
    1520     # IM VERZEICHNIS SOURCES_FOR_RUN_... ABGELEGT SIND
     1402    # COLLECT ALL ROUTINES TO BE COMPILED
     1403    # THIS IS NOT REQUIRED WITHIN BATCH-JOBS, BECAUSE ROUTINES HAVE ALREADY BEEN COLLECTED
     1404    # BY THE MRUN-CALL WHICH CREATED THE BATCH-JOB.
    15211405 if [[ $do_compile = true  &&  "$SOURCES_COMPLETE" = "" ]]
    15221406 then
     
    15271411    then
    15281412
    1529           # MODIFIZIERTE DATEIEN DER SVN-ARBEITSKOPIE BESTIMMEN
     1413          # DETERMINE MODIFIED FILES OF THE SVN WORKING COPY
    15301414       source_list=""
    15311415       cd  $source_path
    15321416
    15331417
    1534           # PRUEFEN, OB VERZEICHNIS UEBERHAUPT UNTER SVN-KONTROLLE STEHT
     1418          # CHECK, IF DIRECTORY IS UNDER SVN CONTROL
    15351419       if [[ ! -d .svn ]]
    15361420       then
     
    15421426
    15431427
    1544           # ALLE MODIFIZIERTEN QUELLCODEDATEIEN AUFLISTEN
     1428          # LIST ALL MODIFIED SOURCE CODE FILES
    15451429       Filenames=""
    15461430       svn status  >  tmp_mrun
     
    15601444
    15611445
    1562           # DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN
     1446          # COPY FILES TO SOURCES_FOR_RUN_...
    15631447       for  dateiname  in  $Filenames
    15641448       do
     
    15701454
    15711455
    1572        # MITTELS OPTION -s ANGEGEBENE DATEIEN NACH SOURCES_FOR_RUN_... KOPIEREN
    1573        # BEI AUTOMATISCHEN FORTSETZUNGSLAEUFEN SIND DORT SCHON ALLE DATEIEN
    1574        # VORHANDEN
     1456       # COPY FILES GIVEN BY OPTION -s TO DIRECTORY SOURCES_FOR_RUN_...
     1457       # AUTOMATIC RESTART RUNS JUST ACCESS THE DIRECTORY CREATED BY THE INITIAL RUN
    15751458    elif [[ "$source_list" != ""  &&  $restart_run != true ]]
    15761459    then
     
    15811464       do
    15821465
    1583              # QUELLTEXT-DATEI DARF KEINE PFADE BEINHALTEN
     1466             # SOURCE CODE FILE IS NOT ALLOWED TO INCLUDE PATH
    15841467          if [[ $(echo $filename | grep -c "/") != 0 ]]
    15851468          then
     
    16051488
    16061489
    1607        # PRUEFEN, OB ENTWEDER HAUPTPROGRAMM VORHANDEN UND ES EVTL. IN DER
    1608        # LISTE DER ZU UEBERSETZENDEN PROGRAMMTEILE MIT ENTHALTEN IST (WENN
    1609        # NICHT, WIRD ES DIESER LISTE HINZUGEFUEGT)
     1490       # CHECK, IF A MAIN PROGRAM EXISTS AND IF IT IS PART OF THE LIST OF FILES
     1491       # TO BE COMPILED. IF NOT, ADD IT TO THE LIST.
    16101492    if [[ $restart_run != true ]]
    16111493    then
     
    16271509
    16281510
    1629        # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
    1630        # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
     1511       # CHECK, IF MAKEFILE EXISTS AND COPY IT TO THE SOURCES_FOR_RUN... DIRECTORY
     1512       # NOT REQUIRED FOR RESTART RUNS, SOURCES_FOR_RUN... HAS BEEN CREATED BY THE INITIAL RUN
    16311513    if [[ "$restart_run" != true ]]
    16321514    then
     
    16421524
    16431525
    1644        # DATEIEN AUS ZUSAETZLICHEM QUELLVERZEICHNIS HINZUFUEGEN
     1526       # COPY FILES FROM OPTIONAL SOURCE PATH GIVEN IN THE CONFIGURATION FILE
    16451527    if [[ $restart_run != true  &&  "$add_source_path" != "" ]]
    16461528    then
    16471529
    1648           # GIBT ES DAS VERZEICHNIS UEBERHAUPT?
     1530          # DOES THE DIRECTORY EXIST?
    16491531       if [[ ! -d $add_source_path ]]
    16501532       then
     
    17111593             else
    17121594
    1713                 # Default User-Interface von der Liste entfernen, falls Datei
    1714                 # ein User-Interface enthaelt
    1715 #             if [[ $( cat $dateiname | grep -c "END SUBROUTINE user_parin" ) != 0 ]]
    1716 #             then
    1717 #                if [[ $dateiname != user_interface.f90  &&  -f user_interface.f90 ]]
    1718 #                then
    1719 #                   rm -rf  user_interface.f90
    1720 #                   source_list=`echo $source_list | sed -e 's/user_interface.f90//'`
    1721 #                   printf "\n\n  *** default \"user_interface.f90\" removed from the files to be translated"
    1722 #                   printf "\n      since a user-interface is found in file"
    1723 #                   printf "\n      \"$add_source_path/$dateiname\" \n"
    1724 #                   sleep 3
    1725 #                else
    17261595                if [[ $found = false ]]
    17271596                then
     
    17441613
    17451614
    1746        # ALLE UNTERPROGRAMME, DIE ZU VEREINBARTEN SOFTWAREPAKETEN GEHOEREN,
    1747        # DER LISTE DER ZU UEBERSETZENDEN DATEIEN HINZUFUEGEN
     1615       # ADD ALL ROUTINES BELONGING TO SOFTWARE PACKAGES (GIVEN BY OPTION -p)
     1616       # TO THE LIST OF FILES TO BE COMPILED
    17481617    if [[ $restart_run != true  &&  -n $package_list ]]
    17491618    then
     
    17561625          [[ $package = "dvrp_graphics+1PE" ]]  &&  package=dvrp_graphics
    17571626
    1758              # ERMITTELE ALLE DATEIEN, DIE ZUM PAKET GEHOEREN
    1759              # FEHLERMELDUNGEN WERDEN ABGEFANGEN, DA * AUCH VERZEICHNISSNAMEN
    1760              # LIEFERT
     1627             # DETERMINE FILES BELONGING TO THE PACKAGE
     1628             # ERROR MESSAGE ARE REDIRECTED TO /dev/null, BECAUSE WILDCARD (*) ALSO GIVES
     1629             # THE NAME OF THE DIRECTORY
    17611630          package_source_list=`grep "defined( __$package " * 2>/dev/null | cut -f1 -d:`
    17621631
    17631632
    1764              # FUEGE DIESE DATEIEN DER LISTE DER ZU UEBERSETZENDEN DATEIEN
    1765              # HINZU, FALLS SIE NOCH NICHT DAZUGEHOEREN
     1633             # ADD THESE FILES TO THE LIST OF FILES TO BE COMPILED,
     1634             # IF THEY ARE NOT ALREADY PART OF THE LIST
    17661635          for  source_list_name  in  $package_source_list
    17671636          do
     
    17691638             then
    17701639
    1771                     # NUR DATEIEN MIT GUELTIGEN ENDUNGEN VERWENDEN
     1640                    # ONLY TAKE FILES WITH VALID SUFFIX
    17721641                ending=`echo $source_list_name | cut -f2 -d.`
    17731642                if [[ "$ending" = f90  ||  "$ending" = F90  ||  "$ending" = f  ||  "$ending" = F  ||  "$ending" = c ]]
     
    17831652    fi
    17841653
    1785 
    1786        # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
    1787        # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
    1788 #    if [[ "$restart_run" != true ]]
    1789 #    then
    1790 #       [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
    1791 #       if [[ ! -f $makefile ]]
    1792 #       then
    1793 #          printf "\n  +++ file \"$makefile\" does not exist"
    1794 #          locat=make; exit
    1795 #       else
    1796 #          cp  $makefile  SOURCES_FOR_RUN_$fname/Makefile
    1797 #       fi
    1798 #    fi
    1799 
    18001654 fi  # do_compile=true
    18011655
    18021656
    1803     # FALLS PROGRAMMTEILE UEBERSETZT WERDEN SOLLEN, FOLGEN JETZT EINIGE
    1804     # UEBERPRUEFUNGEN UND DAS SETZEN DER PRAEPROZESSOR-DIREKTIVEN
     1657    # IF SOURCE CODE IS TO BE COMPILED, DO SOME MORE CHECKS
     1658    # AND SET PRE-PROCESSOR DIRECTIVES
    18051659 if [[ $do_compile = true  ||  $create_executable_for_batch = true ]]
    18061660 then
    18071661
    1808        # PRAEPROZESSOR-DIREKTIVEN ZUM SELEKTIVEN AUSWAEHLEN VON CODETEILEN
    1809        # ZUSAMMENSETZEN
    1810        # DIREKTIVEN ZUM AKTIVIEREN VON RECHNERSPEZIFISCHEM CODE
     1662       # SET PREPROCESSOR-DIRECTIVES TO SELECT OPERATING SYSTEM SPECIFIC CODE
    18111663    if [[ $(echo $localhost | cut -c1-3) = ibm ]]
    18121664    then
     
    18221674    fi
    18231675
    1824        # DIREKTIVEN DIE DURCH OPTION -K BESTIMMT WERDEN (Z.B. PARALLEL)
     1676       # SET DIRECTIVES GIVEN BY OPTION -K (E.G. parallel)
    18251677    if [[ $(echo $localhost | cut -c1-3) = ibm ]]
    18261678    then
     
    18321684    fi
    18331685
    1834        # DIREKTIVEN DIE SOFTWAREPAKETE AKTIVIEREN (OPTION -p)
     1686       # SET DIRECTIVES FOR ACTIVATING SOFTWARE-PACKAGES (OPTION -p)
    18351687    if [[ -n $package_list ]]
    18361688    then
     
    18581710    fi
    18591711
    1860        # DIREKTIVEN DIE DURCH OPTION -D FESTGELEGT SIND
     1712       # SET DIRECTIVES GIVEN BY OPTION -D
    18611713    if [[ -n $cpp_opts ]]
    18621714    then
     
    18751727
    18761728
    1877        # BEI LOKALEN RECHNUNGEN PRUEFEN, OB EXECUTABLE VORHANDEN
     1729       # FOR LOCAL RUNS CHECK AGAIN, IF EXECUTABLE EXISTS
    18781730    if [[ $do_remote = false ]]
    18791731    then
     
    18881740
    18891741
    1890     # JOBMODUS FESTSTELLEN
     1742    # DETERMINE THE JOB MODE
    18911743 if [[ "$ENVIRONMENT" = BATCH ]]
    18921744 then
     
    18971749
    18981750
    1899     # no interactive runs on lctit
     1751    # NO INTERACTIVE RUNS ALLOWED ON LCTIT
    19001752 if [[ $host = lctit  &&  $jobmo = INTERACTIVE  &&  $do_batch = false ]]
    19011753 then
     
    19061758
    19071759
    1908     # HOSTSPEZIFISCHE DEFAULT-COMPILER SETZEN, FALLS NICHT BEREITS
    1909     # DURCH BENUTZER ANDERWEITIG VEREINBART
     1760    # CHECK, IF USER DEFINED A COMPILER
    19101761 if [[ "$compiler_name" = "" ]]
    19111762 then
     
    19171768
    19181769
    1919     # COMPILER AUF RIAMS NEC UEBERSCHREIBEN
    1920  [[ $localhost = necriam ]]  &&  compiler_name=mpif90
    1921 
    1922 
    1923 
    1924     # TEMPORAEREN KATALOGNAMEN BESTIMMEN
     1770    # DETERMINE THE NAME OF MRUN'S TEMPORARY WORKING DIRECTORY
    19251771 kennung=$RANDOM
    19261772 if [[ "$tmp_user_catalog" = "" ]]
     
    19391785
    19401786
    1941     # KATALOGNAMEN FUER ZWISCHENSPEICHERUNG VON FORTSETZUNGSLAUFDATEIEN
    1942     # BESTIMMEN
     1787    # DETERMINE THE NAME OF THE DIRECTORY WHICH IS USED TO TEMPORARILY STORE DATA FOR RESTART RUNS
    19431788 if [[ "$tmp_data_catalog" = "" ]]
    19441789 then
     
    19521797
    19531798
    1954     # EVENTUELL BEI LOKALEN RECHNUNGEN $-ZEICHEN IN ENVIRONMENT-VARIABLEN
    1955     # ERSETZEN
     1799    # IN CASE OF LOCAL RUNS REPLACE ENVIRONMENT VARIABLES BY THEIR VALUES
    19561800 if [[ $do_remote = false  &&  $do_compile = true  ||  $create_executable_for_batch = true ]]
    19571801 then
     
    19621806
    19631807
    1964     # COMPILE- UND LINK-OPTIONEN BESTIMMEN
     1808    # DETERMINE COMPILE- AND LINK-OPTIONS
    19651809 fopts="$fopts $netcdf_inc $fftw_inc $dvr_inc"
    19661810 lopts="$lopts $netcdf_lib $fftw_lib $dvr_lib"
    19671811 ROPTS="$ropts"
    1968 # if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lckyoto  ||  $host = lcsgih  ||  $host = lcsgib  ||  $host = lctit  ||  $host = lcfimm  ||  $host = lcflow  ||  $host = lcxe6 ||  $host = lcxt5m || $host = lck || $host = lckiaps || $host = lckordi || $host = lcsb || $host )  &&  -n $numprocs ]]
     1812# if [[ ( $(echo $host | cut -c1-3) = nec  ||  $(echo $host | cut -c1-3) = ibm  ||  $host = lckyoto  ||  $host = lctit  ||  $host = lcflow  ||  $host = lcxe6 ||  $host = lcxt5m || $host = lck || $host = lckiaps || $host = lckordi || $host = lcsb || $host )  &&  -n $numprocs ]]
    19691813# then
    19701814    XOPT="-X $numprocs"
     
    19731817
    19741818
    1975     # PRUEFEN DER CPU-ZEIT. (CPUMAX WIRD ALS ENV-VARIABLE VOM HAUTPRO-
    1976     # GRAMM BENOETIGT
     1819    # CHECK THE CPU-LIMIT. IT MUST BE GIVEN FOR BATCH-JOBS AND IS COMMUNICATED TO THE
     1820    # EXECUTABLE VIA NAMELIST-PARAMETER cputime
    19771821 done=false
    19781822 while [[ $done = false ]]
     
    20001844
    20011845
    2002     # PRUEFEN DER KERNSPEICHERANFORDERUNG
     1846    # CHECK THE MEMORY DEMAND
    20031847 if [[ $do_batch = true ]]
    20041848 then
     
    20191863
    20201864
    2021     # PRUEFEN, OB FUER REMOTE-RECHNUNGEN EIN BENUTZERNAME ANGEGEBEN WURDE
     1865    # IN CASE OF REMOTE-JOBS CHECK, IF A USERNAME FOR THE REMOTE HOST IS GIVEN
    20221866 if [[ $do_remote = true  &&  -z $remote_username ]]
    20231867 then
     
    20391883
    20401884
    2041     # set module load command and export for subjob
     1885    # SET THE MODULE-LOAD COMMAD AND EXPORT IT FOR subjob
    20421886 if [[ "$modules" != "" ]]
    20431887 then
     
    20501894 fi
    20511895
    2052     # bugfix for wrong netcdf module and for netCDF4 usage in case of mpt
    2053  if [[ $host = lcsgib  ||  $host = lcsgih ]]
    2054  then
    2055     if [[ $(echo $module_calls | grep -c netcdf/3.6.3-intel) != 0 ]]
    2056     then
    2057        export module_calls="$module_calls export LD_LIBRARY_PATH=/sw/dataformats/netcdf/3.6.3-intel/lib:\$LD_LIBRARY_PATH;"
    2058     fi
    2059 #     if [[ $(echo $module_calls | grep -c mpt) != 0 ]]
    2060 #     then
    2061 #        export module_calls="$module_calls export LD_LIBRARY_PATH=/sw/sgi/mpt/2011-02-07/lib:\$LD_LIBRARY_PATH;"
    2062 #        echo "*** module_calls = $module_calls"
    2063 #     fi
    2064  fi
    2065 
    2066 
    2067     # SET DEFAULT VALUE FOR MPI MODULE TO BE USED ON SGI-ALTIX
    2068  if [[ $host = lcsgib  ||  $host = lcsgih ]]
    2069  then
    2070     if [[ $(echo $modules | grep -c mpt ) != 0 ]]
    2071     then
    2072        mpilib=mpt
    2073     elif [[ $(echo $modules | grep -c mvapich ) != 0 ]]
    2074     then
    2075        mpilib=mvapich
    2076     elif [[ $(echo $modules | grep -c impi ) != 0 ]]
    2077     then
    2078        mpilib=impi
    2079     fi
    2080  fi
    2081 
    2082 
    2083 
    2084 ###########################################################################
    2085 # HEADER-AUSGABE
    2086 ###########################################################################
    2087 
    2088 
     1896
     1897
     1898    # OUTPUT OF THE MRUN-HEADER
    20891899 calltime=$(date)
    20901900 printf "\n"
    2091 # [[ $silent = false ]]  &&  clear
    20921901 printf "#------------------------------------------------------------------------# \n"
    20931902 printf "| %-35s%35s | \n" "$version" "$calltime"
     
    20951904 spalte1="called on:"; spalte2=$localhost_realname
    20961905 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2"
    2097  if [[ $local_compile = false ]]
    2098  then
    2099     if [[ $do_remote = true ]]
    2100     then
    2101        spalte1="execution on:"; spalte2="$host (username: $remote_username)"
    2102     else
    2103        spalte1="execution on:"; spalte2="$host ($localhost_realname)"
    2104     fi
     1906 if [[ $do_remote = true ]]
     1907 then
     1908    spalte1="execution on:"; spalte2="$host (username: $remote_username)"
    21051909 else
    2106     spalte1="compiling test only!"; spalte2=""
     1910    spalte1="execution on:"; spalte2="$host ($localhost_realname)"
    21071911 fi
    21081912 printf "| %-25s%-45s | \n" "$spalte1" "$spalte2"
     
    22462050
    22472051
    2248     # BEDINGTE AUSGABE DER DATEIVERBINDUNGEN
     2052    # OUTPUT OF FILE CONNECTIONS IN CASE OF TRACEBACK
    22492053 if [[ $do_trace = true ]]
    22502054 then
     
    22922096
    22932097
    2294     # ABFRAGEN BEI AUFRUF AUF LOKALER MASCHINE
     2098    # QUERY FOR CONTINUE (ON LOCAL MACHINES ONLY)
    22952099 if [[ $remotecall = false  &&  $silent = false  &&  $jobmo != BATCH ]]
    22962100 then
     
    23152119       printf " >>> batch-job will be created and submitted"
    23162120    else
    2317        if [[ $local_compile = false ]]
    2318        then
    2319           printf " >>> MRUN will now continue to execute on this machine"
    2320        else
    2321           printf " >>> a test compilation will now be carried out on this machine"
    2322        fi
     2121       printf " >>> MRUN will now continue to execute on this machine"
    23232122    fi
    23242123 fi
     
    25442343          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    25452344          then
    2546                 # EVENTUELLE DOPPELPUNKTE AUS OPTIONSSTRING UND ALLE -D ENTFERNEN
     2345                # REMOVE COLONS FROM OPTION-STRING, REMOVE ALL -D OPTIONS
    25472346             line="$line "
    25482347             copts_check=`echo $line | cut -d" " -s -f2 | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g' | sed 's/-D[^ ]* //g' | sed 's/ -D.*//g'`
     
    28212620
    28222621
    2823     # FALLS AUF DIESER MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE-
    2824     # CHENDE AKTIONEN DURCHGEFUEHRT
     2622    # NOW PERFORM THOSE ACTIONS REQUIRED TO EXECUTE THE PROGRAM (PALM) ON THIS MACHINE
     2623    # (COMPILING/LINKING, EXECUTING, COPYING I/O FILES)
    28252624 if [[ $do_batch = false ]]
    28262625 then
    28272626
    28282627
    2829        # TEMPORAEREN KATALOG ERZEUGEN
     2628       # CREATE THE TEMPORARY WORKING DIRECTORY
    28302629    mkdir -p  $TEMPDIR
    28312630    chmod  go+rx  $TEMPDIR
     
    28332632
    28342633
    2835        # SAEMTLICHE QUELLTEXT-DATEIEN BZW. AUSFUEHRBARES PROGRAMM IN
    2836        # TEMPORAERES VERZEICHNIS KOPIEREN
     2634       # COPY EITHER THE COMPLETE SOURCE CODE FILES TO BE COMPILED OR THE EXECUTABLE
     2635       # INTO THE TEMPORARY WORKING DIRECTORY
    28372636    if [[ $do_compile = true ]]
    28382637    then
     
    28782677
    28792678
    2880        # WECHSEL IN TEMPORAEREN KATALOG
     2679       # CHANGE TO THE TEMPORARY WORKING DIRECTORY
    28812680    cd  $TEMPDIR
    28822681    printf "\n  *** changed to temporary directory: $TEMPDIR"
    28832682
    28842683
    2885        # OUTPUT-DATEI-VERBINDUNGEN AUF TEMPORAERER DATEI ABLEGEN
    2886        # DIESE DATEI KANN VON SPAETER AUFZURUFENDEN BENUTZERPROZEDUREN GELESEN
    2887        # WERDEN, UM ZU LOKALEN DATEINAMEN GEHOERENDE PERMANENTE NAMEN ZU
    2888        # ERMITTELN
     2684       # THE FOLLOWING IS REQUIRED FPR AVS-OUTPUT WITH PALM  ??? REMOVE ???
     2685       # WRITE INFORMATIONS ABOUT THE OUTPUT-FILE CONNECTIONS TO A TEMPORARY FILE
     2686       # THIS FILE CAN LATER BE READ FROM USER-DEFINED CODE TO DETERMINE THE
     2687       # RELATION BETWEEN THE LOCAL TEMPORARY AND PERMANENT FILE NAMES
    28892688    (( i = 0 ))
    28902689    while (( i < iout ))
     
    29002699
    29012700
    2902        # IF REQUIRED, START WITH COMPILING ACTIONS
     2701       # IF REQUIRED, START WITH COMPILING
    29032702    if [[ $do_compile = true ]]
    29042703    then
     
    29152714
    29162715             # COMPILING WITH MAKE (ON NEC COMPILER IS CALLED ON HOST CROSS)
    2917           printf "\n\n\n  *** compilation starts \n$striche\n"
     2716          printf "\n\n\n  *** compilation starts \n$dashes\n"
    29182717          printf "  *** compilation with make using following options:\n"
    29192718          printf "      make depository:          $make_depository"
     
    29432742             ssh  $SSH_PORTOPT  plogin1  -l $usern  "$init_cmds export PATH=/sw/ibm/xlf/13.1.0.8/usr/bin:$PATH; $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
    29442743             [[ ! -f a.out ]]  &&  compile_error=true
    2945              continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
    2946           elif [[ $localhost = lcsgib ]]
    2947           then
    2948              printf "      compiler is called via ssh on \"bicegate0\" \n"
    2949              ssh  $SSH_PORTOPT  bicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" "
    2950              [[ ! -f a.out ]]  &&  compile_error=true
    2951              continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
    2952           elif [[ $localhost = lcsgih ]]
    2953           then
    2954              printf "      compiler is called via ssh on \"hicegate0\" \n"
    2955              ssh  $SSH_PORTOPT  hicegate0  -l $usern  "$init_cmds $module_calls cd $TEMPDIR; make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$fopts\"  LDFLAGS=\"$lopts\" 2>&1 "
    2956              [[ ! -f a.out ]]  &&  compile_error=true
    2957              continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
     2744             continue   # STATUS=1, IF a.out EXISTS
    29582745          elif [[ $localhost = lcflow ]]
    29592746          then
     
    29622749             check_for_file=`/usr/bin/ssh $SSH_PORTOPT flow02.hpc.uni-oldenburg.de -l $usern "ls $TEMPDIR/a.out 2> /dev/null"`
    29632750             [[ "$check_for_file" = "" ]]  &&  compile_error=true
    2964              continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
     2751             continue   # STATUS=1, IF a.out EXISTS
    29652752          elif [[ $localhost = lccrayb  ||  $localhost = lccrayf ||  $localhost = lccrayh ]]
    29662753          then
     
    29792766             exit
    29802767          else
    2981              printf "$striche\n  *** compilation finished \n"
    2982           fi
    2983 
    2984        fi
    2985 
    2986     fi
    2987 
    2988 
    2989        # FALLS NUR TESTWEISE KOMPILIERT WERDEN SOLLTE, IST MRUN JETZT FERTIG
    2990     if [[ $local_compile = true ]]
    2991     then
    2992        cd  $HOME
    2993        rm -rf $TEMPDIR
    2994        locat=local_compile; exit
    2995     fi
    2996 
    2997 
    2998        # BEREITSTELLEN DER INPUT-DATEIEN
    2999        # SCHLEIFE UEBER ALLE VOM BENUTZER ANGEGEBENEN DATEIEN
     2768             printf "$dashes\n  *** compilation finished \n"
     2769          fi
     2770
     2771       fi
     2772
     2773    fi
     2774
     2775
     2776       # PROVIDE THE INPUT FILES
     2777       # LOOP OVER ALL ACTIVATED FILES (LISTED IN THE CONFIGURATION FILE)
    30002778    (( i = 0 ))
    30012779    while (( i < iin ))
     
    30042782       if (( i == 1 ))
    30052783       then
    3006           printf "\n\n  *** providing INPUT-files:\n$striche"
    3007        fi
    3008 
    3009 
    3010           # OPTIONALE DATEIEN BEI NICHTVORHANDENSEIN UEBERGEHEN
     2784          printf "\n\n  *** providing INPUT-files:\n$dashes"
     2785       fi
     2786
     2787
     2788          # SKIP OPTIONAL FILES, IF THEY DO NOT EXIST
    30112789       if [[ "${transin[$i]}" = unavailable ]]
    30122790       then
     
    30222800       fi
    30232801
    3024           # PRUEFEN, OB EINZELDATEI ODER DATEI PRO PROZESSOR
     2802          # CHECK FOR SINGLE FILE (SERIAL RUN) OR DIRECTORY (ONE FILE PER CORE FOR PARELLEL EXECUTION)
    30252803       files_for_pes=false; datentyp=file
    30262804       if [[ "${actionin[$i]}" = pe  &&  -n $numprocs ]]
     
    30542832       fi
    30552833
    3056           # INPUT-DATEI FUER EINEN FORTSETZUNGSLAUF. ES WIRD GEPRUEFT,
    3057           # OB DIESE DATEI NOCH AUF DEM TEMPORAEREN DATENKATALOG VORHANDEN
    3058           # IST. FALLS NICHT, WIRD VERSUCHT, SIE ANSCHLIESSEND VOM ARCHIV-
    3059           # SERVER ZU HOLEN
     2834          # INPUT-FILE FOR A RESTART RUN.
     2835          # CHECK, IF THIS FILE STILL EXISTS ON THE TEMPORARY DATA DIRECTORY.
     2836          # IF NOT, TRY TO GET IT FROM THE ARCHIVE SYSTEM
    30602837       if [[ "${actionin[$i]}" = fl ]]
    30612838       then
     
    31042881
    31052882
    3106           # DATEI LIEGT AUF ARCHIV-SERVER
     2883          # FILE IS STORED ON THE ARCHIVE SYSTEM
    31072884       if [[ "${actionin[$i]}" = ar ]]
    31082885       then
     
    31622939             if [[ $files_for_pes = false ]]
    31632940             then
    3164                 if [[ $localhost = lcsgih ]]
    3165                 then
    3166                    ssh  $SSH_PORTOPT  $usern@hicedata.hlrn.de  "cp  $PERM/${frelin[$i]}  $PWD"
    3167                 else
    3168                    ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cp  $PERM/${frelin[$i]}  $PWD"
    3169                 fi
     2941                ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cp  $PERM/${frelin[$i]}  $PWD"
    31702942             else
    31712943                (( inode = 0 ))
    31722944                while (( inode < nodes ))
    31732945                do
    3174                    if [[ $localhost = lcsgih ]]
    3175                    then
    3176                       ssh  $SSH_PORTOPT  $usern@hicedata.hlrn.de  "cd $PWD; tar  xf  $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"
    3177                    else
    3178                       ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cd $PWD; tar  xf  $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"
    3179                    fi
     2946                   ssh  $SSH_PORTOPT  $usern@bicedata.hlrn.de  "cd $PWD; tar  xf  $PERM/${frelin[$i]}/${frelin[$i]}.node_$inode.tar"
    31802947                   (( inode = inode + 1 ))
    31812948                done
     
    32052972          then
    32062973
    3207                 # DATEI AUCH AUF TEMPORAERES DATENVERZEICHNIS LEGEN, DAMIT
    3208                 # SIE BEI WEITEREN ZUGRIFFEN NOCH VORHANDEN IST
     2974                # PUT FILE ON THE TEMPORARY DATA DIRECTORY TOO.
     2975                # THIS WILL MAKE FILE ACCESS EASIER FOR LATER RUNS
    32092976             [[ ! -d $tmp_data_catalog ]]  &&  mkdir -p  $tmp_data_catalog; chmod  g+rx  $tmp_data_catalog
    32102977             if [[ $files_for_pes = false ]]
     
    32172984             got_tmp[$i]=true
    32182985
    3219                 # DATEI UNTER LOKALEM NAMEN ZUR VERFUEGUNG STELLEN
     2986                # PROVIDE THE FILE UNDER ITS LOCAL NAME
    32202987             mv  ${frelin[$i]}  ${localin[$i]}
    32212988
     
    32242991
    32252992
    3226           # DATEI LIEGT IM VOM BENUTZER ANGEGEBENEN VERZEICHNIS
     2993          # FILE IS STORED IN THE RESPECTIVE DIRECTORY GIVEN IN THE CONFIGURATION FILE
    32272994       if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "npe" ]]
    32282995       then
     
    32312998          then
    32322999
    3233                 # DATEI WIRD FUER DIE PROZESSOREN EINES PARALLERECHNERS BEREITGESTELLT
     3000                # FILE COPIES ARE PROVIDED FOR ALL CORES
     3001                # EACH FILE GETS A UNIQUE FILENAME WITH A FOUR DIGIT NUMBER
    32343002             printf "\n      file will be provided for $numprocs processors"
    32353003             mkdir  ${localin[$i]}
     
    32583026             then
    32593027
    3260                    # DIE DEN PROZESSOREN EINES PARALLELRECHNERS ZUGEHOERIGEN
    3261                    # DATEIEN WERDEN BEREITGESTELLT, INDEM ZUERST DER GESAMTE
    3262                    # KATALOGINHALT KOPIERT UND DANN DIE EINZELNEN DATEIEN
    3263                    # PER MOVE UMBENANNT WERDEN
     3028                   # PROVIDE FILES FOR EACH CORE
     3029                   # FIRST CREATE THE LOCAL DIRECTORY, THEN COPY FILES
     3030                   # FROM THE PERMANENT DIRECTORY BY LINKING THEM TO THE LOCAL ONE
    32643031                printf "\n      providing $numprocs files for the respective processors"
    32653032                mkdir  ${localin[$i]}
     
    32743041                    cd $TEMPDIR
    32753042                fi
    3276                 # If "ln -f" fails of if "$link_local_input = false" do a normal "cp -r"
     3043
     3044                   # IF "ln -f" FAILED OR IF "$link_local_input = false" DO A NORMAL "cp -r"
    32773045                if [[ ! -f "${localin[$i]}/_0000" ]]
    32783046                    then
     
    32853053
    32863054             else
    3287                    # BEREITSTELLUNG AUF EINPROZESSORRECHNERN
     3055
     3056                   # PROVIDE FILE FOR RUNS ON A SINGLE CORE
    32883057                if [[ $link_local_input = true ]]
    32893058                then
     
    33073076    if (( i != 0 ))
    33083077    then
    3309        printf "\n$striche\n  *** all INPUT-files provided \n"
    3310     fi
    3311 
    3312 
    3313        # EVENTUELLE INPUT-KOMMANDOS ABARBEITEN
     3078       printf "\n$dashes\n  *** all INPUT-files provided \n"
     3079    fi
     3080
     3081
     3082       # EXECUTE INPUT-COMMANDS GIVEN IN THE CONFIGURATION FILE
    33143083    (( i = 0 ))
    33153084    while (( i < iic ))
     
    33183087       if (( i == 1 ))
    33193088       then
    3320           printf "\n\n  *** execution of INPUT-commands:\n$striche"
     3089          printf "\n\n  *** execution of INPUT-commands:\n$dashes"
    33213090       fi
    33223091       printf "\n  >>> ${in_command[$i]}"
     
    33243093       if (( i == iic ))
    33253094       then
    3326           printf "\n$striche\n"
     3095          printf "\n$dashes\n"
    33273096       fi
    33283097    done
    33293098
    33303099
    3331        # VERBLEIBENDE CPU-ZEIT BERECHNEN
     3100       # SET THE REMAINING CPU-TIME
    33323101    cpurest=${cpumax}.
    33333102
     
    33413110          printf "\n\n  *** preparing the dvr streaming server configuration file"
    33423111
    3343              # Check, if a dvr server is already running
     3112             # CHECK, IF A DVR SERVER IS ALREADY RUNNING
    33443113          running_dvrserver_id=`echo $(ps -edaf | grep .dvrserver.config | grep -v grep) | cut -d" " -f2`
    33453114          if [[ "$running_dvrserver_id" != "" ]]
     
    33573126                cp  ${PALM_BIN}/.dvrserver.config  .
    33583127
    3359                    # Entering the BASEDIR, UID and GID into this file
     3128                   # ENTERING THE BASEDIR, UID AND GID INTO THIS FILE
    33603129                user_id=`id -u`
    33613130                group_id=`id -g`
    3362                    # & is needed as seperator, because TEMPDIR contains /
     3131
     3132                   # "&" IS REQUIRED AS A SEPERATOR, BECAUSE TEMPDIR CONTAINS "/"
    33633133                sed "s&<replace by dvr data directory>&${TEMPDIR}&g" .dvrserver.config > .dvrserver.1
    33643134                sed "s/<replace by user id>/$user_id/g"    .dvrserver.1 > .dvrserver.2
     
    33673137                rm  .dvrserver.1  .dvrserver.2
    33683138
    3369                    # Start dvr server in background, get his id and print on terminal
     3139                   # START DVR SERVER IN BACKGROUND, GET HIS ID AND PRINT ON TERMINAL
    33703140                $dvr_server  .dvrserver.config  >>  DVR_LOGFILE  2>&1  &
    33713141                dvrserver_id=`echo $(ps -edaf | grep .dvrserver.config) | cut -d" " -f2`
     
    33873157
    33883158
    3389        # NAMELIST-DATEI MIT WERTEN VON ENVIRONMENT-VARIABLEN ERZEUGEN (ZU
    3390        # LESEN VON PALM)
     3159       # CREATE THE NAMELIST-FILE WITH VALUES OF ENVIRONMENT-VARIABLES REQUIRED BY PALM
     3160       # (FILE ENVPAR WILL BE READ BY PALM)
    33913161    cat  >  ENVPAR  <<  %%END%%
    33923162 &envpar  run_identifier = '$fname', host = '$localhost',
     
    34003170
    34013171
    3402        # PROGRAMMSTART
    3403     printf "\n\n  *** execution starts in directory\n      \"`pwd`\"\n$striche\n"
     3172       # STARTING THE EXECUTABLE
     3173    printf "\n\n  *** execution starts in directory\n      \"`pwd`\"\n$dashes\n"
    34043174    PATH=$PATH:$TEMPDIR
    34053175
    3406        # MPI debug option (argument checking, slows down execution due to increased latency)
     3176       # MPI DEBUG OPTION (ARGUMENT CHECKING, SLOWS DOWN EXECUTION DUE TO INCREASED LATENCY)
    34073177    if [[ "$mpi_debug" = true ]]
    34083178    then
     
    34233193       if [[ "$ENVIRONMENT" = BATCH ]]
    34243194       then
    3425           if [[ $(echo $localhost | cut -c1-5) != lcsgi ]]
    3426           then
    3427              printf "\n  +++ debug is allowed in interactive mode only"
    3428              locat=debug
    3429              exit
    3430           fi
     3195          continue
    34313196       fi
    34323197       if [[ $localhost = ibmh ]]
     
    34643229             totalview   poe  -a a.out  -procs $numprocs  -rmpool 0  -nodes 1   $ROPTS
    34653230          fi
    3466        elif [[ $(echo $localhost | cut -c1-5) = lcsgi ]]
    3467        then
    3468              # CURRENTLY NO DEBUGGER ON LCSGI
    3469           if [[ $run_coupled_model = true ]]
    3470           then
    3471              printf "\n  +++ no debug in coupled mode available on \"$localhost\" "
    3472              locat=debug
    3473              exit
    3474           else
    3475              echo "no_coupling"  >  runfile_atmos
    3476           fi
    3477           (( ii = $numprocs / $threads_per_task ))
    3478           export OMP_NUM_THREADS=$threads_per_task
    3479           echo "OMP_NUM_THREADS=$OMP_NUM_THREADS"
    3480           if [[ $threads_per_task != 1 ]]
    3481           then
    3482              printf "\n      threads per task: $threads_per_task"
    3483           fi
    3484           printf "\n\n"
    3485           if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
    3486           then
    3487 #             export MPI_LAUNCH_TIMEOUT=360
    3488              if [[ "$totalview" = true ]]
    3489              then
    3490                 printf "\n     running totalview debugger"
    3491                 mpiexec_mpt $tv_opt -n $ii   ./a.out  $ROPTS  < runfile_atmos
    3492              else
    3493                 mpiexec_mpt -np $ii   ./a.out  $ROPTS  < runfile_atmos
    3494              fi
    3495           elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
    3496           then
    3497 #             ulimit -s 300000   # A too large stack size causes problems
    3498 #             export MV2_NUM_PORTS=2
    3499 #             export MV2_CPU_MAPPING=0:1:2:3
    3500              if [[ "$totalview" = true ]]
    3501              then
    3502                 printf "\n     running totalview debugger"
    3503                 mpiexec $tv_opt ./a.out  $ROPTS  < runfile_atmos
    3504              else
    3505                 mpiexec    ./a.out  $ROPTS  < runfile_atmos
    3506              fi
    3507           fi
    3508        else
    3509           printf "\n  +++ no debug available on \"$localhost\" "
    3510           printf "\n      or not implemented in mrun so far"
    3511           locat=debug
    3512           exit
    3513        fi
    3514 
    3515        # end debug mode
     3231
     3232       # END DEBUG MODE
    35163233    else
    35173234
    3518           # normal execution
     3235          # NORMAL EXECUTION
    35193236       if [[ -n $numprocs ]]
    35203237       then
     3238
    35213239             # RUNNING THE PROGRAM ON PARALLEL MACHINES
    35223240          if [[ $(echo $host | cut -c1-3) = ibm ]]
    35233241          then
     3242
    35243243                # SETUP THE IBM MPI ENVIRONMENT
    35253244             if [[ $host != ibmh  &&  $host != ibmkisti ]]
     
    35333252                #  export MP_PRINTENV=yes
    35343253
    3535                    # TUNING-VARIABLEN ZUR VERBESSERUNG DER KOMMUNIKATION
    3536                    # ZEIGEN ABER DERZEIT (SEP 04, FEDERATION) KAUM WIRKUNG
     3254                   # TUNING-VARIABLES TO IMPROVE COMMUNICATION SPEED
     3255                   # DO NOT SHOW SIGNIFICANT EFFECTS (SEP 04, FEDERATION-SWITCH)
    35373256                export MP_WAIT_MODE=poll
    35383257                [[ $node_usage = not_shared ]]  &&  export MP_SINGLE_THREAD=yes
     
    35813300                then
    35823301                   poe  a.out  -procs $numprocs  -nodes 1  -rmpool 0  $ROPTS
    3583                 elif [[ $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibmy ]]
     3302                elif [[ $localhost = ibmkisti  ||  $localhost = ibmku ]]
    35843303                then
    35853304                   if [[ -f $hostfile ]]
     
    36113330                      echo "coupled_run $iia $iio"  >  runfile_atmos
    36123331                   fi
    3613                    if [[ $localhost = ibmy ]]
    3614                    then
    3615                       ./a.out  -procs $tasks_per_node  $ROPTS  <  runfile_atmos
    3616                    else
    3617                       poe  ./a.out  -procs $numprocs $ROPTS  <  runfile_atmos
    3618                    fi
     3332
     3333                   poe  ./a.out  -procs $numprocs $ROPTS  <  runfile_atmos
    36193334
    36203335                else
     
    36313346                fi
    36323347             fi
    3633           elif [[ $host = nech  ||  $host = necriam ]]
     3348          elif [[ $host = nech ]]
    36343349          then
    36353350             (( ii = nodes ))
     
    36893404                # COPY HOSTFILE FROM SOURCE DIRECTORY OR CREATE IT, IF IT
    36903405                # DOES NOT EXIST
    3691              if [[  $host != lccrayb  &&$host != lccrayf  && $host != lccrayh  &&  $host != lcsgih  &&  $host != lcsgib  &&  $host != lckyuh  &&  $host != lckyut ]]
     3406             if [[  $host != lccrayb  &&$host != lccrayf  && $host != lccrayh  &&  $host != lckyuh  &&  $host != lckyut ]]
    36923407             then
    36933408                if [[ -f $hostfile ]]
     
    37093424             (( ii = $numprocs / $threads_per_task ))
    37103425             export OMP_NUM_THREADS=$threads_per_task
    3711              # echo "*** OMP_NUM_THREADS=$OMP_NUM_THREADS"
     3426
    37123427             if [[ $threads_per_task != 1 ]]
    37133428             then
    3714                    # increase stack size to unlimited, because large runs
    3715                    # may abort otherwise
     3429                   # INCREASE STACK SIZE TO UNLIMITED, BECAUSE OTHERWISE LARGE RUNS
     3430                   # MAY ABORT
    37163431                ulimit -Ss unlimited
    37173432                printf "\n      threads per task: $threads_per_task  stacksize: unlimited"
     
    37263441                fi
    37273442                printf "\n\n"
    3728                 if [[ $host = lcsgih  ||  $host = lcsgib ]]
    3729                 then
    3730                    if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
    3731                    then
    3732                           # MPI_DSM_DISTRIBUTE not necessary when MPI_DSM_CPULIST is set
    3733                           # export MPI_DSM_DISTRIBUTE=1
    3734                           # MPI_DSM_CPULIST: pin MPI processes to cores
    3735                       if [[ $use_openmp = false ]]
    3736                       then
    3737                          if [[ "$sgi_feature" = ice2 ]]
    3738                          then
    3739                             export MPI_DSM_CPULIST="0,4,1,5,2,6,3,7:allhosts"
    3740                          else
    3741                             export MPI_DSM_CPULIST="0,1,4,5,2,3,6,7:allhosts"
    3742                          fi
    3743                       else
    3744                          unset MPI_DSM_CPULIST
    3745                       fi
    3746                           # MPI_IB_RAILS: use both IB rails on ICE2
    3747                       export MPI_BUFS_PER_HOST=512
    3748                       export MPI_IB_RAILS=2
    3749                           # NECESSARY, IF MORE THAN 4096 PEs ARE USED
    3750                       export MPI_CONNECTIONS_THRESHOLD=8192
    3751                   #    echo "*** MPI_DSM_CPULIST=$MPI_DSM_CPULIST"
    3752                       export MPI_TYPE_DEPTH=20
    3753                   #    echo "*** MPI_TYPE_DEPTH=$MPI_TYPE_DEPTH"
    3754                       export MPI_GROUP_MAX=64
    3755                   #    echo "*** MPI_GROUP_MAX=$MPI_GROUP_MAX"
    3756                       if [[ $use_openmp = true ]]
    3757                       then
    3758                          echo " mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  <  runfile_atmos"
    3759                          mpiexec -npernode $tasks_per_node $tv_opt ./a.out  $ROPTS  <  runfile_atmos
    3760                       else
    3761                          mpiexec_mpt -np $ii $tv_opt  ./a.out  $ROPTS  < runfile_atmos
    3762                       fi
    3763 
    3764                           # next is test for openmp usage
    3765                   #     echo "mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  < runfile_atmos"
    3766                   #     mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  < runfile_atmos
    3767                    elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
    3768                    then
    3769                       export MV2_NUM_PORTS=2
    3770                       #  The default setting of MV2_CPU_MAPPING gives best results
    3771                       # export MV2_ENABLE_AFFINITY=1
    3772                       #  export MV2_CPU_MAPPING=0,1,4,5,2,3,6,7
    3773                #       if [[ "$sgi_feature" = ice2 ]]
    3774                #       then
    3775                #          export MV2_CPU_MAPPING=0,4,1,5,2,6,3,7
    3776                #       else
    3777                #          export MV2_CPU_MAPPING=0,1,4,5,2,3,6,7
    3778                #       fi
    3779                       if [[ $use_openmp = true ]]
    3780                       then
    3781                          unset MV2_CPU_MAPPING
    3782                          export MV2_ENABLE_AFFINITY=0
    3783                       fi
    3784                       echo "*** MV2_CPU_MAPPING=$MV2_CPU_MAPPING"
    3785                       echo "*** MV2_ENABLE_AFFINITY=$MV2_ENABLE_AFFINITY"
    3786                       if [[ $use_openmp = true ]]
    3787                       then
    3788                          echo " mpiexec -npernode $tasks_per_node  ./a.out  $ROPTS  <  runfile_atmos"
    3789                          mpiexec -npernode $tasks_per_node $tv_opt ./a.out  $ROPTS  <  runfile_atmos
    3790                       else
    3791                          mpiexec -np $ii $tv_opt ./a.out  $ROPTS  < runfile_atmos
    3792                       fi
    3793                    elif [[ "$mpilib" = impi ]]
    3794                    then
    3795                       echo "mpirun -np $ii inspxe-cl -r result -collect mi3 -- ./a.out  <  runfile_atmos"
    3796                       mpirun -np $ii inspxe-cl -r result -collect mi3 -- ./a.out  <  runfile_atmos
    3797                    fi
    3798                 elif [[ $host = lccrayb || $host = lccrayh ]]
     3443
     3444                if [[ $host = lccrayb || $host = lccrayh ]]
    37993445                then
    38003446                    echo "--- aprun  -n $ii  -N $tasks_per_node  a.out  $ROPTS  < runfile_atmos"
     
    38243470             else
    38253471
    3826                     # currently there is no full MPI-2 support on ICE and XT4
     3472                    # CURRENTLY THERE IS NO FULL MPI-2 SUPPORT ON ICE AND XT4
    38273473                (( iia = $numprocs_atmos / $threads_per_task ))
    38283474                (( iio = $numprocs_ocean / $threads_per_task ))
     
    38353481                   echo "atmosphere_to_ocean $iia $iio"  >  runfile_atmos
    38363482                   echo "ocean_to_atmosphere $iia $iio"  >  runfile_ocean
    3837                    if [[ $host = lcsgih  ||  $host = lcsgib ]]
    3838                    then
    3839 
    3840                       if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
    3841                       then
    3842 #                         export MPI_LAUNCH_TIMEOUT=360
    3843                          mpiexec_mpt -np $iia  ./a.out  $ROPTS < runfile_atmos &
    3844                          mpiexec_mpt -np $iio  ./a.out  $ROPTS < runfile_ocean &
    3845                       elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
    3846                       then
    3847 #                         ulimit -s 300000   # A too large stack size causes problems
    3848 #                         export MV2_NUM_PORTS=2
    3849 #                         export MV2_CPU_MAPPING=0:1:2:3
    3850                          mpiexec -n $iia  ./a.out  $ROPTS < runfile_atmos &
    3851                          mpiexec -n $iio  ./a.out  $ROPTS < runfile_ocean &
    3852                       fi
    3853 
    3854                    elif [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
     3483
     3484                   if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
    38553485                   then
    38563486
     
    38703500
    38713501                   echo "coupled_run $iia $iio"  >  runfile_atmos
    3872                    if [[ $host = lcsgih  ||  $host = lcsgib ]]
    3873                    then
    3874 
    3875                       if [[ $( echo $mpilib | cut -c1-3 ) = mpt ]]
    3876                       then
    3877 #                         export MPI_LAUNCH_TIMEOUT=360
    3878                          mpiexec_mpt -np $ii  ./a.out  $ROPTS < runfile_atmos
    3879                       elif [[ $( echo $mpilib | cut -c1-3 ) = mva ]]
    3880                       then
    3881 #                         ulimit -s 300000   # A too large stack size causes problems
    3882 #                         export MV2_NUM_PORTS=2
    3883 #                         export MV2_CPU_MAPPING=0:1:2:3
    3884                          mpiexec  ./a.out  $ROPTS < runfile_atmos
    3885                       fi
    3886 
    3887                    elif [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
     3502
     3503                   if [[ $host = lccrayf  ||  $host = lcxe6  ||  $host = lcxt5m ]]
    38883504                   then
    38893505
     
    39053521
    39063522             fi
     3523
    39073524          elif [[ $host = lckyoto ]]
    39083525          then
     
    39303547             fi
    39313548             set +xv
     3549
    39323550          elif [[ $host = lctit ]]
    39333551          then
     
    39473565             mpprun  -n $numprocs  a.out  $ROPTS
    39483566          fi
    3949           [[ $? != 0 ]]  &&  execution_error=true
    3950 
    3951 
    3952              # PERFORMANCE-AUSWERTUNG MIT APPRENTICE
    3953           if [[ "$cond1" = apprentice  ||  "$cond2" = apprentice ]]
    3954           then
    3955              apprentice
    3956           fi
    39573567       else
    39583568          a.out  $ROPTS
    39593569       fi
    39603570    fi
    3961     if [[ $? != 0  ||  $execution_error = true ]]
    3962     then
    3963 
    3964           # ABBRUCH BEI LAUFZEITFEHLER
    3965 #       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output*
     3571
     3572    if [[ $? != 0 ]]
     3573    then
     3574
     3575          # ABORT IN CASE OF RUNTIME ERRORS
    39663576       printf "\n  +++ runtime error occured"
    39673577       locat=execution
    39683578       exit
     3579
    39693580    else
    3970 #       [[ ! ( "$cond1" = debug  ||  "$cond2" = debug ) ]]  &&  cat  aout_output*
    3971        printf "\n$striche\n  *** execution finished \n"
    3972 
    3973           # Stop the dvr streaming server and process the dvr output in order
    3974           # to create dvrs- and html-files containing all streams
     3581
     3582       printf "\n$dashes\n  *** execution finished \n"
     3583
     3584          # STOP THE DVR STREAMING SERVER AND PROCESS THE DVR OUTPUT IN ORDER
     3585          # TO CREAT DVRS- AND HTML-FILES CONTAINING ALL STREAMS
    39753586       if [[ "$dvrserver_id" != "" ]]
    39763587       then
     
    39783589          printf "\n  *** dvr server with id=$dvrserver_id has been stopped"
    39793590
    3980              # If there is a directory, data have been output by the
    3981              # streaming server. Otherwise, user has chosen dvrp_output=local
     3591             # IF THERE IS A DIRECTORY, DATA HAVE BEEN OUTPUT BY THE
     3592             # STREAMING SERVER. OTHERWISE, USER HAS CHOSEN dvrp_output=local
    39823593          if [[ -d DATA_DVR ]]
    39833594          then
    39843595
    3985                 # Add the current dvr configuration file to the dvr output
    3986                 # directory
     3596                # ADD THE CURRENT DVR CONFIGURATION FILE TO THE DVR OUTPUT
     3597                # DIRECTORY
    39873598             cp  .dvrserver.config  DATA_DVR
    39883599
    3989                 # Process the dvr output (option -s for also generating
    3990                 # sequence mode data)
     3600                # PROCESS THE DVR OUTPUT (OPTION -s FOR GENERATING
     3601                # SEQUENCE MODE DATA TOO)
    39913602             process_dvr_output  -d DATA_DVR  -f $fname  -s
    39923603
    39933604          else
    39943605
    3995                 # Process the local output
     3606                # PROCESS THE LOCAL OUTPUT
    39963607             process_dvr_output  -l  -d DATA_DVR  -f $fname
    39973608
     
    40013612       then
    40023613
    4003              # Process dvr output generated in local mode (dvrp_output=local)
     3614             # PROCESS DVR OUTPUT GENERATD IN LOCAL MODE (dvrp_output=local)
    40043615          process_dvr_output  -l  -d DATA_DVR  -f $fname
    40053616
     
    40093620
    40103621
    4011        # Call of combine_plot_fields in order to merge single files written
    4012        # by each PE into one file.
     3622       # CALL OF combine_plot_fields IN ORDER TO MERGE SINGLE FILES WRITTEN
     3623       # BY EACH CORE INTO ONE FILE
    40133624   if [[ ! -f ${PALM_BIN}/combine_plot_fields${block}.x ]]
    40143625   then
     
    40273638      fi
    40283639   else
    4029 #     Temporary solution to skip combine_plot_fields. This is necessary in case of huge amount of
    4030 #     data output. To do: extend this branch by creating a batch job for combine_plot_fields.
     3640
     3641         # TEMPORARY SOLUTION TO SKIP combine_plot_fields. THIS IS REQUIRED IN CASE OF HUGE AMOUNT OF
     3642         # DATA OUTPUT. TO DO: EXTEND THIS BRANCH BY CREATING A BATCH JOB for combine_plot_fields.
     3643         # ??? koennen wir das streichen ???
    40313644      printf "\n\n\n *** post-processing: skipping combine_plot_fields (-Z option set) ..."
    40323645   fi
     
    40343647
    40353648
    4036        # EVENTUELLE OUTPUT-KOMMANDOS ABARBEITEN
     3649       # EXECUTE OUTPUT-COMMANDS GIVEN IN THE CONFIGURATION FILE
    40373650    (( i = 0 ))
    40383651    while (( i < ioc ))
     
    40413654       if (( i == 1 ))
    40423655       then
    4043           printf "\n\n  *** execution of OUTPUT-commands:\n$striche"
     3656          printf "\n\n  *** execution of OUTPUT-commands:\n$dashes"
    40443657       fi
    40453658       printf "\n  >>> ${out_command[$i]}"
     
    40473660       if (( i == ioc ))
    40483661       then
    4049           printf "\n$striche\n"
     3662          printf "\n$dashes\n"
    40503663       fi
    40513664    done
    40523665
    40533666
    4054        # EVTL. INHALT DES AKTUELLEN VERZEICHNISSES AUSGEBEN
     3667       # IN TRACE-MODE PRINT CONTENTS OF THE CURRENT (TEMPORARY) WORKING DIRECTORY
    40553668    if [[ $do_trace = true ]]
    40563669    then
     
    40613674
    40623675
    4063        # OUTPUT-DATEIEN AN IHRE ZIELORTE KOPIEREN
     3676       # COPY LOCAL OUTPUT-FILES TO THEIR PERMANENT DESTINATIONS
    40643677    (( i = 0 ))
    40653678    while (( i < iout ))
     
    40683681       if (( i == 1 ))
    40693682       then
    4070           printf "\n\n  *** saving OUTPUT-files:\n$striche"
    4071        fi
    4072 
    4073           # PRUEFEN, OB EINZELDATEI ODER DATEI PRO PROZESSOR
     3683          printf "\n\n  *** saving OUTPUT-files:\n$dashes"
     3684       fi
     3685
     3686          # CHECK FOR SINGLE FILE (SERIAL RUN) OR DIRECTORY (ONE FILE PER CORE FOR PARELLEL EXECUTION)
    40743687       files_for_pes=false; filetyp=file
    40753688       if [[ "${actionout[$i]}" = pe  &&  -n $numprocs ]]
     
    41123725
    41133726
    4114              # KOPIEREN PER FTP/SCP (IMMER IM BINAERMODUS, -M: FALLS ZIELKATALOG
    4115              # NICHT VORHANDEN, WIRD VERSUCHT, IHN ANZULEGEN), ABER NUR BEI
    4116              # REMOTE-RECHNUNGEN
     3727             # COPY VIA SCP TO LOCAL HOST (ALWAYS IN BINARY MODE USING batch_scp option -m)
     3728             # IF TARGET DIRECTORY DOES NOT EXISTS, TRY TO CREATE IT
    41173729          if [[ "${actionout[$i]}" = tr ]]
    41183730          then
     
    41303742                then
    41313743
    4132                       # TRANSFER IN EIGENSTAENDIGEM JOB
    4133                       # ZUERST KOPIE DER DATEI INS TEMPORAERE DATENVERZEICHNIS
     3744                      # TRANSFER IN SEPERATE JOB
     3745                      # FIRST COPY FILE TO TEMPORY DATA DIRECTORY
    41343746                   [[ ! -d $tmp_data_catalog/TRANSFER ]]  &&  mkdir -p  $tmp_data_catalog/TRANSFER
    41353747                   file_to_transfer=${fname}_${localout[$i]}_to_transfer_$kennung
     
    41663778                else
    41673779
    4168                       # TRANSFER INNERHALB DIESES JOBS
     3780                      # TRANSFER WITHIN THIS JOB
    41693781                   transfer_failed=false
    41703782                   printf "\n  >>> OUTPUT: ${localout[$i]}$cst  by SCP to"
     
    41813793                   [[ $? != 0 ]]  &&  transfer_failed=true
    41823794
    4183                       # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF
    4184                       # LOKALER MASCHINE ANLEGEN
     3795                      # IF TRANSFER FAILED, CREATE BACKUP COPY ON THIS MACHINE
    41853796                   if [[ $transfer_failed = true ]]
    41863797                   then
    4187                       printf "  +++ transfer failed. Trying to save a copy on the local host under:\n"
     3798                      printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
    41883799                      printf "      ${pathout[$i]}/${localhost}_${fname}${endout[$i]}_$kennung\n"
    41893800
    4190                          # ERSTMAL PRUEFEN, OB VERZEICHNIS EXISTIERT. GEGEBENENFALLS
    4191                          # ANLEGEN.
     3801                         # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
    41923802                      eval  local_catalog=${pathout[$i]}
    41933803                      if [[ ! -d $local_catalog ]]
     
    42033813             else
    42043814
    4205                    # WERTZUWEISUNG, SO DASS WEITER UNTEN NUR KOPIERT WIRD
     3815                   # UNSET actionout. DUE TO THIS SETTING, FILE WILL LATER JUST BE COPIED ON THIS MACHINE
    42063816                actionout[$i]=""
    42073817             fi
     
    42093819
    42103820
    4211              # APPEND PER FTP/SCP (IMMER IM BINAERMODUS, -M: FALLS ZIELKATALOG
    4212              # NICHT VORHANDEN, WIRD VERSUCHT, IHN ANZULEGEN), ABER NUR BEI
    4213              # REMOTE-RECHNUNGEN
     3821             # APPEND VIA SCP TO LOCAL HOST (ALWAYS IN BINARY MODE USING batch_scp option -m)
     3822             # IF TARGET DIRECTORY DOES NOT EXISTS, TRY TO CREATE IT
    42143823          if [[ "${actionout[$i]}" = tra ]]
    42153824          then
     
    42193828                then
    42203829
    4221                       # TRANSFER IN EIGENSTAENDIGEM JOB
    4222                       # ZUERST KOPIE DER DATEI INS TEMPORAERE DATENVERZEICHNIS
     3830                      # TRANSFER IN SEPERATE JOB
     3831                      # FIRST COPY FILE TO TEMPORY DATA DIRECTORY
    42233832                   [[ ! -d $tmp_data_catalog/TRANSFER ]]  &&  mkdir -p  $tmp_data_catalog/TRANSFER
    42243833                   file_to_transfer=${fname}_${localout[$i]}_to_transfer_$kennung
     
    42493858                else
    42503859
    4251                       # TRANSFER INNERHALB DIESES JOBS
     3860                      # TRANSFER WITHIN THIS JOB
    42523861                   transfer_failed=false
    42533862                   printf "\n  >>> OUTPUT: ${localout[$i]}  append by SCP to"
     
    42643873                   [[ $? != 0 ]]  &&  transfer_failed=true
    42653874
    4266                       # BEI FEHLGESCHLAGENEM TRANSFER SICHERUNGSKOPIE AUF
    4267                       # LOKALER MASCHINE ANLEGEN
     3875                      # IF TRANSFER FAILED, CREATE BACKUP COPY ON THIS MACHINE
    42683876                   if [[ $transfer_failed = true ]]
    42693877                   then
    4270                       printf "  +++ transfer failed. Trying to save a copy on the local host under:\n"
     3878                      printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
    42713879                      printf "      ${pathout[$i]}/${localhost}_${fname}${endout[$i]}_$kennung\n"
    42723880
    4273                          # ERSTMAL PRUEFEN, OB VERZEICHNIS EXISTIERT. GEGEBENENFALLS
    4274                          # ANLEGEN
     3881                         # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
    42753882                      eval  local_catalog=${pathout[$i]}
    42763883                      if [[ ! -d $local_catalog ]]
     
    42873894             else
    42883895
    4289                    # WERTZUWEISUNG, SO DASS WEITER UNTEN NUR APPEND AUF
    4290                    # LOKALER MASCHINE DURCHGEFUEHRT WIRD
     3896                   # RESET actionout. DUE TO THIS SETTING, FILE WILL LATER JUST BE APPENDED ON THIS MACHINE
    42913897                actionout[$i]=a
    42923898             fi
     
    42943900
    42953901
    4296              # OUTPUT-DATEI FUER EINEN FORTSETZUNGSLAUF. DATEI WIRD PER
    4297              # LINK AUF DEN TEMPORAEREN DATENKATALOG GELEGT. OPTION -f WIRD
    4298              # VERWENDET, FALLS DORT NOCH EINE DATEI GLEICHEN NAMENS VORHANDEN
    4299              # SEIN SOLLTE. ANSCHLIESSEND WIRD SEINE ARCHIVIERUNG ANGESTOSSEN
     3902             # OUTPUT-FILE FOR A RESTART-RUN.
     3903             # FILE IS MOVED TO THE TEMPORARY DATA DIRECTORY USING link COMMAND.
     3904             # OPTION -f IS USED TO OVERWRITE EXISTING FILES.
     3905             # AS LAST ACTION, ARCHIVING IS INITIATED.
    43003906          if [[ "${actionout[$i]}" = fl ]]
    43013907          then
     
    43203926
    43213927
    4322                 # ARCHIVIERUNGSJOB WIRD ERZEUGT UND ABGESCHICKT
     3928                # CREATE AND SUBMIT ARCHIVING-JOB
    43233929             if [[ $store_on_archive_system = true ]]
    43243930             then
     
    43603966                      exit
    43613967                   else
     3968                         # ??? nicht benötigte Archiv-Systeme entfernen ???
    43623969                         # FUER RECHNER IN JUELICH. DORT KOENNTEN AUCH
    43633970                         # EINZELNE DATEIEN GESICHERT WERDEN (SPAETER KORR.)
     
    43703977                   if [[ $files_for_pes = false ]]
    43713978                   then
    4372                          # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
     3979                         # REMOVE EXISTING OLD FILES FROM THE ARCHIVE
    43733980                      echo "set -x"                                   >> archive_${frelout[$i]}
    43743981                      echo "rm  -rf  \$PERM/${frelout[$i]}"           >> archive_${frelout[$i]}
     
    43863993                      while (( inode < nodes ))
    43873994                      do
    4388 #                         echo "*** all_files = \"$all_files\" "
    43893995                         files=`echo $all_files | cut -d" " -f1-$tasks_per_node`
    43903996                         all_files=`echo $all_files | cut -d" " -f$tp1-`
    4391 #                         echo "*** tasks_per_node = \"$tasks_per_node\" "
    4392 #                         echo "*** files = \"$files\" "
    4393 #                         echo "*** all_files = \"$all_files\" "
    4394                         echo "tar  cvf \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar $files"   >> archive_${frelout[$i]}
    4395                         ### echo "tar  cvf ${frelout[$i]}.node_$inode.tar $files"   >> archive_${frelout[$i]}
    4396                         ### echo "cp ${frelout[$i]}.node_$inode.tar \$PERM/${frelout[$i]}/"   >> archive_${frelout[$i]}
    4397                          ###echo "rm ${frelout[$i]}.node_$inode.tar"   >> archive_${frelout[$i]}
    4398 #                         echo "dsmc incremental  \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar" >> archive_${frelout[$i]}
    4399 #                         echo "dsmmigrate \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar"        >> archive_${frelout[$i]}
     3997                         echo "tar  cvf \$PERM/${frelout[$i]}/${frelout[$i]}.node_$inode.tar $files"   >> archive_${frelout[$i]}
    44003998                         (( inode = inode + 1 ))
    44013999                      done
    4402 #                      echo "rm  -rf  \$PERM/${frelout[$i]}.tar"       >> archive_${frelout[$i]}
    4403 #                      echo "tar  cvf \$PERM/${frelout[$i]}.tar ${frelout[$i]}" >> archive_${frelout[$i]}
    44044000                   fi
    44054001                elif [[ $archive_system = ut ]]
     
    44084004                   if [[ $files_for_pes = false ]]
    44094005                   then
    4410                          # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
     4006                         # REMOVE EXISTING OLD FILES FROM THE ARCHIVE
    44114007                      echo "set -x"                                 >> archive_${frelout[$i]}
    44124008                      echo "rm  -rf  \$UT/${frelout[$i]}"           >> archive_${frelout[$i]}
     
    44374033                if [[ $archive_system != none ]]
    44384034                then
    4439                    if [[ $localhost = lcsgih  ||  $localhost = lcsgib ]]
    4440                    then
    4441 #                      subjob  -d  -v  -q cdata  -X 0  -m 1000  -t 43200  -c $job_catalog  $PORTOPT  archive_${frelout[$i]}
    4442                       subjob   -v  -q permq  -X 1 -T 1  -m 1000  -t 172800  -c $job_catalog  $PORTOPT  archive_${frelout[$i]}
    4443                    elif [[ $localhost = nech ]]
     4035                   if [[ $localhost = nech ]]
    44444036                   then
    44454037                      subjob  -d  -c /pf/b/$usern/job_queue  -v  -q pp  -X 0  -m 1000  -t 7200  $PORTOPT  archive_${frelout[$i]}
     
    44524044
    44534045
    4454                 # LEERDATEI IM BENUTZERVERZEICHNIS ANLEGEN, DAMIT BEKANNT IST,
    4455                 # WIE DIE HOECHSTE ZYKLUSNUMMER AUF DEM ARCHIV-SYSTEM LAUTET
     4046                # CREATE AN EMPTY DIRECTORY IN THE USERS PERMANENT DIRECTORY,
     4047                # IN ORDER TO NOTE THE RESPECTIVE CYCLE NUMBER ON THE ARCHIVE SYSTEM
     4048                # RESTART-JOBS ARE USING THESE EMPTY-DIRECTORIES TO GET THE CURRENT HIGHEST
     4049                # CYCLE NUMBER ON THE ARCHIVE SYSTEM (IN CASE THAT INFORMATIONS ARE DIFFICULT TO
     4050                # TO ACCESS FROM THE ARCHIVE-SYSTEM DIRECTLY))
    44564051             if [[ $files_for_pes = false ]]
    44574052             then
     
    44644059
    44654060
    4466              # KOPIEREN AUF LOKALER MASCHINE ZUM ARCHIV-SYSTEM
    4467              # AUSSERDEM MUSS LEERDATEI ANGELEGT WERDEN, DAMIT BEKANNT IST,
    4468              # WIE DIE HOECHSTE ZYKLUSNUMMER AUF DEM ARCHIV-SYSTEM LAUTET
    4469              # FALLS IRGENDEINE (VON MEHREREN) ARCHIVIERUNGEN SCHIEF GEHT,
    4470              # WIRD FLAG GESETZT UND BLEIBT AUCH BEI WEITEREN ORDNUNGS-
    4471              # GEMAESSEN ARCHIVIERUNGEN GESETZT
     4061             # COPY FROM THIS HOST TO THE ARCHIVE-SYSTEM
     4062             # IF ANY ARCHIVING FAILS, AN ERROR-FLAG-FILE IS SET
     4063             # THIS FILE REMAINS TO BE SET, EVEN IF ARCHIVING OF FURTHER FILES IS SUCCESSFULL
    44724064          if [[ "${actionout[$i]}" = ar ]]
    44734065          then
     
    45364128             elif [[ $archive_system = tivoli ]]
    45374129             then
    4538                    # ARCHIVIERUNG NUR PER BATCH-JOB MOEGLICH
    4539                    # DATEI MUSS ZWISCHENZEITLICH INS TEMPORAERE DATENVERZEICHNIS
    4540                    # GELEGT WERDEN
     4130                   # ARCHIVING ONLY POSSIBLE VIA BATCH-JOB
     4131                   # IN THE MEANTIME, FILE IS STORED IN THE TEMPORARY DATA DIRECTORY,
     4132                   # BECAUSE MRUN'S CURRENT TEMPORARY WORKING DIRECTORY MAY ALREADY BE DELETED
     4133                   # WHEN THE ARCHIVE-JOB IS EXECUTED
    45414134                [[ ! -d $tmp_data_catalog ]]  &&  mkdir -p  $tmp_data_catalog
    45424135                chmod  g+rx  $tmp_data_catalog
     
    45494142                fi
    45504143
    4551                    # BATCH JOB GENERIEREN UND ABSCHICKEN; DATEI MUSS WIEDER
    4552                    # AUS TEMPORAEREM DATENVERZEICHNIS ENTFERNT WERDEN
     4144                   # GENERATE AND SUBMIT BATCH-JOB
     4145                   # FILE HAS TO BE DELETED FROM THE TEMPORARY DATA DIRECTORY
     4146                   # DELETE OLD EXISTING FILES FROM THE ARCHIVE
    45534147                echo "cd  $tmp_data_catalog"                       >  archive_${frelout[$i]}
    45544148                if [[ $files_for_pes = false ]]
    45554149                then
    4556                       # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
    45574150                   echo "rm  -rf  \$PERM/${frelout[$i]}"           >> archive_${frelout[$i]}
    45584151                   echo "cp  ${frelout[$i]} \$PERM/${frelout[$i]}" >> archive_${frelout[$i]}
     
    45704163             elif [[ $archive_system = ut ]]
    45714164             then
    4572                    # ARCHIVIERUNG NUR PER BATCH-JOB MOEGLICH
    4573                    # DATEI MUSS ZWISCHENZEITLICH INS TEMPORAERE DATENVERZEICHNIS
    4574                    # GELEGT WERDEN
     4165                   # ARCHIVING ONLY POSSIBLE VIA BATCH-JOB
     4166                   # IN THE MEANTIME, FILE IS STORED IN THE TEMPORARY DATA DIRECTORY,
     4167                   # BECAUSE MRUN'S CURRENT TEMPORARY WORKING DIRECTORY MAY ALREADY BE DELETED
     4168                   # WHEN THE ARCHIVE-JOB IS EXECUTED
    45754169                [[ ! -d $tmp_data_catalog ]]  &&  mkdir -p  $tmp_data_catalog
    45764170                chmod  g+rx  $tmp_data_catalog
     
    45834177                fi
    45844178
    4585                    # BATCH JOB GENERIEREN UND ABSCHICKEN; DATEI MUSS WIEDER
    4586                    # AUS TEMPORAEREM DATENVERZEICHNIS ENTFERNT WERDEN
     4179                   # GENERATE AND SUBMIT BATCH-JOB
     4180                   # FILE HAS TO BE DELETED FROM THE TEMPORARY DATA DIRECTORY
     4181                   # DELETE OLD EXISTING FILES FROM THE ARCHIVE
    45874182                echo "cd  $tmp_data_catalog"                       >  archive_${frelout[$i]}
    45884183                if [[ $files_for_pes = false ]]
    45894184                then
    4590                       # EVENTUELL NOCH VORHANDENE DATEI IM ARCHIV LOSCHEN
    45914185                   echo "rm  -rf  \$UT/${frelout[$i]}"           >> archive_${frelout[$i]}
    45924186                   echo "cp  ${frelout[$i]} \$UT/${frelout[$i]}" >> archive_${frelout[$i]}
     
    46064200                archive_save=false
    46074201             fi
     4202
     4203                # CREATE EMPTY FLAG-FILE OR -DIRECTORY
     4204                # IN ORDER TO NOTE THE RESPECTIVE CYCLE NUMBER ON THE ARCHIVE SYSTEM
     4205                # RESTART-JOBS ARE USING THESE EMPTY-DIRECTORIES TO GET THE CURRENT HIGHEST
     4206                # CYCLE NUMBER ON THE ARCHIVE SYSTEM (IN CASE THAT INFORMATIONS ARE DIFFICULT TO
     4207                # TO ACCESS FROM THE ARCHIVE-SYSTEM DIRECTLY))
    46084208             if [[ $file_saved = true ]]
    46094209             then
     
    46154215                fi
    46164216             fi
    4617           fi
    4618 
    4619              # APPEND AUF LOKALER MASCHINE
     4217
     4218          fi
     4219
     4220             # APPEND ON THIS MACHINE
    46204221          if [[ "${actionout[$i]}" = "a" ]]
    46214222          then
     
    46304231          fi
    46314232
    4632              # KOPIEREN AUF LOKALER MASCHINE
    4633              # ES MUSS KOPIERT WERDEN, DA MOVE NICHT UEBER FILESYSTEM HINAUS MOEGLICH
     4233             # COPY ON THIS MACHINE
     4234             # COPY HAS TO BE USED, BECAUSE MOVE DOES NOT WORK IF FILE-ORIGIN AND TARGET ARE
     4235             # ON DIFFERENT FILE-SYSTEMS
    46344236          if [[ "${actionout[$i]}" = ""  &&  $files_for_pes = false ]]
    46354237          then
    46364238
    4637                 # KOPIEREN AUF EINPROZESSORMASCHINE
     4239                # COPY IN CASE OF RUNS ON SINGLE CORES
    46384240             if [[ "${extout[$i]}" != " "  &&  "${extout[$i]}" != "" ]]
    46394241             then
     
    46744276          then
    46754277
    4676                 # DIE DEN PROZESSOREN EINES PARALLELRECHNERS ZUGEHOERIGEN
    4677                 # DATEIEN WERDEN ERST IN EINEM KATALOG GESAMMELT UND DIESER
    4678                 # WIRD DANN KOPIERT
    4679                 # PER MOVE UMBENANNT WERDEN
     4278                # FILES FROM THE DIFFERENT CORES ARE MOVED WITH ln-COMMAND TO THE PERMANENT DIRECTORY
     4279                # AS A FIRST STEP, THE PERMANENT DIRECTORY IS CREATED
    46804280             printf "\n  >>> OUTPUT: ${localout[$i]}/_....  to  ${pathout[$i]}\n"
    46814281             if [[ $link_local_output = true ]]
     
    46904290                 cd $TEMPDIR
    46914291             fi
    4692              # If "ln -f" fails of if "$link_local_output = false" do a normal "cp -r"
     4292
     4293                # IF "ln -f" HAS FAILED OR IF "$link_local_output = false" DO A NORMAL COPY "cp -r"
    46934294             if [[ ! -f "${pathout[$i]}/_0000" ]]
    46944295             then
     
    47074308       if [[ $transfer_problems = true ]]
    47084309       then
    4709           printf "\n$striche\n  *** OUTPUT-files saved"
     4310          printf "\n$dashes\n  *** OUTPUT-files saved"
    47104311          printf "\n  +++ WARNING: some data transfers failed! \n"
    47114312       else
    4712           printf "\n$striche\n  *** all OUTPUT-files saved \n"
    4713        fi
    4714     fi
    4715 
    4716 
    4717        # EVENTUELL FOLGEJOB STARTEN
    4718        # DATEI CONTINUE_RUN MUSS VOM BENUTZERPROGRAMM AUS ERZEUGT WERDEN
     4313          printf "\n$dashes\n  *** all OUTPUT-files saved \n"
     4314       fi
     4315    fi
     4316
     4317
     4318       # IF REQUIRED, START A RESTART-JOB
     4319       # FILE CONTINUE_RUN MUST HAVE BEEN CREATED BY THE EXECUTABLE (PALM)
    47194320    if [[ -f CONTINUE_RUN ]]
    47204321    then
     
    47234324       then
    47244325
    4725              # ZUERST IN MRUN-AUFRUF OPTIONEN FUER FORTSETZUNGSLAUF, FUER
    4726              # STILLES ABARBEITEN (OHNE INTERAKTIVE RUECKFAGEN) UND FUER
    4727              # BATCH-BETRIEB (NUR WICHTIG, FALLS BATCH AUF LOKALER MASCHINE
    4728              # DURCHGEFUEHRT WERDEN SOLL) EINFUEGEN, FALLS NICHT BEREITS VOR-
    4729              # HANDEN
     4326             # ADD RESTART-OPTIONS TO THE MRUN-CALL (IF THEY ARE NOT USED ALREADY):
     4327             # -C TELLS MRUN THAT IT IS A RESTART-RUN
     4328             # -v SILENT MODE WITHOUT INTERACTIVE QUERIES
     4329             # -n BATCH-MODE (IMPORTANT ONLY IN CASE OF BATCH JOBS ON THE LOCAL MACHINE)
    47304330          [[ $(echo $mc | grep -c "\-C") = 0 ]]  &&  mc="$mc -C"
    47314331          [[ $(echo $mc | grep -c "\-v") = 0 ]]  &&  mc="$mc -v"
     
    47374337
    47384338
    4739              # JOB STARTEN
     4339             # START THE RESTART-JOB
    47404340          printf "\n\n  *** initiating restart-run on \"$return_addres\" using command:\n"
    47414341          echo "      $mc"
    4742           printf "\n$striche\n"
     4342          printf "\n$dashes\n"
    47434343          if [[ $localhost != $fromhost ]]
    47444344          then
    47454345
    4746              if [[ $localhost = lcsgih  ||  $localhost = lccrayb  ||  $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
     4346             if [[ $localhost = lccrayh  ||  $localhost = nech  ||  $localhost = ibmh  ||  $localhost = ibmkisti  ||  $localhost = ibmku  ||  $localhost = ibms  ||  $localhost = lcflow  ||  $localhost = lckyu* ]]
    47474347             then
    47484348                echo "*** ssh will be used to initiate restart-runs!"
     
    47864386             fi
    47874387
    4788                 # WARTEN, DAMIT SICH RESTART JOB IN QUEUE EINREIHEN KANN, BEVOR
    4789                 # DER AKTUELLE JOB ENDET
     4388                # WAIT TO ALLOW THE RESTART-JOB TO BE QUEUED, BEFORE THE CURRENT JOB IS FINISHED
    47904389             if [[ $queue = special1q ]]
    47914390             then
     
    47974396          else
    47984397
    4799                 # BEI RECHNUNGEN AUF LOKALER MASCHINE KANN MRUN DIREKT AUFGE-
    4800                 # RUFEN WERDEN, AUSSER AUF lcfimm
     4398                # JOBS RUNNING (AND STARTED) ON THE LOCAL MACHINE CAN DIRECTLY CALL MRUN (WITHOUT
     4399                # USING SSH)
    48014400             cd $LOCAL_PWD
    4802              if [[ $localhost = lcfimm ]]
    4803              then
    4804                 ssh $SSH_PORTOPT $return_addres -l $return_username "PATH=\$PATH:$LOCAL_MRUN_PATH;export PALM_BIN=$LOCAL_MRUN_PATH;cd $LOCAL_PWD; $mc "
    4805              elif [[ $localhost = lckyuh ]]
     4401             if [[ $localhost = lckyuh ]]
    48064402             then
    48074403                printf "\n  +++ WARNING: no restart mechanism available for host \"$localhost\" "
     
    48094405                printf "\n               \"$mc\" "
    48104406             else
    4811                 eval  $mc                # ' MUESSEN AUSGEWERTET WERDEN
     4407                eval  $mc                # THE ' MUST BE EVALUATED
    48124408             fi
    48134409             cd -  > /dev/null
     
    48154411          if [[ $localhost = lckyuh ]]
    48164412          then
    4817              printf "\n$striche\n  *** restart-run to be initiated manually\n"
     4413             printf "\n$dashes\n  *** restart-run to be initiated manually\n"
    48184414          else
    4819              printf "\n$striche\n  *** restart-run initiated \n"
    4820           fi
    4821 
    4822 
    4823              # EVENTUELL INPUT-DATEIEN, DIE VON TEMPORAEREM DATENVERZEICHNIS
    4824              # GEHOLT WORDEN SIND, LOESCHEN
     4415             printf "\n$dashes\n  *** restart-run initiated \n"
     4416          fi
     4417
     4418
     4419             # DELETE INPUT-(RESTART)FILES, WHICH HAVE BEEN FETCHED FROM THE TEMPORARY DATA
     4420             # DIRECTORY, BACAUSE THEY ARE NOT REQUIRED BY THE RESTART-JOB.
     4421             # THIS IS DONE IN ORDER TO AVOID EXCEEDING DISC QUOTAS OR DISC SPACE (RESTART-FILES
     4422             # MAY BE VERY HUGE)
    48254423          (( i = 0 ))
    48264424          while (( i < iin ))
     
    48434441
    48444442   
    4845        # EVTL. EMAIL-BENACHRICHTIGUNG UEBER ABGESCHLOSSENEN LAUF
     4443       # SEND EMAIL NOTIFICATION ABOUT THE FINISHED RUN
    48464444    if [[ "$email_notification" != "none" ]]
    48474445    then
     
    48664464
    48674465
    4868        # ALLE ARBEITEN BEENDET. TEMPORAERER KATALOG KANN GELOESCHT WERDEN
     4466       # ALL ACTIONS FINISHED, TEMPORARY WORKING-DIRECTORY CAN BE DELETED
    48694467    cd  $HOME
    48704468    [[ $delete_temporary_catalog = true ]]  &&  rm -rf $TEMPDIR
     
    48734471
    48744472
    4875        # FALLS AUF REMOTE-MASCHINE GERECHNET WERDEN SOLL, WERDEN JETZT ENTSPRE-
    4876        # CHENDE AKTIONEN DURCHGEFUEHRT
    4877 
    4878        # MRUN-BEFEHL FUER REMOTE-MASCHINE ZUSAMMENSTELLEN
     4473       # PREPARING ACTIONS,
     4474       # IF A BATCH-JOB IS TO BE GENERATED AND STARTED ON A REMOTE-MACHINE GERECHNET
     4475
     4476       # BUILD THE MRUN-COMMAND TO BE CALLED IN THE BATCH-JOB ON THE REMOTE-MACHINE
    48794477    mrun_com="$mrun_script_name -a $afname -c $config_file -d $fname -h $host -H $fromhost -m $memory -t $cpumax -q $queue -R $return_addres -U $return_username -u $remote_username"
    48804478    [[ "$cpp_opts" != "" ]]       &&  mrun_com=${mrun_com}" -D \"$cpp_opts\""
     
    48864484    [[ $keep_data_from_previous_run = true ]]  &&  mrun_com=${mrun_com}" -k"
    48874485    [[ "$additional_conditions" != "" ]]  &&  mrun_com=${mrun_com}" -K \"$additional_conditions\""
    4888 #    [[ "$makefile" != "$source_path/Makefile" ]]  &&  mrun_com=${mrun_com}" -M \"$makefile\""
    48894486    [[ "$output_list" != "" ]]    &&  mrun_com=${mrun_com}" -o \"$output_list\""
    48904487    [[ "$read_from_config" = false ]]  &&  mrun_com=${mrun_com}" -S"
     
    49124509
    49134510
    4914        # create executable for batch job
     4511       # CREATE EXECUTABLE FOR BATCH JOB
    49154512    if [[ $create_executable_for_batch = true  &&  $restart_run != true ]]
    49164513    then
     
    49184515       printf "\n  *** creating the executable for batch job\n"
    49194516
    4920           # method only works for batch jobs on local hosts
     4517          # METHOD ONLY WORKS FOR BATCH JOBS ON LOCAL HOSTS
    49214518       if [[ $host != $localhost ]]
    49224519       then
     
    49514548
    49524549
    4953        # ZUSAMMENSTELLUNG DES JOBSCRIPTS AUF DATEI jobfile
     4550       # BUILD THE JOB-SCRIPTS ON FILE jobfile
    49544551    jobfile=jobfile.$RANDOM
    49554552
    49564553
    4957        # TEMPORAERES VERZEICHNIS GENERIEREN UND NACH DORT WECHSELN
     4554       # CREATE TEMPORARY DIRECTORY AND SWITCH TO IT
    49584555    echo  "mkdir  $TEMPDIR"      >>  $jobfile
    49594556    echo  "cd  $TEMPDIR"         >>  $jobfile
    49604557
    49614558
    4962        # EVENTUELL FEHLERVERFOLGUNG AKTIVIEREN
     4559       # ACTIVATE ERROR-TRACEBACK
    49634560    if [[ $do_trace = true ]]
    49644561    then
     
    49694566
    49704567
    4971        # initialize the environment and load modules
     4568       # INITIALIZE THE ENVIRONMENT AND LOAD MODULES
    49724569    if [[ "$init_cmds" != "" ]]
    49734570    then
     
    49804577
    49814578
    4982        # BEREITSTELLUNG VON QUELLTEXTEN, MRUN-SCRIPTS UND KONFIGURATIONS-
    4983        # DATEI FUER DEN JOB
    4984     if [[ $( echo $host | cut -c1-5 ) = lcsgi  ||  $host = ibmkisti  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh ]]
    4985     then
    4986 
    4987           # KONFIGURATIONSDATEI UND MRUN_SCRIPT IN DAS SOURCE-VERZEICHNIS
    4988           # KOPIEREN
     4579       # PROVIDE SOURCE-CODE FILES, MRUN-SCRIPT AND CONFIGURATION-FILE FOR THE JOB
     4580       # then-CLAUSE: FILES ARE COLLECTED IN THE SOURCES_FOR_RUN_... DIRECTORY ON THE LOCAL HOST,
     4581       #              WHICH IS THEN FETCHED FROM THE BATCH-JOB BY USING cp/scp
     4582       #              THE SOURCE-CODE FILES ALREADY EXIST IN THIS DIRECTORY
     4583       # else-CLAUSE: FILE-CONTENTS ARE PUT INTO THE JOB-FILE AS HERE-DOCUMENTS
     4584       #              THIS MAY CREATE A QUITE LARGE JOB-FILE, WHICH CAN CAUSE PROBLEMS WITH SOME
     4585       #              QUEUEING-SYSTEMS
     4586    if [[ $host = ibmkisti  ||  $host = lccrayb  ||  $host = lccrayf  ||  $host = lccrayh ]]
     4587    then
     4588
     4589          # COPY CONFIGURATION-FILE AND MRUN-SCRIPT INTO THE SOURCES_FOR_RUN... DIRECTORY
    49894590       if [[ $restart_run != true ]]
    49904591       then
     
    49934594       fi
    49944595
    4995           # SOURCE-VERZEICHNIS VOM LOKALEN RECHNER PER SCP TRANSFERIEREN
    4996           # (BEI JOBS AUF LOKALEM RECHNER REICHT CP)
     4596          # COPY THE SOURCES_FOR_RUN... DIRECTORY FROM THE LOCAL HOST TO THE JOB VIA scp
     4597          # (then-CLAUSE: JOBS ON THE LOCAL HOST CAN JUST USE cp)
    49974598       echo  "set -x"  >>  $jobfile
    49984599       if [[ $host = $localhost ]]
     
    50114612          if [[ $host = ibmkisti ]]
    50124613          then
    5013                 # on KISTI's IBM firewall is only opened on interactive node
     4614                # ON KISTI'S IBM FIREWALL IS ONLY OPENED ON INTERACTIVE NODE
    50144615             echo  "localdir=\`pwd\`"                            >>  $jobfile
    50154616             echo  "ssh $SSH_PORTOPT $remote_username@gaiad \"cd \$localdir; scp $PORTOPT -r  $return_username@$return_addres:$working_directory/SOURCES_FOR_RUN_$fname .\" "  >>  $jobfile
     
    50294630       echo  "export SOURCES_COMPLETE=true"                      >>  $jobfile
    50304631
    5031           # QUELLTEXTE, MRUN-SCRIPT UND KONFIGURATIONSDATEI IN DAS AKTUELLE
    5032           # ARBEITSVERZEICHNIS VERSCHIEBEN
     4632          # MOVE MRUN-SCRIPT AND CONFIGURATION-FILE FROM THE SOURCES_FOR_RUN... DIRECTORY TO THE
     4633          # WORKING DIRECTORY OF THE JOB
    50334634       echo  "mv  SOURCES_FOR_RUN_$fname/$config_file  . "       >>  $jobfile
    50344635       echo  "mv  SOURCES_FOR_RUN_$fname/$mrun_script_name  . "  >>  $jobfile
     
    50394640    else
    50404641
    5041           # ABSPEICHERN DER QUELLTEXTE (NUR FALLS UEBERSETZT WERDEN SOLL)
    5042           # SOWIE GEGEBENENFALLS DES MAKEFILES
     4642          # PROVIDE SOURCE-CODE FILES AND MAKEFILE AS HERE DOCUMENT
    50434643       if [[ $do_compile = true ]]
    50444644       then
     
    50464646          source_catalog=SOURCES_FOR_RUN_$fname
    50474647
    5048               # UNTERVERZEICHNIS FUER QUELLTEXTE UND MAKEFILE ANLEGEN
    5049               # MRUN WIRD DIESES VRZEICHNIS UEBER ENVIRONMENT VARIABLE
    5050               # MITGETEILT (UEBERSTEUERT ANGABE IN KONFIGURATIONSDATEI)
     4648              # CREATE SOURCES_FOR_RUN... DIRECTORY TO STORE THE SOURCE CODE FILES AND THE MAKEFILE
    50514649          echo  "mkdir  SOURCES_FOR_RUN_$fname"                >>  $jobfile
    50524650          echo  "export SOURCES_COMPLETE=true"                 >>  $jobfile
     
    50554653          for  filename  in  $source_list
    50564654          do
    5057                 # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
     4655                # BACKSLASH IS USED FOR MASKING
    50584656             echo  "cat > $filename << \"%END%\""              >>  $jobfile
    50594657             cat   $source_catalog/$filename                   >>  $jobfile
     
    50634661          done
    50644662
    5065              # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
     4663             # BACKSLASH IS USED FOR MASKING
    50664664          echo  "cat > Makefile << \"%END%\""               >>  $jobfile
    50674665          cat   $source_catalog/Makefile                    >>  $jobfile
     
    50754673
    50764674
    5077           # ABSPEICHERN DER KONFIGURATIONSDATEI
    5078           # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
    5079           # Lines with #$ coming from the svn keyword substitution are
    5080           # removed from the config file in order to avoid problems
    5081           # with the SGE batch system
     4675          # PROVIDE THE CONFIGURATION-FILE AS HERE-DOCUMENT
     4676          # BACKSLASH IS USED FOR MASKING
     4677          # LINES WITH #$ IN THE CONFIGURATION-FILE, COMING FROM THE SVN KEYWORD SUBSTITUTION,
     4678          # ARE REMOVED FROM THE FILE IN ORDER TO AVOID PROBLEMS WITH THE SGE BATCH SYSTEM
    50824679       echo  "cat > $config_file << \"%END%\""      >>  $jobfile
    50834680       if [[ $host = lckyuh ]]
    50844681       then
    5085              # no cross compiler on compute node
     4682             # NO CROSS-COMPILER ON COMPUTE NODE
    50864683          sed  's/frtpx/frt/g'  $config_file        >>  $jobfile
    50874684       else
     
    50924689
    50934690
    5094           # ABSPEICHERN DER AKTUELLEN MRUN-VERSION
    5095           # ABDECKZEICHEN VERHINDERN, DASS ERSETZUNGEN ERFOLGEN
     4691          # PROVIDE THE MRUN-SCRIPTS AS HERE-DOCUMENT
     4692          # BACKSLASH IS USED FOR MASKING
    50964693       echo  "cat > $mrun_script_name <<\"%END%\""  >>  $jobfile
    50974694       if [[ $host = lckyuh ]]
     
    51094706
    51104707
    5111        # EVTL. BENOETIGTE INPUT-DATEIEN PER FTP HOLEN ODER DEM JOB DIREKT
    5112        # MITGEBEN UND AUF DEM REMOTE-RECHNER IM BENUTZERVERZEICHNIS ABLEGEN
    5113        # FALLS DIESES NICHT EXISTIERT, WIRD VERSUCHT, DAS JEWEILS LETZTE
    5114        # UNTERVERZEICHNIS DES PFADNAMENS ANZULEGEN
     4708       # GET REQUIRED INPUT-FILES BY SCP OR BY SENDING THEM WITH THE JOB AS HERE-DOCUMENT
     4709       # PUT THESE FILES INTO THE USER'S RESPECTIVE PERMANENT DIRECTORIES ON THE REMOTE-HOST
     4710       # IF THE DIRECTORIES DO NOT EXIST, TRY TO CREATE THEM
    51154711    if [[ $do_remote = true ]]
    51164712    then
     
    51304726          fi
    51314727
    5132              # UEBERPRUEFEN, OB DATEI ANGELEGT WERDEN KONNTE
     4728             # CHECK, IF FILE COULD BE CREATED
    51334729          echo  "if [[ \$? = 1 ]]"                    >>  $jobfile
    51344730          echo  "then"                                >>  $jobfile
     
    51424738    fi
    51434739
    5144        # ARBEITSKATALOG AUF DER LOKALEN MASCHINE FUER EVENTUELLE
    5145        # FORTSETZUNGSLAUEFE PER ENV-VARIABLE UEBERGEBEN
     4740       # PROVIDE NAME OF THE CURRENT WORKING-DIRECTORY ON THE LOCAL MACHINE (FROM WHERE THE JOB IS
     4741       # STARTED) BY SETTING AN ENVIRONMENT-VARIABLE. THIS INFORMATION IS USED IN THE JOB BY MRUN
     4742       # IN CASE THAT RESTART-RUNS HAVE TO BE GENERATED
    51464743    echo  "LOCAL_PWD=$working_directory"                >>  $jobfile
    51474744    echo  "export LOCAL_PWD"                            >>  $jobfile
    51484745
    5149        # EBENSO LOKALEN MRUN-KATALOG UEBERGEBEN
     4746       # PROVIDE THE PATH OF THE LOCAL MRUN-SCRIPT FOR THE SAME REASON
    51504747    echo  "LOCAL_MRUN_PATH=$PALM_BIN"                   >>  $jobfile
    51514748    echo  "export LOCAL_MRUN_PATH"                      >>  $jobfile
    51524749
    5153        # WORKAROUND FUER RIAM-NEC-JOBS WEGEN PROFILE-SCHWIERIGKEITEN
    5154     if [[ $localhost_realname = "gate"  ||  $localhost = lctit ]]
    5155     then
    5156        echo  "export PALM_BIN=$PALM_BIN"                >>  $jobfile
    5157     elif [[ $host = lcflow  ||  $localhost = lcflow ]]
     4750       # lcflow ALSO REQUIRES TO PROVIDE PATH FOR THE PALM-SCRIPTS
     4751    if [[ $host = lcflow  ||  $localhost = lcflow ]]
    51584752    then
    51594753       echo  "export PALM_BIN=$PALM_BIN" | sed -e 's:'$HOME':$HOME:'   >>  $jobfile
     
    51614755    fi
    51624756
    5163        # MRUN AUF ZIELRECHNER AUFRUFEN (queue is workaround for ibmkisti)
     4757       # CALL MRUN WITHIN THE JOB (SETTING QUEUE IS A WORKAROUND FOR ibmkisti)
     4758       # AS FINAL ACTION, REMOVE THE TEMPORARY DIRECTORY CREATED AT THE BEGINNING OF THE JOB
    51644759    echo  "set -x"                                        >>  $jobfile
    51654760    echo  "queue=$queue"                                  >>  $jobfile
     
    51724767
    51734768
    5174        # JOB PER SUBJOB STARTEN
     4769       # START THE JOB USING SUBJOB-COMMAND
    51754770    if [[ $silent = false ]]
    51764771    then
     
    51844779
    51854780
    5186  fi  # ENDE REMOTE-TEIL
    5187 
    5188 
    5189 
    5190      # ENDE DER PROZEDUR
     4781 fi  # END OF REMOTE-PART
  • palm/trunk/SCRIPTS/subjob

    r1280 r1289  
    2323# Current revisions:
    2424# ------------------
    25 #
     25# German comments translated to English
     26# fimm-, necriam-, scirocco-, ibmy-, and sgi-specific code removed
    2627#
    2728# Former revisions:
     
    9192
    9293
    93     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
     94    # VARIABLE-DECLARATIONS AND DEFAULT VALUES
    9495 delete_dayfile=false
    9596 email_notification=none
     
    115116
    116117
    117     # FEHLERBEHANDLUNG
    118     # BEI EXIT:
     118    # ERROR HANDLING
     119    # IN CASE OF EXIT:
    119120 trap 'if [[ $locat != normal ]]
    120121       then
     
    132133
    133134
    134     # BEI TERMINAL-BREAK:
     135    # IN CASE OF TERMINAL-BREAK:
    135136 trap '[[ -f $job_to_send ]]  &&  rm  $job_to_send
    136137       printf "\n\n+++ SUBJOB killed \n\n"
     
    141142
    142143
    143     # LOKALEN HOSTNAMEN FESTSTELLEN
     144    # DETERMINE NAME OF LOCAL HOST
    144145 local_host=$(hostname)
    145146
    146147
    147148
    148     # HOSTSPEZIFISCHE VARIABLEN VEREINBAREN BZW. PRUEFEN, OB LOKALER HOST
    149     # UEBERHAUPT ZULAESSIG IST
    150     # Note: One of the entries for "lck" or "lckordi" always has to be
    151     # comment out, because the hostname (node*) is same for both machines
     149    # SET HOST-SPECIFIC VARIABLES VEREINBAREN (CHECK, IF LOCAL HOST
     150    # IS ADMITTED AT ALL)
     151    # NOTE: ONE OF THE ENTRIES FOR "lck" OR "lckordi" ALWAYS HAS TO BE
     152    # COMMENT OUT, BECAUSE THE HOSTNAME (node*) IS SAME FOR BOTH MACHINES
    152153 case  $local_host  in
    153154     (ambiel-lx)             local_addres=134.106.74.48;  local_host=lcfor;;
     
    156157     (autan)                 local_addres=130.75.105.57;  local_host=lcmuk;;
    157158     (bora)                  local_addres=130.75.105.103; local_host=lcmuk;;
    158      (bd1)                   local_addres=130.73.232.64;  local_host=lcsgib;;
    159      (bd2)                   local_addres=130.73.232.65;  local_host=lcsgib;;
    160      (bd3)                   local_addres=130.73.232.66;  local_host=lcsgib;;
    161      (bd4)                   local_addres=130.73.232.67;  local_host=lcsgib;;
    162      (b01*|bicegate1)        local_addres=130.73.232.102; local_host=lcsgib;;
    163159     (b04*)                  local_addres=133.5.4.33;     local_host=lckyuh;;
    164      (bicegate2)             local_addres=130.73.232.103; local_host=lcsgib;;
    165160     (blizzard1)             local_addres=136.172.40.15;  local_host=ibmh;;
    166161     (blogin*|bxc*)          local_addres=130.73.233.1;   local_host=lccrayb;;
     
    171166     (climate*)              local_addres=165.132.26.68;  local_host=lcyon;;
    172167     (clogin*)               local_addres=86.50.166.21;   local_host=lccrayf;;
    173      (compute-*.local)       local_addres=172.20.4.2;     local_host=lcfimm;;
    174168     (cs*)                   local_addres=136.172.44.131; local_host=nech;;
    175169     (elephanta)             local_addres=130.75.105.6;   local_host=lcmuk;;
    176      (fimm.bccs.uib.no)      local_addres=172.20.4.2;     local_host=lcfimm;;
    177170     (flow01)                local_addres=10.141.255.71;  local_host=lcflow;;
    178171     (flow02)                local_addres=10.141.255.72;  local_host=lcflow;;
     
    181174     (gaia*)                 local_addres=150.183.146.24; local_host=ibmkisti;;
    182175     (gallego)               local_addres=130.75.105.10;  local_host=lcmuk;;
    183      (gfdl5)                 local_addres=165.132.26.58;  local_host=ibmy;;
    184176     (gregale)               local_addres=130.75.105.109; local_host=lcmuk;;
    185177     (hababai)               local_addres=130.75.105.108; local_host=lcmuk;;
    186178     (hayaka*)               local_addres=133.5.4.33;     local_host=lckyuh;;
    187179     (hexagon.bccs.uib.no)   local_addres=129.177.20.113; local_host=lcxe6;;
    188      (hd1)                   local_addres=130.75.4.104;   local_host=lcsgih;;
    189      (hd2)                   local_addres=130.75.4.105;   local_host=lcsgih;;
    190      (hd3)                   local_addres=130.75.4.106;   local_host=lcsgih;;
    191      (hd4)                   local_addres=130.75.4.107;   local_host=lcsgih;;
    192      (hicegate0)             local_addres=130.75.4.101;   local_host=lcsgih;;
    193      (h01*|hicegate1)        local_addres=130.75.4.102;   local_host=lcsgih;;
    194      (hicegate2)             local_addres=130.75.4.103;   local_host=lcsgih;;
    195180     (hx*)                   local_addres=133.3.51.11;    local_host=lckyoto;;
    196181     (inferno)               local_addres=130.75.105.5;   local_host=lcmuk;;
     
    212197     (quanero)               local_addres=130.75.105.107; local_host=lcmuk;;
    213198     (rte*)                  local_addres=133.5.185.60;   local_host=lcrte;;
    214      (r1*)                   local_addres=130.75.4.102;   local_host=lcsgih;;
    215      (r2*)                   local_addres=130.73.232.102; local_host=lcsgib;;
    216      (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
    217199     (shiokaze-lx)           local_addres=134.106.74.123; local_host=lcfor;;
    218200     (sisu-login*)           local_addres=86.50.166.21;   local_host=lccrayf;;
    219201     (solano)                local_addres=130.75.105.110; local_host=lcmuk;;
    220202     (sugoka*)               local_addres=172.31.120.1;   local_host=lckyut;;
    221      (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
    222      (sx-*)                  local_addres=172.16.1.131;   local_host=necriam;;
    223203     (t2a*)                  local_addres=10.1.6.165;     local_host=lctit;;
    224204     (urban*)                local_addres=147.46.30.151   local_host=lcsb;;
     
    233213
    234214
    235     # REMOTE HOST DEFAULTMAESSIG = LOCAL HOST SETZEN
     215    # BY DEFAULT, THE REMOTE HOST IS THE LOCAL HOST
    236216 remote_host=$local_host
    237217
     
    239219
    240220
    241     # PROZEDUROPTIONEN EINLESEN
     221    # READ THE SHELLSCRIPT-OPTIONS
    242222 while  getopts  :c:dDe:g:h:m:n:N:O:P:q:t:T:u:vX:  option
    243223 do
     
    266246
    267247
    268     # JOBDATEINAMEN ALS NAECHSTES ARGUMENT HOLEN
     248    # GET THE NAME OF THE JOBFILE AS NEXT ARGUMENT
    269249 (( to_shift = $OPTIND - 1 ))
    270250 shift $to_shift; file_to_send=$1
    271251
    272252
    273     # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN
     253    # OUTPUT OF SHORT DESCRIPTION OF SCRIPT-OPTIONS
    274254 if [ "$1" = "?" ]
    275255 then
     
    282262    printf "\n        -D    only the job-file will be created   ---"
    283263    printf "\n        -h    execution host, available hosts:    $remote_host"
    284     printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, ibmy, lc...,"
    285     printf "\n              lckiaps, lctit, nech, necriam, unics"
     264    printf "\n              ibm, ibmh, ibmkisti, ibmku, ibms, lc...,"
     265    printf "\n              lckiaps, lctit, nech"
    286266    printf "\n        -m    memory demand per process in MByte  ---"
    287267    printf "\n        -n    jobname                             <jobdatei>"
     
    303283
    304284
    305     # PRUEFEN, OB JOBDATEI ANGEGEBEN WURDE UND OB SIE AUCH EXISTIERT
     285    # CHECK, IF JOB-FILE HAS BEEN GIVEN AS ARGUMENT AND IF THE FILE ITSELF EXISTS
    306286 if [[ "$file_to_send" = "" ]]
    307287 then
     
    322302
    323303
    324     # FALLS KEIN JOBNAME ANGEGEBEN WURDE, WIRD JOBNAME = JOBDATEINAME
    325     # GESETZT. VORAUSSETZUNG: JOBDATEINAME BEINHALTET KEINE PFADE
     304    # IF NO JOBNAME HAS BEEN GIVEN, JOBNAME IS SET TO THE NAME OF THE JOB-FILE,
     305    # PROVIDED THAT THE JOB-FILE NAME DOES NOT CONTAIN ANY PATH
    326306 if [[ $job_name = none ]]
    327307 then
     
    339319
    340320
    341     # HOSTSPEZIFISCHE GROESSEN VEREINBAREN BZW. ABBRUCH BEI UNZULAESSIGEM HOST
    342     # ODER WENN HOST NICHT ANGEGEBEN WURDE
     321    # SET HOST-SPECIFIC QUANTITIES, OR TERMINATE IN CASE OF UNKNOWN HOST,
     322    # OR IF NO HOST HAS BEEN GIVEN
    343323 if [[ $remote_host = none ]]
    344324 then
     
    352332        (ibmku)   queue=s4; remote_addres=133.5.4.129; submcom=/usr/local/bin/llsubmit;;
    353333        (ibms)    queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    354         (ibmy)    queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
    355334        (lccrayb) queue=testq; remote_addres=130.73.233.1; submcom=/opt/moab/7.2.6/bin/msub;;
    356335        (lccrayh) queue=mpp1testq; remote_addres=130.75.4.1; submcom=/opt/moab/7.2.6/bin/msub;;
    357336        (lccrayf) queue=small; remote_addres=86.50.166.21; submcom=/opt/slurm/default/bin/sbatch;;
    358         (lcfimm)  remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
    359337        (lcflow)  remote_addres=10.140.1.71; submcom=/cm/shared/apps/sge/6.2u5p2/bin/lx26-amd64/qsub;;
    360338        (lckyoto) remote_addres=133.3.51.11; submcom=/thin/local/bin/qsub;;
    361         (lcsgib)  queue=smallq; remote_addres=130.73.232.104; submcom=/opt/moab/bin/msub;;
    362         (lcsgih)  queue=smallq; remote_addres=130.75.4.101; submcom=/opt/moab/bin/msub;;
    363339        (lck)     remote_addres=165.132.26.61; submcom=/usr/torque/bin/qsub;;
    364340        (lckiaps) remote_addres=118.128.66.223; submcom=/cm/shared/apps/pbspro/11.0.2.110766/bin/qsub;;
     
    372348        (lcyon)   remote_addres=165.132.26.68; submcom=/usr/torque/bin/qsub;;
    373349        (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";;
    374         (necriam) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=172.16.1.131; submcom="/usr/bin/nqsII/qsub";;
    375         (vpp)     qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;;
    376         (unics)   qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;;
    377350        (*)       printf "\n  +++ hostname \"$remote_host\" not allowed";
    378351                  locat=parameter; exit;;
     
    381354
    382355
    383     # EVTL. PRUEFEN, OB ANGEGEBENE QUEUE ZULAESSIG IST
     356    # CHECK, IF A VALID QUEUE HAS BEEN GIVEN
    384357 if [[ $no_default_queue != none ]]
    385358 then
     
    407380                     (*)                                     error=true;;
    408381                 esac;;
    409         (ibmy)   case  $ndq  in
    410                      (parallel)                              error=false;;
    411                      (*)                                     error=true;;
    412                  esac;;
    413382        (lccrayb) case  $ndq  in
    414383                     (mpp1q|testq|specialm1q)                error=false;;
     
    443412                     (*)                                     error=true;;
    444413                 esac;;
    445         (lcsgib|lcsgih)   case  $ndq  in
    446                      (testq|serialq|smallq|mediumq|bigq|workq|dataq|permq|special1q)       error=false;;
    447                      (*)                                     error=true;;
    448                  esac;;
    449414        (lctit)  case  $ndq  in
    450415                     (G|L128|L256|L512H|S|S96|V)             error=false;;
     
    455420                     (*)    error=true;;
    456421                 esac;;
    457         (necriam) case  $ndq  in
    458                      (SP|SS|P6)  error=false;;
    459                      (*)    error=true;;
    460                  esac;;
    461422        (t3eh)   case  $ndq  in
    462423                     (para_t3e|em|k|l|lm|comp_t3e|c|p|ht)  error=false;;
     
    471432                     (*)    error=true;;
    472433                 esac;;
    473         (unics)  case  $ndq  in
    474                      (unics|ht)  error=false;;
    475                      (*)         error=true;;
    476                  esac;;
    477434    esac
    478435    if [[ $error = true ]]
     
    487444
    488445
    489     # PRUEFEN DER CPU-ZEIT, ZEIT NACH STUNDEN, MINUTEN UND SEKUNDEN
    490     # AUFTEILEN
     446    # CHECK THE CPU-TIME
     447    # SPLIT TIME INTO HOURS, MINUTES, AND SECONDS
    491448 done=false
    492449 while [[ $done = false ]]
     
    520477
    521478
    522     # PRUEFEN DER KERNSPEICHERANFORDERUNG
     479    # CHECK THE MEMORY DEMAND
    523480 done=false
    524481 while [[ $done = false ]]
     
    535492 done
    536493
    537  if [[ $remote_host = nech  ||  $remote_host = necriam ]]
     494 if [[ $remote_host = nech ]]
    538495 then
    539496    if (( tasks_per_node != 0 ))
     
    552509
    553510
    554     # SPEICHERBERECHNUNG BEI OPENMP-NUTZUNG
     511    # MEMORY DEMAND IN CASE OF OPENMP-USAGE ON IBM-SYSTEMS
    555512 if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
    556513 then
     
    559516
    560517
    561     # BERECHNUNG DER ANZAHL DER ZU VERWENDENDEN KNOTEN
     518    # CALCULATE NUMBER OF REQUIRED NODES
    562519 if (( tasks_per_node != 0 ))
    563520 then
     
    566523
    567524
    568     # Calculate number of processes per node
     525    # CALCULATE NUMBER OF PROCESSES PER NODE
    569526 (( processes_per_node = tasks_per_node * threads_per_task ))
    570527
    571528
    572     # Calculate number of MPI tasks
     529    # CALCULATE NUMBER OF MPI TASKS
    573530 (( mpi_tasks = numprocs / threads_per_task ))
    574531
    575532
    576     # Set port number option for calls of ssh/scp, subjob and batch_scp scripts
     533    # SET PORT NUMBER OPTION FOR CALLS OF ssh/scp, subjob AND batch_scp SCRIPTS
    577534 if [[ "$scp_port" != "" ]]
    578535 then
     
    582539
    583540
    584     # HEADER-AUSGABE
     541    # HEADER-OUTPUT
    585542 if [[ $verify = true ]]
    586543 then
     
    612569
    613570
    614        # KONTROLLABFRAGE, OB ALLES O.K.
     571       # QUERY CHECK
    615572    antwort="dummy"
    616573    while [[ $antwort != y  &&  $antwort != Y  &&  $antwort != n  &&  $antwort != N ]]
     
    627584
    628585
    629     # ZUFALLSKENNUNG GENERIEREN UND JOBNAMEN AUF ZIELRECHNER BESTIMMEN
    630  kennung=$RANDOM
    631  job_on_remhost=${job_name}_${kennung}_$local_host
    632  job_to_send=job_to_send_$kennung
     586    # GENERATE RANDOM IDENTIFIER, AND DETERMINE THE JOBNAME ON THE TARGET HOST
     587 identifier=$RANDOM
     588 job_on_remhost=${job_name}_${identifier}_$local_host
     589 job_to_send=job_to_send_$identifier
    633590 if [[ $delete_dayfile = false ]]
    634591 then
    635     remote_dayfile=${local_host}_${job_name}_result_$kennung
     592    remote_dayfile=${local_host}_${job_name}_result_$identifier
    636593    local_dayfile=${remote_host}_${job_name}
    637594 else
     
    641598
    642599
    643     # Generate the batch job scripts (qsub/msub/LoadLeveler)
     600    # GENERATE THE BATCH-JOB SCRIPTS (FOR QUEUEING-SYSTEMS qsub/msub/LoadLeveler)
    644601 if [[ $(echo $remote_host | cut -c1-3) = ibm  &&  $numprocs != 0 ]]
    645602 then
    646603
    647        # General LoadLeveler settings
     604       # GENERAL LOADLEVELER SETTINGS
    648605    execute_in_shell="#!/bin/ksh"
    649606    use_shell="# @ shell = /bin/ksh"
     
    700657    then
    701658       network_to_use="# @ network.mpi = csss,shared,us"
    702     elif [[ $remote_host = ibmy ]]
    703     then
    704        consumable_memory=""
    705        network_to_use=""
    706659    fi
    707660
     
    756709    else
    757710
    758        if [[ $remote_host != ibmy ]]
    759        then
    760 
    761           cat >> $job_to_send << %%END%%
     711       cat >> $job_to_send << %%END%%
    762712# @ blocking = unlimited
    763713# @ total_tasks = $numprocs
     
    767717%%END%%
    768718
    769        else
    770 
    771           cat >> $job_to_send << %%END%%
    772 # @ node = 1
    773 # @ total_tasks = $numprocs
    774 # @ queue
    775 
    776 %%END%%
    777 
    778        fi
    779 
    780     fi
    781 
    782        # workaround because of silly job filter on ibmkisti
     719    fi
     720
     721       # WORKAROUND BECAUSE OF SILLY JOB FILTER ON ibmkisti
    783722    if [[ $remote_host = ibmkisti  &&  $threads_per_task != 1 ]]
    784723    then
     
    863802$init_cmds
    864803$module_calls
    865 
    866 %%END%%
    867 
    868     fi
    869 
    870  elif [[ $remote_host = lcfimm ]]
    871  then
    872 
    873     if [[ $numprocs != 0 ]]
    874     then
    875        cat > $job_to_send << %%END%%
    876 #!/bin/ksh
    877 #PBS -N $job_name
    878 #PBS -A $project_account
    879 #PBS -l walltime=$timestring
    880 #PBS -l nodes=${nodes}:ppn=$processes_per_node
    881 #PBS -l pmem=${memory}mb
    882 #PBS -m abe
    883 #PBS -o $remote_dayfile
    884 #PBS -j oe
    885 mpd &
    886 
    887 %%END%%
    888 
    889     else
    890        cat > $job_to_send << %%END%%
    891 #!/bin/ksh
    892 #PBS -N $job_name
    893 #PBS -A $project_account
    894 #PBS -l walltime=$timestring
    895 #PBS -l ncpus=1
    896 #PBS -l pmem=${memory}mb
    897 #PBS -m abe
    898 #PBS -o $remote_dayfile
    899 #PBS -j oe
    900804
    901805%%END%%
     
    1036940    fi
    1037941
    1038  elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
    1039  then
    1040 
    1041     if [[ "$sgi_feature" != "" ]]
    1042     then
    1043        feature_directive="#PBS -l feature=$sgi_feature"
    1044     else
    1045        feature_directive=""
    1046     fi
    1047 
    1048     if [[ $queue = dataq || $queue = permq ]]
    1049     then
    1050        feature_directive="#PBS -l feature=data"
    1051     fi
    1052 
    1053     if [[ $queue = testq  || $queue = mediumq  ||  $queue = bigq  ||  $queue = workq  ||  $queue = dataq  ||  $queue = permq ||  $queue = serialq  ||  $queue = special1q ]]
    1054     then
    1055        queue_directive="#PBS -q $queue"
    1056     else
    1057        queue_directive=""
    1058     fi
    1059 
    1060     if [[ $email_notification = none ]]
    1061     then
    1062        email_directive=""
    1063     else
    1064        email_directive="#PBS -M $email_notification"
    1065     fi
    1066 
    1067     if [[ $numprocs != 0 ]]
    1068     then
    1069        cat > $job_to_send << %%END%%
    1070 #!/bin/bash
    1071 #PBS -N $job_name
    1072 #PBS -l walltime=$timestring
    1073 #PBS -l nodes=$nodes:ppn=${processes_per_node}
    1074 #PBS -l naccesspolicy=$node_usage
    1075 #PBS -o $remote_dayfile
    1076 #PBS -j oe
    1077 $feature_directive
    1078 $queue_directive
    1079 $email_directive
    1080 
    1081 eval \`/sw/swdist/bin/modulesinit\`
    1082 #. /usr/share/modules/init/bash
    1083 $init_cmds
    1084 $module_calls
    1085 
    1086 echo ld_library_path=\$LD_LIBRARY_PATH
    1087 
    1088 %%END%%
    1089 
    1090     else
    1091        cat > $job_to_send << %%END%%
    1092 #PBS -S /bin/bash
    1093 #PBS -N $job_name
    1094 #PBS -l walltime=$timestring
    1095 #PBS -l ncpus=1
    1096 #PBS -o $remote_dayfile
    1097 #PBS -j oe
    1098 $queue_directive
    1099 $email_directive
    1100 
    1101 eval \`/sw/swdist/bin/modulesinit\`
    1102 #. /usr/share/modules/init/bash
    1103 $init_cmds
    1104 $module_calls
    1105 
    1106 %%END%%
    1107 
    1108     fi
    1109 
    1110942 elif [[ $remote_host = lcxe6 ]]
    1111943 then
     
    12901122    fi
    12911123
    1292  elif [[ $remote_host = necriam ]]
    1293  then
    1294 
    1295     if (( nodes > 1 ))
    1296     then
    1297        cat > $job_to_send << %%END%%
    1298 #!/bin/ksh
    1299 #PBS -b $nodes
    1300 #PBS -o $remote_dayfile
    1301 #PBS -N $job_name
    1302 #PBS -j o
    1303 #PBS -v MPIPROGINV=YES
    1304 
    1305 %%END%%
    1306 
    1307     elif [[ $numprocs != 0 ]]
    1308     then
    1309        cat > $job_to_send << %%END%%
    1310 #!/bin/ksh
    1311 #PBS -q ${queue}
    1312 #PBS -o $remote_dayfile
    1313 #PBS -N $job_name
    1314 #PBS -j o
    1315 #PBS -v MPIPROGINV=YES
    1316 
    1317 %%END%%
    1318 
    1319     else
    1320        cat > $job_to_send << %%END%%
    1321 #!/bin/ksh
    1322 #PBS -o $remote_dayfile
    1323 #PBS -j o
    1324 
    1325 %%END%%
    1326 
    1327     fi
    1328 
    13291124 elif [[ $remote_host = lctit ]]
    13301125 then
     
    13361131%%END%%
    13371132
    1338        # OPTIONEN FUER SUBMIT-KOMMANDO ZUSAMMENSTELLEN
     1133       # SET OPTIONS FOR SUBMIT-COMMAND
    13391134    if [[ $tasks_per_node != $processes_per_node ]]
    13401135    then
     
    13581153
    13591154
    1360     # BEI RECHNUNG AUF REMOTE-MASCHINEN RUECKTRANSFER DES DAYFILES PER TRAP
    1361     # BEI EXIT VERANLASSEN
    1362     # VEKTORRECHNER MUSS EIGENEN JOB STARTEN, DA DORT NOHUP NICHT FUNKTIONIERT
    1363     # AUF IBM IN SEOUL IST RUECKTRANSFER ZUR ZEIT GENERELL NICHT MOEGLICH
     1155    # IN CASE OF JOBS EXECUTING ON REMOTE-HOSTS, THE TRANSFER OF THE DAYFILES
     1156    # TO THE LOCAL HOSTS WILL BE INITIATED BY TRAP ON EXIT
     1157    # NO TRANSFER POSSIBLE ON IBM IN SEOUL
    13641158 if [[ $delete_dayfile = false  &&  $remote_host != $local_host ]]
    13651159 then
     
    13671161    echo "trap '"                               >>  $job_to_send
    13681162    echo "set +vx"                              >>  $job_to_send
    1369     if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-5) = lcsgi  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
     1163    if [[ $(echo $remote_host | cut -c1-3) = ibm  ||  $remote_host = lccrayb  ||  $remote_host = lccrayh  ||  $(echo $remote_host | cut -c1-3) = nec  ||  $remote_host = lcflow  ||  $remote_host = lckiaps  ||  $remote_host = lckyu* ]]
    13701164    then
    13711165       if [[ $remote_host = ibmh ]]
     
    13811175       then
    13821176          return_queue=p_normal
    1383        elif [[ $remote_host = ibmy ]]
    1384        then
    1385           return_queue=serial
    1386        elif [[ $remote_host = lcsgih  ||  $remote_host = lcsgib ]]
    1387        then
    1388           return_queue=serialq
    1389        elif [[ $remote_host = necriam ]]
    1390        then
    1391           return_queue=SP
    13921177       elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
    13931178       then
     
    14111196          if [[ $remote_host = ibmku ]]
    14121197          then
    1413              echo "echo \"#!/usr/bin/ksh\" >> scpjob.$kennung"            >>  $job_to_send
    1414              echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$kennung"  >>  $job_to_send
     1198             echo "echo \"#!/usr/bin/ksh\" >> scpjob.$identifier"            >>  $job_to_send
     1199             echo "echo \"# @ shell = /usr/bin/ksh\" >> scpjob.$identifier"  >>  $job_to_send
    14151200          else
    1416              echo "echo \"#!/bin/ksh\" >> scpjob.$kennung"                >>  $job_to_send
     1201             echo "echo \"#!/bin/ksh\" >> scpjob.$identifier"                >>  $job_to_send
    14171202          fi
    1418           echo "echo \"# @ job_type = serial\" >> scpjob.$kennung"    >>  $job_to_send
    1419           echo "echo \"# @ job_name = transfer\" >> scpjob.$kennung"  >>  $job_to_send
    1420           echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$kennung"  >>  $job_to_send
    1421           echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$kennung "  >>  $job_to_send
    1422           echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
    1423           echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$kennung"  >>  $job_to_send
     1203          echo "echo \"# @ job_type = serial\" >> scpjob.$identifier"    >>  $job_to_send
     1204          echo "echo \"# @ job_name = transfer\" >> scpjob.$identifier"  >>  $job_to_send
     1205          echo "echo \"# @ resources = ConsumableCpus(1) ConsumableMemory(1 gb)\" >> scpjob.$identifier"  >>  $job_to_send
     1206          echo "echo \"# @ wall_clock_limit = 00:10:00,00:10:00\" >> scpjob.$identifier "  >>  $job_to_send
     1207          echo "echo \"# @ output = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier"  >>  $job_to_send
     1208          echo "echo \"# @ error = job_queue/last_job_transfer_protocol\" >> scpjob.$identifier"  >>  $job_to_send
    14241209          if [[ $host != "ibmh" ]]
    14251210          then
    1426              echo "echo \"# @ class = $return_queue\" >> scpjob.$kennung"  >>  $job_to_send
     1211             echo "echo \"# @ class = $return_queue\" >> scpjob.$identifier"  >>  $job_to_send
    14271212          fi
    1428           echo "echo \"# @ image_size = 10\" >> scpjob.$kennung"      >>  $job_to_send
    1429           echo "echo \"# @ notification = never\" >> scpjob.$kennung" >>  $job_to_send
    1430 
    1431           echo "echo \"# @ queue\" >> scpjob.$kennung"                >>  $job_to_send
    1432           echo "echo \" \" >> scpjob.$kennung"                        >>  $job_to_send
    1433 
    1434           echo "echo \"set -x\" >> scpjob.$kennung"                   >>  $job_to_send
    1435           echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$kennung"  >>  $job_to_send
     1213          echo "echo \"# @ image_size = 10\" >> scpjob.$identifier"      >>  $job_to_send
     1214          echo "echo \"# @ notification = never\" >> scpjob.$identifier" >>  $job_to_send
     1215
     1216          echo "echo \"# @ queue\" >> scpjob.$identifier"                >>  $job_to_send
     1217          echo "echo \" \" >> scpjob.$identifier"                        >>  $job_to_send
     1218
     1219          echo "echo \"set -x\" >> scpjob.$identifier"                   >>  $job_to_send
     1220          echo "echo \"batch_scp  $PORTOPT  -d  -w 10  -u $local_user  $local_addres  ${job_catalog}/$remote_dayfile  \\\"$job_catalog\\\"  $local_dayfile\" >> scpjob.$identifier"  >>  $job_to_send
    14361221          if [[ $remote_host = ibmku ]]
    14371222          then
    1438              echo "echo \"rm  scpjob.$kennung\" >> scpjob.$kennung"   >>  $job_to_send
     1223             echo "echo \"rm  scpjob.$identifier\" >> scpjob.$identifier"   >>  $job_to_send
    14391224          fi
    1440           echo "echo \"exit\" >> scpjob.$kennung"                     >>  $job_to_send
     1225          echo "echo \"exit\" >> scpjob.$identifier"                     >>  $job_to_send
    14411226
    14421227       elif [[ $remote_host = nech ]]
    14431228       then
    14441229          echo "cd /pf/b/${remote_user}/job_queue" >>  $job_to_send
    1445           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1230          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    14461231          echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100"  >>  $job_to_send
    14471232          echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
     
    14541239          echo "%%END%%"                           >>  $job_to_send
    14551240
    1456        elif [[ $remote_host = necriam ]]
    1457        then
    1458           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
    1459           echo "#PBS -q $return_queue"             >>  $job_to_send
    1460           echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
    1461           echo "#PBS -j o"                         >>  $job_to_send
    1462           echo " "                                 >>  $job_to_send
    1463           echo "set -x"                            >>  $job_to_send
    1464           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  $remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    1465           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    1466           echo "%%END%%"                           >>  $job_to_send
    1467 
    14681241       elif [[ $remote_host = lckyuh ]]
    14691242       then
    1470           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1243          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    14711244          echo "#!/bin/bash"                       >>  $job_to_send
    14721245          echo "#PJM -L \"node=1\""                >>  $job_to_send
     
    14851258       elif [[ $remote_host = lckyut ]]
    14861259       then
    1487           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1260          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    14881261          echo "#!/bin/bash"                       >>  $job_to_send
    14891262          echo "#PJM -L \"vnode=1\""               >>  $job_to_send
     
    15001273          echo "%%END%%"                           >>  $job_to_send
    15011274
    1502        elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
    1503        then
    1504           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
    1505           echo "#!/bin/bash"                             >>  $job_to_send
    1506           echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
    1507           echo "#PBS -l walltime=00:30:00"               >>  $job_to_send
    1508           echo "#PBS -l nodes=1:ppn=1"                   >>  $job_to_send
    1509           echo "#PBS -l feature=data"                    >>  $job_to_send
    1510           echo "#PBS -o \$HOME/job_queue/last_job_transfer_protocol"      >>  $job_to_send
    1511           echo "#PBS -j oe"                        >>  $job_to_send
    1512           echo " "                                 >>  $job_to_send
    1513           echo ". /usr/share/modules/init/bash"    >>  $job_to_send
    1514           echo "set -x"                            >>  $job_to_send
    1515           echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    1516           echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    1517           echo "%%END%%"                           >>  $job_to_send
    1518 
    15191275       elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
    15201276       then
    1521           echo "cat > scpjob.$kennung << %%END%%"        >>  $job_to_send
     1277          echo "cat > scpjob.$identifier << %%END%%"        >>  $job_to_send
    15221278          echo "#!/bin/bash"                             >>  $job_to_send
    15231279          echo "#PBS -N job_protocol_transfer"           >>  $job_to_send
     
    15341290       elif [[ $remote_host = lcflow ]]
    15351291       then
    1536           echo "cat > scpjob.${kennung}.tmp << %%END%%"                  >>  $job_to_send
     1292          echo "cat > scpjob.${identifier}.tmp << %%END%%"                  >>  $job_to_send
    15371293          echo "#!/bin/bash"                                             >>  $job_to_send
    15381294          echo "SGEPREFIX -S /bin/bash"                                  >>  $job_to_send
     
    15431299          echo "SGEPREFIX -l excl_flow=false"                            >>  $job_to_send
    15441300          echo "SGEPREFIX -j y"                                          >>  $job_to_send
    1545           echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$kennung"  >>  $job_to_send
     1301          echo "SGEPREFIX -o ${local_host}_${job_name}_scpjob_$identifier"  >>  $job_to_send
    15461302          echo " "                                                       >>  $job_to_send
    15471303          echo "set -x"                                                  >>  $job_to_send
     
    15511307          echo "batch_scp  $PORTOPT  -d  -w 10  -u $local_user $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
    15521308          echo "[[ \"\$for_subjob_to_do\" != \"\" ]]  &&  eval \$for_subjob_to_do"  >>  $job_to_send
    1553           echo "rm -f scpjob.${kennung}"                                 >>  $job_to_send         
     1309          echo "rm -f scpjob.${identifier}"                                 >>  $job_to_send         
    15541310          echo "%%END%%"                                                 >>  $job_to_send
    1555           echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${kennung}.tmp > scpjob.${kennung}" >>  $job_to_send         
    1556           echo "rm -f scpjob.${kennung}.tmp"                             >>  $job_to_send         
     1311          echo "sed -e 's/SGEPREFIX/#$/g' scpjob.${identifier}.tmp > scpjob.${identifier}" >>  $job_to_send         
     1312          echo "rm -f scpjob.${identifier}.tmp"                             >>  $job_to_send         
    15571313
    15581314       else
    15591315
    1560           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
     1316          echo "cat > scpjob.$identifier << %%END%%"  >>  $job_to_send
    15611317          echo "# @\\\$-q $return_queue"           >>  $job_to_send
    15621318          echo "# @\\\$-l${qsubtime} 10"           >>  $job_to_send
     
    15671323          fi
    15681324          echo '# @\$-lF 10mb'                     >>  $job_to_send
    1569 #          echo '# @\$-o /dev/null'                 >>  $job_to_send
    15701325          echo '# @\$-o job_queue/last_job_transfer_protocol'    >>  $job_to_send
    15711326          echo '# @\\\$-eo'                          >>  $job_to_send
     
    15841339       if [[ $(echo $remote_host | cut -c1-3) = ibm ]]
    15851340       then
    1586           echo "llsubmit  scpjob.$kennung"      >>  $job_to_send
     1341          echo "llsubmit  scpjob.$identifier"      >>  $job_to_send
    15871342       elif [[ $remote_host = lccrayb || $remote_host = lccrayh ]]
    15881343       then
    1589           echo "msub -q $return_queue  scpjob.$kennung"               >>  $job_to_send
    1590        elif [[ $(echo $remote_host | cut -c1-5) = lcsgi ]]
    1591        then
    1592           echo "rm -rf \$HOME/job_queue/last_job_transfer_protocol"  >>  $job_to_send
    1593           echo "chmod  u+x  scpjob.$kennung"                         >>  $job_to_send
    1594           echo "msub  scpjob.$kennung"                               >>  $job_to_send
     1344          echo "msub -q $return_queue  scpjob.$identifier"               >>  $job_to_send
    15951345       elif [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5 ]]
    15961346       then
    1597           echo "qsub -J n  scpjob.$kennung"     >>  $job_to_send
     1347          echo "qsub -J n  scpjob.$identifier"     >>  $job_to_send
    15981348       elif [[ $remote_host = t3es ]]
    15991349       then
    1600           echo "qsub -J n  -s /bin/ksh  scpjob.$kennung"     >>  $job_to_send
     1350          echo "qsub -J n  -s /bin/ksh  scpjob.$identifier"     >>  $job_to_send
    16011351       elif [[ $remote_host = lckiaps ]]
    16021352       then
    1603           echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
    1604           echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$kennung\" "  >>  $job_to_send
    1605           echo "rm  ${job_catalog}/scpjob.$kennung"          >>  $job_to_send
     1353          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
     1354          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"$submcom ${job_catalog}/scpjob.$identifier\" "  >>  $job_to_send
     1355          echo "rm  ${job_catalog}/scpjob.$identifier"          >>  $job_to_send
    16061356       elif [[ $remote_host = lckyu* ]]
    16071357       then
    1608           echo "scp $PORTOPT scpjob.$kennung  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
    1609           echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$kennung; rm scpjob.$kennung\" "  >>  $job_to_send
     1358          echo "scp $PORTOPT scpjob.$identifier  ${remote_username}@${remote_addres}:job_queue"           >>  $job_to_send
     1359          echo "ssh $SSH_PORTOPT ${remote_username}@${remote_addres}  \"cd job_queue; $submcom scpjob.$identifier; rm scpjob.$identifier\" "  >>  $job_to_send
    16101360       elif [[ $remote_host = lcflow ]]
    16111361       then
    1612           echo "mv  scpjob.$kennung  $job_catalog"           >>  $job_to_send
    1613           echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$kennung\" "  >>  $job_to_send
     1362          echo "mv  scpjob.$identifier  $job_catalog"           >>  $job_to_send
     1363          echo "/usr/bin/ssh ${remote_username}@${remote_addres}  \"$init_cmds $module_calls cd $job_catalog; $submcom scpjob.$identifier\" "  >>  $job_to_send
    16141364       else
    1615           echo "$submcom  scpjob.$kennung"      >>  $job_to_send
     1365          echo "$submcom  scpjob.$identifier"      >>  $job_to_send
    16161366       fi
    16171367       if [[ $remote_host != ibmku  &&  $remote_host != lckiaps ]]
    16181368       then
    1619           echo "rm  scpjob.$kennung"            >>  $job_to_send
     1369          echo "rm  scpjob.$identifier"            >>  $job_to_send
    16201370       fi
    16211371       if [[ $remote_host = nech ]]
     
    16251375    else
    16261376#       echo "ftpcopy  -d  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile"  >>  $job_to_send
     1377       # ??? funktioniert das ÃŒberhaupt noch ???
    16271378       echo "nohup  ftpcopy  -d  -w 15  $local_addres  ${job_catalog}/$remote_dayfile  \"$job_catalog\"  $local_dayfile  >  /dev/null  &"  >>  $job_to_send
    16281379    fi
     
    16341385
    16351386
    1636     # EIGENTLICHE JOB-DATEI AN QSUB-KOMMANDOS ANHAENGEN
     1387    # APPEND THE JOB-FILE (CREATE BY mrun) TO THE JOB-DIRECTIVES GENERATED ABOVE
    16371388 cat  $file_to_send  >>  $job_to_send
    16381389
     
    16431394 fi
    16441395
    1645     # remove job file
     1396    # REMOVE JOB-FILE
    16461397 if [[ $remote_host = lctit  ||  $remote_host = ibmku  ||  $remote_host = lcflow ]]
    16471398 then
     
    16511402
    16521403
    1653 
    1654     # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN
    1655  if [[ -z $remote_user ]]
    1656  then
    1657     if [[ $remote_host = t3eb  ||  $remote_host = t3eh  ||  $remote_host = t3ej2  ||  $remote_host = t3ej5  ||  $remote_host = t3es  ||  $remote_host = vpp ]]
    1658     then
    1659        grep  $remote_addres  ~/.netrc | read dum dum dum remote_user dum dum
    1660     fi
    1661  fi
    1662 
    1663 
    1664 
    1665     # JOB AUF ZIELRECHNER TRANSFERIEREN BZW. INS JOBVERZEICHNIS KOPIEREN
     1404    # TRANSFER JOB TO THE TARGET HOST (JOB-DIRECTORY)
    16661405 if [[ $no_submit = false ]]
    16671406 then
     
    16691408    then
    16701409       [[ $verify = true ]]  &&  printf "\n >>> transfering job to \"$remote_host\"..."
    1671        if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
     1410       if [[ $remote_host = ibms ]]    # ssh on ibms cannot handle "~/"
    16721411       then
    16731412          job_catalog_save=$job_catalog
     
    16801419       if [[ $remote_host = nech ]]
    16811420       then
    1682              # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
    1683              # TRANSFERIERT WERDEN
     1421             # FILES CAN ONLY BE TRANSFERED VIA DKRZ'S ARCHIVE-SERVER
    16841422          scp  $PORTOPT  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
    16851423       else
     
    17021440
    17031441
    1704        # NQS- BZW. LOADLEVELER-JOB STARTEN
     1442       # START NQS- / LOADLEVELER-JOB
    17051443    if [[ $remote_host != $local_host ]]
    17061444    then
    17071445       [[ $verify = true ]]  &&  printf "\n >>> submitting job using \"qsub\"...\n"
    17081446
    1709        if [[ $(echo $remote_host | cut -c1-5) = lcsgi  &&  $prio = true ]]
    1710        then
    1711           printf "\n >>> submit with HLRN qos-feature hiprio...\n"
    1712           ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom -l qos=hiprio $job_on_remhost; rm $job_on_remhost"
    1713        elif [[ $remote_host = ibmku ]]
     1447       if [[ $remote_host = ibmku ]]
    17141448       then
    17151449          ssh  $SSH_PORTOPT $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost"
     
    17241458    else
    17251459       cd  $job_catalog
    1726        if [[ $(echo $local_host | cut -c1-5) = lcsgi  ||  $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
     1460       if [[ $(echo $local_host | cut -c1-3) = ibm  ||  $(echo $local_host | cut -c1-6) = lccray ]]
    17271461       then
    17281462          eval  $submcom  $job_on_remhost
    1729        elif [[  $local_host = lcfimm  ||  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
     1463       elif [[  $local_host = lctit  ||  $localhost = lcxe6  ||  $localhost = lck  || $localhost = lckordi ||  $localhost = lcyon || $localhost = lcsb  ||  $localhost = lckyu* ]]
    17301464       then
    17311465          chmod  u+x  $job_on_remhost
     
    17431477       fi
    17441478
    1745           # Jobfile must not be deleted on lctit/ibmku!! This will be done
    1746           # only at the end of the job.
     1479          # JOBFILE MUST NOT BE DELETED ON lctit/ibmku/lcflow. THIS WILL BE DONE
     1480          # AT THE END OF THE JOB
    17471481       if [[ $local_host != lctit  &&  $local_host != ibmku  &&  $local_host != lcflow ]]
    17481482       then
     
    17551489
    17561490
    1757     # ABSCHLUSSARBEITEN
    1758 
     1491    # FINAL ACTIONS
    17591492 if [[ $no_submit = false ]]
    17601493 then
  • palm/trunk/SOURCE/palm.f90

    r1242 r1289  
    135135#endif
    136136
    137     version = 'PALM 3.9'
     137    version = 'PALM 3.10'
    138138
    139139#if defined( __parallel )
  • palm/trunk/UTIL/interpret_config.f90

    r1096 r1289  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! routine local_getenv removed
    2323!
    2424! Former revisions:
     
    551551
    552552 END PROGRAM interpret_config
    553 
    554 
    555 
    556  SUBROUTINE local_getenv( var, ivar, value, ivalue )
    557 
    558     CHARACTER (LEN=*) ::  var, value
    559     INTEGER           ::  ivalue, ivar
    560 
    561     CALL GETENV( var(1:ivar), value )
    562     ivalue = LEN_TRIM( value )
    563 
    564  END SUBROUTINE local_getenv   
Note: See TracChangeset for help on using the changeset viewer.