Changeset 8856
- Timestamp:
- Apr 30, 2013, 8:42:00 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga_parallel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_parallel/distribute_mesh.py
r8605 r8856 132 132 # Wrapper for old pmesh_divide_metis which does not return tri_index or r_tri_index 133 133 nodes, ttriangles, boundary, triangles_per_proc, quantities, tri_index, r_tri_index = pmesh_divide_metis_helper(domain, n_procs) 134 135 print triangles_per_proc 136 assert num.all(triangles_per_proc>0), 'Metis created a partition where one mesh has 0 triangles' 137 134 138 return nodes, ttriangles, boundary, triangles_per_proc, quantities 135 139 136 140 def pmesh_divide_metis_with_map(domain, n_procs): 141 137 142 return pmesh_divide_metis_helper(domain, n_procs) 138 143 … … 208 213 209 214 triangles_per_proc = num.bincount(epart) 215 216 msg = """Metis created a partition where at least one submesh has no triangles. 217 Try using a smaller number of mpi processors""" 218 assert num.all(triangles_per_proc>0), msg 219 210 220 proc_sum = num.zeros(n_procs+1,num.int) 211 221 proc_sum[1:] = num.cumsum(triangles_per_proc) … … 400 410 401 411 412 print triangles_per_proc 413 402 414 nodes = mesh.nodes 403 415 triangles = mesh.triangles … … 450 462 451 463 ids = num.unique(subtriangles.flat) 464 465 452 466 lnodes = nodes[ids] 453 # 454 # 455 # 467 # print nodes.shape 468 # print ids.shape 469 # print lnodes.shape 456 470 x = num.concatenate((num.reshape(ids, (-1,1)),lnodes ), 1) 457 # 458 # 471 # print x 472 # print y 459 473 node_list.append(x) 474 475 460 476 # Move to the next processor 461 477 -
trunk/anuga_core/source/anuga_parallel/run_parallel_sw_merimbula.py
r8855 r8856 46 46 #mesh_filename = "merimbula_17156.tsh" ; x0 = 756000.0 ; x1 = 756500.0; yieldstep = 50; finaltime = 500 47 47 #mesh_filename = "merimbula_43200_1.tsh" ; x0 = 756000.0 ; x1 = 756500.0; yieldstep = 50; finaltime = 500 48 #mesh_filename = "test-100.tsh" ; x0 = 200.0 ; x1 = 300.0; yieldstep = 1; finaltime = 5048 mesh_filename = "test-100.tsh" ; x0 = 200.0 ; x1 = 300.0; yieldstep = 1; finaltime = 50 49 49 #mesh_filename = "test-20.tsh" ; x0 = 250.0 ; x1 = 350.0; yieldstep = 1; finaltime = 50 50 50 … … 172 172 t0 = time.time() 173 173 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 174 if myid == 0: 175 domain.write_time() 174 print 'P:'+ str(myid) + ' '+ domain.timestepping_statistics() 175 #if myid == 0: 176 # domain.write_time() 176 177 177 178
Note: See TracChangeset
for help on using the changeset viewer.