Changeset 26744 for issm/trunk/test/NightlyRun/runme.py
- Timestamp:
- 12/22/21 10:39:44 (3 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 25837-25866,25868-25993,25995-26330,26332-26733,26736-26739,26741
- Property svn:mergeinfo changed
-
issm/trunk/test
- Property svn:mergeinfo changed
-
issm/trunk/test/NightlyRun/runme.py
r25836 r26744 1 1 #!/usr/bin/env python 2 # 3 # NOTE: Switch to, 4 # 5 # #!/usr/bin/python3 6 # 7 # when making Python 3 default 8 # 2 9 import argparse 3 10 from glob import glob 4 11 import os 12 import re 5 13 from sys import float_info 6 14 from traceback import format_exc … … 9 17 10 18 try: 11 from parallelrange import parallelrange12 except ImportError: #we don't have issm code in path, just get it19 from arch import archread 20 except: # ISSM_DIR is not on path 13 21 import devpath 14 from parallelrange import parallelrange 22 15 23 from arch import archread 16 24 from arch import archwrite 17 25 from GetIds import * 18 26 from IdToName import IdToName 27 from parallelrange import parallelrange 19 28 20 29 … … 22 31 """RUNME - test deck for ISSM nightly runs 23 32 24 In a test deck directory ( test/NightlyRun for example),the following25 command will launch all theexisting tests,33 In a test deck directory (for example, test/NightlyRun) the following 34 command will launch all existing tests, 26 35 27 36 ./runme.py 28 37 29 To run tests 101 and 102 :38 To run tests 101 and 102, 30 39 31 40 ./runme.py -i [101, 102] 32 41 33 42 Options: 34 -i/--id followed by the list of ids or (parts of) test names requested 35 NOTE: runs all tests by default 36 37 -e/--exclude ids or (parts of) test names to be excluded (same format as id) 38 NOTE: exclude does nothing if 'id' is specified with different values 39 40 -b/--benchmark 'all' : (all of the tests) 41 'nightly' : (nightly run/daily run) 42 'validation' : (validation) 43 'adolc' : validation of adolc tests 44 'eismint' : validation of eismint tests 45 'ismip' : validation of ismip-hom tests 46 'mesh' : validation of mesh tests 47 'qmu' : validation of qmu tests 48 'referential' : validation of referential tests 49 'slr' : validation of slr tests 50 'thermal' : validation of thermal tests 51 'tranforcing' : validation of transient forcing tests 52 53 -p/--procedure 'check' : run the test (default) 54 'update' : update the archive 43 -i/--id Followed by the list of ids or (parts of) test names 44 requested 45 -e/--exclude Ids or (parts of) test names to be excluded (same 46 format as id). Does nothing if 'id' is specified with 47 different values. 48 -b/--benchmark 'all' : (all of the tests) 49 'nightly' : (nightly run/daily run) 50 'validation' : (validation) 51 'adolc' : validation of adolc tests 52 'eismint' : validation of eismint tests 53 'ismip' : validation of ismip-hom tests 54 'mesh' : validation of mesh tests 55 'qmu' : validation of qmu tests 56 'referential' : validation of referential tests 57 'slc' : validation of slc tests 58 'thermal' : validation of thermal tests 59 'tranforcing' : validation of transient forcing tests 60 -p/--procedure 'check' : run the test (default) 61 'update' : update the archive 55 62 56 63 Usage: … … 63 70 ./runme.py -e 2001 64 71 ./runme.py -e 'Dakota' --benchmark 'all' 65 ./runme.py -i [[101, 102], ['Dakota', 'Slr']] 72 ./runme.py -i [[101, 102], ['Dakota', 'Slc']] 73 74 NOTE: 75 - Will only run test scripts whose names explicitly follow the convention, 76 77 test<id>.py 78 79 where <id> is any integer. 66 80 67 81 TODO: 68 82 - At '#disp test result', make sure precision of output matches that of 69 MATLAB. 70 - Check for failures that do not raise exceptions (for example, 'Standard exception'; see also jenkins/jenkins.sh). These should be counted as failures. 83 MATLAB. 84 - Check for failures that do not raise exceptions (for example, 'Standard 85 exception'; see also jenkins/jenkins.sh). These should be counted as 86 failures. 71 87 """ 72 88 … … 76 92 #Process options 77 93 #GET benchmark {{{ 78 if benchmark not in ['all', 'nightly', 'validation', 'adolc', 'eismint', 'ismip', 'mesh', 'sl r', 'thermal', 'tranforcing', 'qmu']:94 if benchmark not in ['all', 'nightly', 'validation', 'adolc', 'eismint', 'ismip', 'mesh', 'slc', 'thermal', 'tranforcing', 'qmu']: 79 95 print(("runme warning: benchmark '{}' not supported, defaulting to test 'nightly'.".format(benchmark))) 80 96 benchmark = 'nightly' … … 96 112 #GET ids {{{ 97 113 flist = glob('test*.py') #File name must start with 'test' and must end by '.py' and must be different than 'test.py' 98 list_ids = [int( file[4:-3]) for file in flist if not file == 'test.py'] #Keep test id only (skip 'test' and '.py')114 list_ids = [int(re.search(r'\d+',file.split('.')[0]).group()) for file in flist if not file == 'test.py'] # Keep test id only (skip 'test' and '.py') 99 115 100 116 i1, i2 = parallelrange(rank, numprocs, len(list_ids)) #Get tests for this cpu only … … 129 145 elif benchmark == 'referential': 130 146 test_ids = test_ids.intersection(set(range(1601, 1603))) 131 elif benchmark == 'sl r':147 elif benchmark == 'slc': 132 148 test_ids = test_ids.intersection(set(range(2001, 2500))) 133 149 elif benchmark == 'adolc':
Note:
See TracChangeset
for help on using the changeset viewer.