- Timestamp:
- Nov 21, 2012 7:07:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r1058 r1059 1 1 #!/bin/ksh 2 3 # mrun - script for running PALM jobs 2 4 3 5 #--------------------------------------------------------------------------------# … … 20 22 # Current revisions: 21 23 # ----------------- 22 # Intel inspector (inspxe) is given the number of PEs instead of the number of 23 # nodes 24 # 24 25 # 25 26 # Former revisions: … … 27 28 # $Id$ 28 29 # 30 # 1058 2012-11-21 07:00:35Z raasch 31 # Intel inspector (inspxe) is given the number of PEs instead of the number of 32 # nodes 33 # 29 34 # 1046 2012-11-09 14:38:45Z maronga 30 35 # code put under GPL (PALM 3.9) 31 36 # 32 # mrun - script for running PALM jobs 33 34 35 # Procedure for interactive/batch PALM runs (initial runs and automatic 36 # restart runs) 37 38 # Last changes: 39 # 03/03/94 - Siggi - Entwicklungsbeginn 40 # 21/03/94 - Siggi - Entwicklungsabschluss (Version 1.0) 41 # 09/12/94 - Siggi - allexport unterbunden; statt dessen werden jetzt ein- 42 # zelne Variable exportiert. Dies ist noetig, weil an- 43 # sonsten irgendein Speicher ueberlaeuft und von mrun 44 # aufgerufene Programme (z.B. stageout) mit Fehlern 45 # abbrechen (too many arguments) 46 # 20/06/95 - Siggi - noclobber muss explizit abgeschaltet, da jetzt 47 # defaultmaessig im RRZN-Profile eingeschaltet 48 # 10/06/97 - Siggi - Zusaetzliche Option -C bei cpp, damit // nicht 49 # wegfallen 50 # 25/04/00 - Siggi - Version 1.5 51 # remote_addres und remote_user in return_addres bzw. 52 # return_username umbenannt, return_username wird dem 53 # mrun-Aufruf im Job ueber Option -U mitgegeben. 54 # Neue Variable remote_username, die beim interaktiven 55 # mrun-Aufruf zwingend ueber die neue Option -u oder 56 # in der Konfigurationsdatei angegeben werden muss. 57 # 08/02/01 - Siggi - Alle mrun-Meldungen ins englische uebersetzt, 58 # Version 1.7 59 # 05/05/02 - Siggi - Uebersetzungen mittels make-Mechanismus moeglich 60 # 21/11/02 - Siggi - ENV-Variable XLFRTEOPTS wird vor Ausfuehrung auf 61 # IBM gesetzt, um Record-Laenge der NAMELIST-Dateien, 62 # zu bestimmen; Praeprozessoroptionen haben nun alle 63 # die Form -Dtext=text, weil auf IBM sonst text durch 64 # die leere Zeichenkette ersetzt wird 65 # 01/08/03 - Siggi - Test of implementing dvrp+1PE on ibm 66 # 07/01/04 - Siggi - additional preprocessor directive for ibm included 67 # (-D$OMP=OMP) in order to avoid problems with 68 # OMP_NUM_THREADS 69 # 04/01/05 - Siggi - archiving on hanni and berni is done in separate 70 # tar files, one for each node used 71 # 07/01/04 - Siggi - old code for t3e, vpp and hpcs eliminated 72 # 09/01/05 - Siggi - workaround for getting the IP address on gfdl3 73 # 17/01/05 - Siggi - job for data transfer to local machine now within 74 # job class c1 (HLRN) 75 # 27/01/05 - Siggi - IP address workaround for gfdl3 removed 76 # 28/01/05 - Siggi - tar-filenames on $PERM (HLRN) now include the 77 # base filename and cycle number 78 # 16/02/05 - Gerald - hababai validated 79 # 14/03/05 - Siggi - abort on NEC after first runtime error (F_ERRCNT) 80 # 29/03/05 - Marcus - berni*-en0 validated 81 # 21/04/05 - Siggi - transfer-job-protocol for avs-data is no more stored 82 # 24/04/05 - Siggi - netcdf support on lcmuk 83 # 25/04/05 - Siggi - netcdf support on gfld3 (decalpha) 84 # 11/05/05 - Siggi - files with non-numeric extensions (.xxx after cycle 85 # number) can now be used within interactive runs 86 # 12/05/05 - Siggi - netcdf support on ibm 87 # 13/05/05 - Siggi - error in tar-filenames on $PERM (HLRN) removed 88 # 18/05/05 - Siggi - netcdf support on nec 89 # 24/05/05 - Siggi - netcdf support on ibms 90 # 14/06/05 - Siggi - sleep interval after submit of restart job increased 91 # to 30 seconds 92 # 28/06/05 - Siggi - bora adjusted to new intel compiler (LD_LIBRARY_ 93 # PATH is temporarily set) 94 # 07/09/05 - Siggi - setting of MP_EAGER_LIMIT switched off because it 95 # caused warnings in the job protocol 96 # 20/10/05 - Siggi - update of netcdf-version on decalpha (gfdl3) 97 # 25/10/05 - Siggi - error in listing files for getting the cycle number 98 # removed 99 # 26/10/05 - Siggi - new paths for dvrp-library, transfer of catalogs 100 # realized by file attribute trpe 101 # 28/10/05 - Siggi - if existing, the file extension is output in case 102 # of missing input file - no job abort in case of 103 # missing input files with file extensions 104 # (preliminary solution) 105 # 31/10/05 - Siggi - data transfer from nech now within seperate job 106 # 04/11/05 - Siggi - netcdf 3.6.0-p1 on ibmh/ibmb 107 # 07/12/05 - Siggi - gallego and elephanta admitted 108 # 30/12/05 - Siggi - gfdl5 (ibmy) admitted 109 # 10/01/06 - Siggi - cpp directive for NetCDF 64bit support 110 # 20/01/06 - Siggi - cpp directive for ibmy 111 # 09/02/06 - Siggi - ibmy admitted for batch mode 112 # 13/04/06 - Siggi - ostria admitted 113 # 18/04/06 - Siggi - usage of OpenMP implemented (additional option -O) 114 # 10/05/06 - Siggi - environment variable XLSMPOPTS set on IBM for 115 # optimization of OpenMP runs (option stacksize is 116 # necessary for large gridpoint numbers because 117 # otherwise a segmentation fault occurs) 118 # 23/05/05 - Siggi - lctit (SUN Fire X4600) admitted 119 # 21/08/06 - Siggi - standard mrun path on scirocco is as on bora 120 # 23/08/06 - Siggi - netcdf support for scirocco (notebook) 121 # 20/09/06 - Marcus - add DVRP library on nech 122 # 24/10/06 - Siggi - Environment variables for PALM steering are written 123 # on local NAMELIST file ENVPAR 124 # 24/11/06 - Siggi - levanto admitted, maestro switched to ifc 9.1 125 # 28/11/06 - Siggi - call to interpret_config.x_levanto because of SuSe 10 126 # 06/02/07 - Siggi - add DVRP library on lcmuk 127 # 07/02/07 - Siggi - revision of source code handling, source code is 128 # now expected in directory given by source_path and 129 # not in the current working directory, source code 130 # files provided in add_source_path are allways 131 # compiled, source code to be compiled is allways 132 # sampled in SOURCES_FOR_RUN_$fname which is a 133 # subdirectory of the current working directory, 134 # -s TEST changed to -s WRITE_PERMIT or -s WP, 135 # adapted for RIAM (neck) 136 # bugfix for cycle number of output file (extout) 137 # all hpmuk-related code removed 138 # 14/02/07 - Siggi - dvrp support for neck added 139 # 28/02/07 - Siggi - empty lines in configuration file are accepted 140 # mrun_path replaced by PALM_BIN, 141 # all machines are calling interpret_config.x 142 # 14/03/07 - Siggi - fimm admitted, revision number added to terminal 143 # output 144 # 16/03/07 - Siggi - adjustments for lctit 145 # 29/03/07 - Siggi - global revision transfered to batch job by new 146 # option -G 147 # 30/03/07 - Siggi - compilation "by hand" removed, cpp-directives/options 148 # + netcdf/dvrp-options are read from configuration 149 # file, host identifier (local_host) is read from 150 # config file, code related to ftp filetransfer 151 # removed (incl. option -f) 152 # 19/06/07 - Siggi - time limit for cdata jobs increased 153 # 25/07/07 - Siggi - two sets of executables can be started on lcmuk, 154 # if new option -Y (coupling) is given, 155 # output of executables to aout_output removed, 156 # messages are immediately written to stdout instead 157 # 03/08/07 - Marcus - add XOPT="-X $numprocs" for lcfimm 158 # 09/08/07 - Marcus - workaround on lcfimm to propagate environment 159 # variables out to the nodes in coupled mode -disabled- 160 # 13/08/07 - Marcus - start local restart jobs per ssh on lcfimm 161 # 28/08/07 - Marcus - completely remove workaround on lcfimm to propagate 162 # environment variables out to the nodes in coupled mode 163 # 15/10/07 - Siggi - Preliminary adjustments for lctit, based on Jin's 164 # suggestions 165 # 19/10/07 - Marcus - further adjustments for lctit: add new optional 166 # argument -g group_number, admit all sla* node_usage 167 # queues 168 # 30/10/07 - Marcus - further adjustments for queues on lctit 169 # 14/02/08 - Bjoern - link of restart files with long file name possible 170 # 28/02/08 - Marcus - If environment variable link_local_output is set to 171 # true, mrun tries "ln -f" on local output and resorts 172 # to "cp" or "cp -r" on error 173 # 15/04/08 - Siggi - argument -c introduced to most of the subjob calls, 174 # which allows the user to choose his own job catalog 175 # by setting job_catalog in the configuration file 176 # (default is ~/job_queue), 177 # workaround for mpiexec with -env option, 178 # adjustments for lcxt4 (Bergen Center for Computational 179 # Science) 180 # 22/05/08 - Marcus - If environment variable link_local_input is set to 181 # true, mrun tries "ln -f" on local input and resorts 182 # to "cp" or "cp -r" on error 183 # 27/05/08 - Siggi - PATH is set to PALM_BIN everywhere (missing so far) 184 # 14/07/08 - Siggi - adjustments for lcsgih 185 # 08/08/08 - Marcus - typo removed in lcxt4 branch 186 # 17/09/08 - Siggi - restart mechanism adjusted for lcsgi 187 # 02/10/08 - BjornM - argument "-Y" modified, adjustments for coupled runs 188 # 21/10/08 - Siggi - bugfix for the case that -K has more than one 189 # argument 190 # 08/11/08 - Siggi - bugfix for depository path settings in configuration 191 # file 192 # 11/11/08 - Siggi - rules for using user code files changed: user 193 # code splitted into one file per subroutine, 194 # user can provide his/her own makefile, only 195 # default source-code filenames are allowed 196 # 14/11/08 - Siggi - cond1 and cond2 are part of the depository name 197 # 08/01/09 - Siggi - mpi module on sgi machines to be used can be set 198 # with environment variable mpilib 199 # 13/01/09 - Siggi - totalview on hice/bice can be used in debug mode 200 # using environment variable totalview 201 # 25/02/09 - Siggi - cputime-option (-t) is allowed to be omitted for 202 # interactive runs 203 # 05/03/09 - Siggi - adjustments for new NEC-SX9 at RIAM (necriam) 204 # 16/03/09 - Siggi - dvrp_lib, dvrp_inc replaced by dvr_lib, dvr_inc, 205 # dvr streaming server is automatically started using 206 # new variable dvr_server and a configuration file 207 # .dvrserver.config, 208 # processing of dvr output files using new script 209 # process_dvr_output implemented, in order to make 210 # dvr application more user friendly 211 # 20/03/09 - Marcus - update of n1ge command for lctit 212 # 16/04/09 - Siggi - new option -y for precursor (uncoupled) ocean runs 213 # to be followed by a coupled atmosphere-ocean run 214 # 21/04/09 - Siggi - adjustments for new IBM at DKRZ, which is now ibmh 215 # 24/06/09 - BjornM - adjustments for coupled/precursor runs on ibmy 216 # 08/07/09 - Siggi - default value for email_notification is none, 217 # option -e added to subjob 218 # 19/08/09 - Marcus - MPI debug option 219 # 21/08/09 - Marcus - totalview on hice/bice also available for mvapich2 220 # 25/08/09 - BjornM - adpated for lck 221 # 26/08/09 - Siggi - additional environment variables for mpt on ice2 222 # 26/08/09 - Marcus - adjustment for ice2 on lcsgib 223 # 29/09/09 - Siggi - default value for archiving is false, option "-A" 224 # switches on archiving, archiving on SGI-ICE enabled 225 # 16/10/09 - Carolin- adjustments for archiving on SGI-ICE of binary files; 226 # adjustment for special1q 227 # 18/12/09 - Carolin- modification of archiving (permq) 228 # 01/02/10 - Siggi - adapted for lcxt5m and lckyoto (Fujitsu HX600) 229 # 03/02/10 - Siggi - make options (mopts) to be set by configuration file 230 # implemented 231 # 08/02/10 - Siggi - loading of modules now controlled via configuration 232 # file (modules) 233 # 02/03/10 - Siggi - for each block in the configuration file, separate 234 # utility programs are used, combine_plot_fields is 235 # directly called and must not be given by an output 236 # command in the configuration file any more 237 # 15/06/10 - Rieke - ssh from compute nodes to login nodes on hosts 238 # lcsgih/lcsgib is done using the names 239 # hicegate0/bicegate0 instead of the IP addresses 240 # 17/08/10 - BjornM - adjustments for interactive runs on lcxt4 241 # 07/09/10 - Siggi - bugfix for wrong netcdf/3.6.3 module on lcsgi 242 # 08/12/10 - Siggi - new handling of openmp/hybrid runs, option -O 243 # has now argument threads_per_task 244 # adjustments for Kyushu Univ. (lcrte, ibmku) 245 # 14/12/10 - Siggi - adjustments for new Tsubame system at Tokyo 246 # institute of technology (lctit) 247 # 23/12/10 - Micha - different number of processors in ocean and 248 # atmosphere is now allowed 249 # 02/02/10 - Siggi - further adjustments on Tsubame and concerning openMP 250 # usage 251 # 09/03/10 - Siggi - adjustments for ibmkisti, mpt bugfix for netCDF4 252 # usage, totalview usage extended 253 # 17/03/11 - Siggi - adjustments for openmp usage on ibmkisti 254 # 03/04/11 - Micha - added lckordi 255 # 06/04/11 - BjornM - bugfix for runs with mpt on lcsgi 256 # 17/08/11 - Siggi - extensions for impi library 257 # 18/08/11 - Siggi - bugfix for local append of output files with suffix 258 # (.nc) 259 # 18/08/11 - Marcus - support for Linux OS with German locale 260 # - properly report hosts on general Linux clusters 261 # 29/08/11 - BjornW - adapted for lcflow (ForWind cluster in Oldenburg) 262 # 29/08/11 - Carolin- initiating restart-run: adjustment of the path at 263 # IMUK 264 # 15/09/11 - Siggi - new option -w tp set the maximum number of parallel 265 # io streams, option -T is obligatory from now on 266 # 25/01/12 - BjornM - a namelist file check prior to the model run has 267 # been implemented (check_namelist_files). 268 # New option -z can be used to skip the check 269 # 03/02/12 - BjornM - namelist file check temporary disabled 270 # until severel bugs are fixed 271 # 08/02/12 - BjornM - bugfixes: skipping namelist file check in case of 272 # restart runs. check is now possible with topography 273 # and the -v (silent) option is considered 274 # 14/02/12 - BjornM/- bugfix: removed slash in \$queue, changed default 275 # Farah queue for lcsgi to testq, since bigq is not 276 # available on ice1 277 # 16/02/12 - BjornM - bugfix: replaced $localhost by $host in the ENVPAR 278 # file, which is generated for the namelist file check 279 # 17/02/12 - Siggi - -z included in description of options (mrun ?) 280 # 22/02/12 - Siggi - -s info updated 281 # 22/02/12 - Siggi - case "-s WP" removed 282 # 28/02/12 - BjornM - further adjustments for namelist file check 283 # 09/03/12 - Siggi - -T option not obligatory for lcflow 284 # 12/03/12 - Siggi - tasks_per_node divisor check not for lcflow 285 # 21/03/12 - Matthias - default compiler on ibmh changed 286 # 02/05/12 - Bjoern - lcxt4 is now lcxe6, adjustments for lcxe6, 287 # bugfixes for the parameter file check, initial 288 # commands on ssh calls sourced out to .mrun.config 289 # 05/06/12 - Bjoern - bugfixes for the parameter file check on lcxe6. 290 # combine_plot_fields can be switched off by the 291 # new mrun option -Z 292 # 08/06/12 - Bjoern - max_pr_user enabled for the namelist file check, 293 # sleep commands are now disabled in silent mode (-v) 294 # 06/08/12 - Bjoern - update: system update at imuk now requires (new) 295 # initial shell commands on ssh calls (automatic 296 # restart runs were not possible) 297 # 22/08/12 - Bjoern - bugfix: missing export statement in the previous 298 # update of the ssh calls 299 # 06/09/12 - Bjoern - typo removed: "-D_parallel" -> "-D__parallel" 300 # 02/10/12 - Siggi - adjusted for lcsb (urban00) 301 # 31/10/12 - Siggi - -T option not obligatory for lcxt5m, 302 # tasks_per_node not checked for this machine 303 # 01/11/12 - Siggi - adjusted for lckiaps 304 # 07/11/12 - Bjoern - parameter file check adapted for batch jobs on 305 # local host 37 # 21/03/94 - Siggi - first version (1.0) 38 # 03/03/94 - Siggi - start with developing the script 39 #--------------------------------------------------------------------------------# 306 40 307 41
Note: See TracChangeset
for help on using the changeset viewer.