Changeset 3635
 Timestamp:
 Sep 20, 2006, 4:15:53 PM (17 years ago)
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

anuga_core/source/anuga_parallel/parallel_api.py
r3628 r3635 7 7 # The PythonMPI interface 8 8 from pypar import size, rank, get_processor_name, finalize, send, receive 9 from anuga_parallel.parallel_abstraction import size, rank, get_processor_name, finalize #,send, receive9 #from anuga_parallel.parallel_abstraction import size, rank, get_processor_name, finalize #,send, receive 10 10 from anuga_parallel.pmesh_divide import pmesh_divide_metis 11 11 from anuga_parallel.build_submesh import build_submesh … … 123 123 def distribute_mesh(domain): 124 124 125 numprocs = pypar.size()125 numprocs = size() 126 126 127 127 
anuga_work/production/karratha_2006/run_karratha.py
r3631 r3635 36 36 import project # Definition of file names and polygons 37 37 38 from anuga_parallel.parallel_api import distribute, myid 38 from anuga_parallel.parallel_api import distribute, myid, numprocs 39 39 40 40 # … … 46 46 meshname = project.meshname+'.msh' 47 47 source_dir = project.boundarydir 48 49 50 48 51 49 if myid == 0: … … 105 103 106 104 print 'Available boundary tags', domain.get_boundary_tags() 107 Bf = File_boundary(source_dir + project.boundary_basename + '.sww',108 domain, verbose = True)105 #Bf = File_boundary(source_dir + project.boundary_basename + '.sww', 106 # domain, verbose = True) 109 107 Br = Reflective_boundary(domain) 110 108 Bd = Dirichlet_boundary([tide,0,0]) … … 119 117 # Create the parallel domain 120 118 # 121 domain = distribute(domain, verbose=True) 119 if numprocs > 1: 120 domain = distribute(domain, verbose=True) 122 121 123 122 # Set those boundaries that can't be communicated automatically 123 # FIXME: There is a problem with the parallel domain. 124 # It seems that boundaries are outside coverage. 125 # 126 # We get 127 # 128 # 129 #Interpolation_function (spatiotemporal) statistics: 130 # Extent: 131 # x in [60494.651593, 149593.652382], len(x) == 56 132 # y in [74198.017534, 184623.446077], len(y) == 56 133 # t in [0.000000, 28610.000000], len(t) == 145 134 # Quantities: 135 # stage in [1.797799, 1.644574] 136 # xmomentum in [33.219473, 21.571094] 137 # ymomentum in [32.775090, 73.761256] 138 # Interpolation points (xi, eta): number of points == 411 139 # xi in [420467.297166, 368252.119852] 140 # eta in [7652664.149808, 7605199.504709] 141 # Interpolated quantities (over all timesteps): 142 # stage at interpolation points in [inf, inf] 143 # xmomentum at interpolation points in [inf, inf] 144 # ymomentum at interpolation points in [inf, inf] 145 # 146 # 147 #Instead of 148 # 149 # 150 #Interpolation_function (spatiotemporal) statistics: 151 # Extent: 152 # x in [60494.651593, 149593.652382], len(x) == 56 153 # y in [74198.017534, 184623.446077], len(y) == 56 154 # t in [0.000000, 28610.000000], len(t) == 145 155 # Quantities: 156 # stage in [1.797799, 1.644574] 157 # xmomentum in [33.219473, 21.571094] 158 # ymomentum in [32.775090, 73.761256] 159 # Interpolation points (xi, eta): number of points == 503 160 # xi in [4747.280215, 96909.729282] 161 # eta in [9240.613414, 83183.465791] 162 # Interpolated quantities (over all timesteps): 163 # stage at interpolation points in [0.909515, 1.331521] 164 # xmomentum at interpolation points in [17.054914, 17.110528] 165 # ymomentum at interpolation points in [24.691402, 16.625063] 166 # 167 168 124 169 Bf = File_boundary(source_dir + project.boundary_basename + '.sww', 125 domain, verbose = True) 126 boundary_map = domain.boundary_map 127 boundary_map['ocean'] = Bf 128 domain.set_boundary(boundary_map) 170 domain, verbose = True) 171 domain.modify_boundary({'ocean': Bf}) 129 172 130 173
Note: See TracChangeset
for help on using the changeset viewer.