Changeset 8857
- Timestamp:
- May 7, 2013, 9:03:02 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_parallel/distribute_mesh.py
r8856 r8857 133 133 nodes, ttriangles, boundary, triangles_per_proc, quantities, tri_index, r_tri_index = pmesh_divide_metis_helper(domain, n_procs) 134 134 135 print triangles_per_proc136 assert num.all(triangles_per_proc>0), 'Metis created a partition where one mesh has 0 triangles'137 138 135 return nodes, ttriangles, boundary, triangles_per_proc, quantities 139 136 … … 147 144 # List, indexed by processor of # triangles. 148 145 149 triangles_per_proc = []146 #triangles_per_proc = [] 150 147 151 148 # List of lists, indexed by processor of vertex numbers 152 149 153 tri_list = []150 #tri_list = [] 154 151 155 152 # Serial to Parallel and Parallel to Serial Triangle index maps … … 159 156 # List indexed by processor of cumulative total of triangles allocated. 160 157 161 proc_sum = [] 162 for i in xrange(n_procs): 163 tri_list.append([]) 164 triangles_per_proc.append(0) 165 proc_sum.append([]) 158 # proc_sum = [] 159 # for i in xrange(n_procs): 160 # tri_list.append([]) 161 # triangles_per_proc.append(0) 162 # proc_sum.append([]) 163 164 #tri_list = n_procs*[] 165 #triangles_per_proc = n_procs*[0] 166 #proc_sum = n_procs*[] 166 167 167 168 # Prepare variables for the metis call … … 214 215 triangles_per_proc = num.bincount(epart) 215 216 216 msg = """Metis created a partition where at least one submesh has no triangles.217 Try using a smaller number of mpi processors"""217 msg = "Metis created a partition where at least one submesh has no triangles. " 218 msg += "Try using a smaller number of mpi processes." 218 219 assert num.all(triangles_per_proc>0), msg 219 220 … … 336 337 else: 337 338 new_boundary = domain.boundary.copy() 338 triangles_per_proc [0] = n_tri339 triangles_per_proc = [n_tri] 339 340 new_triangles = domain.triangles.copy() 340 341 new_tri_index = [] … … 410 411 411 412 412 print triangles_per_proc413 #print triangles_per_proc 413 414 414 415 nodes = mesh.nodes
Note: See TracChangeset
for help on using the changeset viewer.