Changeset 25762
- Timestamp:
- 11/16/20 14:11:05 (4 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/externalpackages/gmsh/install-4-mac-python-static.sh
r25745 r25762 34 34 35 35 # Copy customized source and config files to 'src' directory 36 cp configs/ 4/mac/static/CMakeLists.txt src36 cp configs/${VER}/mac/static/CMakeLists.txt src 37 37 38 38 # Configure -
issm/trunk-jpl/jenkins/pine_island-mac-binaries-python
r25749 r25762 46 46 boost install-1.7-mac-static.sh 47 47 dakota install-6.2-mac-static.sh 48 curl install-7.67-static.sh49 48 netcdf install-4.7-mac-parallel-static.sh 50 49 proj install-6.2-static.sh … … 75 74 # compilation 76 75 # 77 NUMCPUS_INSTALL= 476 NUMCPUS_INSTALL=8 78 77 79 78 # Number of CPUs used in the nightly runs -
issm/trunk-jpl/src/m/classes/clusters/local.py
r25684 r25762 48 48 #}}} 49 49 50 def checkconsistency : #{{{50 def checkconsistency(self, md, solution, analyses): #{{{ 51 51 if cluster.np < 1: 52 52 md.checkmessage('number of processors should be at least 1') -
issm/trunk-jpl/src/m/classes/spatiallinearbasalforcings.py
r25688 r25762 16 16 17 17 def __init__(self, *args): #{{{ 18 nargs = len(args) :18 nargs = len(args) 19 19 if nargs == 0: 20 20 self.groundedice_melting_rate = np.nan … … 80 80 raise Exception('not implemented yet!') 81 81 md = checkfield(md, 'fieldname', 'basalforcings.groundedice_melting_rate', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices]) 82 md = checkfield(md, x'fieldname', 'basalforcings.deepwater_melting_rate', '>=', 0, 'numel', 1)82 md = checkfield(md, 'fieldname', 'basalforcings.deepwater_melting_rate', '>=', 0, 'numel', 1) 83 83 md = checkfield(md, 'fieldname', 'basalforcings.deepwater_elevation', '<', 'basalforcings.upperwater_elevation', 'numel', 1) 84 84 md = checkfield(md, 'fieldname', 'basalforcings.upperwater_elevation', '<=', 0, 'numel', 1) -
issm/trunk-jpl/src/m/geometry/AboveGround.py
r25065 r25762 1 1 import numpy as np 2 2 3 def functionAboveGround(lat, long, r, height): #{{{3 def AboveGround(lat, long, r, height): #{{{ 4 4 r = r + height 5 5 x = r * np.cos(np.deg2rad(lat)) * np.cos(np.deg2rad(long)) -
issm/trunk-jpl/src/m/plot/plot_coastlines.py
r25685 r25762 1 import matplotlib.patches.Polygon as mpl.Polygon1 import matplotlib.patches.Polygon as Polygon 2 2 import numpy as np 3 3 … … 9914 9914 # Plot 9915 9915 else: 9916 p = mpl.Polygon(np.hstack((x, y)))9916 p = Polygon(np.hstack((x, y))) 9917 9917 # Plot 9918 9918 if options.getfieldvalue('coordcent', 'atlantic') == 'pacific': -
issm/trunk-jpl/src/m/solvers/bcgsasmoptions.py
r25246 r25762 3 3 4 4 5 from pairoptions import pairoptions 6 from collections import OrderedDict 5 def bcgsasmoptions(*args): 7 6 8 9 def bcgsasmoptions(*args): 10 11 #retrieve options provided in *args 12 options = pairoptions(*args) 13 solverOptions = OrderedDict() 14 solverOptions['toolkit'] = 'petsc' 15 solverOptions['mat_type'] = options.getfieldvalue('mat_type', 'mpiaij') 16 solverOptions['ksp_type'] = options.getfieldvalue('ksp_type', 'bcgs') 17 solverOptions['pc_type'] = options.getfieldvalue('pc_type', 'asm') 18 return solverOptions 7 #retrieve options provided in *args 8 options = pairoptions(*args) 9 solverOptions = OrderedDict() 10 solverOptions['toolkit'] = 'petsc' 11 solverOptions['mat_type'] = options.getfieldvalue('mat_type', 'mpiaij') 12 solverOptions['ksp_type'] = options.getfieldvalue('ksp_type', 'bcgs') 13 solverOptions['pc_type'] = options.getfieldvalue('pc_type', 'asm') 19 14 return solverOptions -
issm/trunk-jpl/src/m/solvers/bcgsjacobioptions.py
r25246 r25762 3 3 4 4 5 from pairoptions import pairoptions 6 from collections import OrderedDict 5 def bcgsjacobioptions(*args): 7 6 7 options = pairoptions(*args) 8 solverOptions = OrderedDict() 9 solverOptions['toolkit'] = 'petsc' 10 solverOptions['mat_type'] = options.getfieldvalue('mat_type', 'mpiaij') 11 solverOptions['ksp_type'] = options.getfieldvalue('ksp_type', 'bcgs') 12 solverOptions['pc_type'] = options.getfieldvalue('pc_type', 'jacobi') 8 13 9 def bcgsjacobioptions(*args):10 11 options = pairoptions(*args)12 solverOptions = OrderedDict()13 solverOptions['toolkit'] = 'petsc'14 solverOptions['mat_type'] = options.getfieldvalue('mat_type', 'mpiaij')15 solverOptions['ksp_type'] = options.getfieldvalue('ksp_type', 'bcgs')16 solverOptions['pc_type'] = options.getfieldvalue('pc_type', 'jacobi')17 18 return solverOptions19 14 return solverOptions -
issm/trunk-jpl/src/m/solvers/cgnejacobioptions.py
r25246 r25762 3 3 4 4 5 from pairoptions import pairoptions 6 from collections import OrderedDict 5 def cgnejacobioptions(*args): 7 6 7 #retrieve options provided in *args 8 options = pairoptions(*args) 9 solverOptions = OrderedDict() 10 solverOptions['toolkit'] = 'petsc' 11 solverOptions['mat_type'] = options.getfieldvalue('mat_type', 'mpiaij') 12 solverOptions['ksp_type'] = options.getfieldvalue('ksp_type', 'cgne') 13 solverOptions['pc_type'] = options.getfieldvalue('pc_type', 'jacobi') 8 14 9 def cgnejacobioptions(*args):10 11 #retrieve options provided in *args12 options = pairoptions(*args)13 solverOptions = OrderedDict()14 solverOptions['toolkit'] = 'petsc'15 solverOptions['mat_type'] = options.getfieldvalue('mat_type', 'mpiaij')16 solverOptions['ksp_type'] = options.getfieldvalue('ksp_type', 'cgne')17 solverOptions['pc_type'] = options.getfieldvalue('pc_type', 'jacobi')18 19 return solverOptions20 15 return solverOptions -
issm/trunk-jpl/src/m/solvers/conditionnumberoptions.py
r25246 r25762 3 3 4 4 5 function cn = conditionnumberoptions(*args) 6 #MULTIGRIDOPTIONS - use Multigrid 7 # 8 # Usage: 9 # options = mgoptions 5 def conditionnumberoptions(*args): 6 """MULTIGRIDOPTIONS - use Multigrid 7 8 Usage: 9 options = mgoptions 10 """ 10 11 11 12 #retrieve options provided in *args -
issm/trunk-jpl/src/m/solvers/mumpsnoneoptions.py
r25246 r25762 3 3 4 4 5 function mumps = mumpsoptions(*args) 5 def mumpsoptions(*args): 6 6 #MUMPSOPTIONS - return MUMPS direct solver petsc options 7 7 # … … 16 16 PETSC_MAJOR = IssmConfig('_PETSC_MAJOR_') 17 17 PETSC_MINOR = IssmConfig('_PETSC_MINOR_') 18 if PETSC_MAJOR == 2 .,18 if PETSC_MAJOR == 2: 19 19 mumps.toolkit = 'petsc' 20 20 mumps.mat_type = getfieldvalue(options, 'mat_type', 'aijmumps') … … 24 24 end 25 25 26 if PETSC_MAJOR == 3 .,26 if PETSC_MAJOR == 3: 27 27 mumps.toolkit = 'petsc' 28 28 mumps.mat_type = getfieldvalue(options, 'mat_type', 'mpiaij') 29 29 mumps.ksp_type = getfieldvalue(options, 'ksp_type', 'preonly') 30 30 mumps.pc_type = getfieldvalue(options, 'pc_type', 'lu') 31 if PETSC_MINOR > 8 31 if PETSC_MINOR > 8: 32 32 mumps.pc_factor_mat_solver_type = getfieldvalue(options, 'pc_factor_mat_solver_type', 'mumps') 33 else 33 else: 34 34 mumps.pc_factor_mat_solver_package = getfieldvalue(options, 'pc_factor_mat_solver_package', 'mumps') 35 35 end -
issm/trunk-jpl/test/NightlyRun/GetIds.py
r24569 r25762 6 6 7 7 def GetIds(ids_names): 8 """ 9 GetIds - output ids from a given array of IDs and test names 8 """GETIDS - Output ids from a given array of IDs and test names 10 9 11 the test names can be any string or sub - string present12 in the test's name (first line of corresponding file)10 The test names can be any string or substring present in the test's name 11 (first line of corresponding file). Test names are case sensitive. 13 12 14 test names are case sensitive 15 16 Usage: 17 ids = GetIds(101) 18 ids = GetIds('Dakota') 19 ids = GetIds([101, 102...]) 20 ids = GetIds([\'Dakota\', \'Slr\'...]) 21 ids = GetIds([[101, 102...], [\'Dakota\', \'Slr\'...]]) 13 Usage: 14 ids = GetIds(101) 15 ids = GetIds('Dakota') 16 ids = GetIds([101, 102...]) 17 ids = GetIds([\'Dakota\', \'Slr\'...]) 18 ids = GetIds([[101, 102...], [\'Dakota\', \'Slr\'...]]) 22 19 """ 23 20 24 21 ids = [] 25 22 26 # 1 input, either an idor a test name23 # Non-list input: either an ID or a test name 27 24 if type(ids_names) == str: 28 25 ids = IdFromString(ids_names) … … 32 29 #raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive. Test names are in the first line of a given test eg: "Square" would include test101.py: "SquareShelfConstrainedStressSSA2d"') 33 30 31 # Non-list input: ID 34 32 if type(ids_names) == int: 35 33 ids = [ids_names] … … 39 37 #raise RuntimeError('runme.py: GetIds.py: No tests with ids matching "' + ids_names + '" were found. Check that there is a test file named "test' + str(ids_names) + '.py"') 40 38 41 39 # many inputs of either ids or test names 42 40 if type(ids_names) == list and len(ids_names) > 0: 43 41 # is everything a string or int? 44 42 if np.array([type(i) == int for i in ids_names]).all(): 45 43 ids = ids_names 46 if np.array([type(i) == np.int64 for i in ids_names]).all():44 elif np.array([type(i) == np.int64 for i in ids_names]).all(): 47 45 ids = ids_names 48 46 elif np.array([type(i) == str for i in ids_names]).all(): … … 51 49 raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive.') 52 50 53 # many inputs of both ids and test names 54 # ids_names[0] -> ids_names by id 55 # ids_names[1] -> ids_names by test name 51 # many inputs of both ids and test names 52 # ids_names[0] -> ids_names by id 53 # ids_names[1] -> ids_names by test name 54 # 55 # NOTE: ID inclusion/exclusion lists will always hit this condition 56 # becasue of the way their respective arguments are gathered at the 57 # end of __main__ in the call to function runme. 56 58 if type(ids_names) == list and len(ids_names) == 2: 57 if type(ids_names[0]) == list and len(ids_names[0]) > 0 and type(ids_names[0][0]) == int: 58 ids = np.concatenate([ids, ids_names[0]]) 59 if type(ids_names[0]) == list and len(ids_names[0]) > 0: 60 ids_expanded = [] 61 for i in ids_names[0]: 62 # Handle case where list element follows MATLAB range syntax 63 if ':' in i: 64 i_range = i.split(':') 65 for j in range(int(i_range[0]), int(i_range[1])): 66 ids_expanded.append(j) 67 else: 68 ids_expanded.append(int(i)) 69 unique_ids = list(set(ids_expanded)) 70 ids += unique_ids 59 71 if type(ids_names[1]) == list and len(ids_names[1]) > 0 and type(ids_names[1][0]) == str: 60 72 ids = np.concatenate([ids, np.concatenate([IdFromString(i) for i in ids_names[1]])]) … … 62 74 raise RuntimeError('runme.py: GetIds.py: No tests with names matching "' + ids_names + '" were found. Note that name checking is case sensitive.') 63 75 64 76 # no recognizable ids or id formats 65 77 if np.size(ids) == 0 and not np.all(np.equal(ids_names, None)): 66 78 raise RuntimeError('runme.py: GetIds.py: include and exclude options (-i/--id; -in/--include_name; -e/--exclude; -en/--exclude_name) options must follow GetIds usage format:\n' + GetIds.__doc__) -
issm/trunk-jpl/test/NightlyRun/runme.py
r25689 r25762 22 22 """RUNME - test deck for ISSM nightly runs 23 23 24 In a test deck directory (test s/Vertification / NightlyRun for example) the25 following command will launch all the existing tests:26 27 >>./runme.py28 29 To run t he tests 101 and 102:30 31 >>./runme.py -i [101, 102]32 33 Available options:24 In a test deck directory (test/NightlyRun for example), the following 25 command will launch all the existing tests, 26 27 ./runme.py 28 29 To run tests 101 and 102: 30 31 ./runme.py -i [101, 102] 32 33 Options: 34 34 -i/--id followed by the list of ids or (parts of) test names requested 35 35 NOTE: runs all tests by default … … 144 144 erroredtest_list = [] 145 145 for id in test_ids: 146 print(("----------------starting:{}----------------------- 146 print(("----------------starting:{}-----------------------".format(id))) 147 147 try: 148 148 #Execute test … … 218 218 fid = open(os.path.join(ISSM_DIR, 'nightlylog', 'pythonerror.log'), 'a') 219 219 fid.write('%s' % message) 220 fid.write('\n------------------------------------------------------------------ 220 fid.write('\n------------------------------------------------------------------\n') 221 221 fid.close() 222 222 print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id, id_string, fieldname))) … … 231 231 fid = open(os.path.join(ISSM_DIR, 'nightlylog', 'pythonerror.log'), 'a') 232 232 fid.write('%s' % message) 233 fid.write('\n------------------------------------------------------------------ 233 fid.write('\n------------------------------------------------------------------\n') 234 234 fid.close() 235 235 print(('FAILURE difference: N/A test id: {} test name: {} field: {}'.format(id, id_string, 'N/A'))) … … 238 238 raise RuntimeError(message) 239 239 240 print(("---------------- finished:{}-----------------------".format(id)))240 print(("----------------finished:{}-----------------------".format(id))) 241 241 242 242 if errorcount > 0: … … 244 244 return 245 245 246 247 246 if __name__ == '__main__': 248 247 if 'PYTHONSTARTUP' in os.environ: 249 248 PYTHONSTARTUP = os.environ['PYTHONSTARTUP'] 250 #print 'PYTHONSTARTUP = ', PYTHONSTARTUP251 249 if os.path.exists(PYTHONSTARTUP): 252 250 try: … … 258 256 259 257 parser = argparse.ArgumentParser(description='RUNME - test deck for ISSM nightly runs') 260 parser.add_argument('-i', '--id', nargs='*', type= int, help='followed by the list of ids requested', default=[])258 parser.add_argument('-i', '--id', nargs='*', type=str, help='followed by the list of ids requested', default=[]) 261 259 parser.add_argument('-in', '--include_name', nargs='*', type=str, help='followed by the list of test names requested', default=[]) 262 parser.add_argument('-e', '--exclude', nargs='+', type= int, help='ids to be excluded from the test', default=[])260 parser.add_argument('-e', '--exclude', nargs='+', type=str, help='ids to be excluded from the test', default=[]) 263 261 parser.add_argument('-en', '--exclude_name', nargs='+', type=str, help='test names to be excluded from the test', default=[]) 264 262 parser.add_argument('-b', '--benchmark', help='nightly/ismip/eismint/thermal/mesh/...', default='nightly')
Note:
See TracChangeset
for help on using the changeset viewer.