Changeset 825 for codes/icosagcm/devel/Python/test/py/partition.py
- Timestamp:
- 04/30/19 18:14:37 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/Python/test/py/partition.py
r760 r825 1 1 print 'Starting' 2 3 from dynamico import meshes 4 from dynamico import parallel 5 from dynamico.dev import unstructured as unst 6 from dynamico import maps 7 from dynamico.parmetis import partition_graph 2 8 3 9 from mpi4py import MPI … … 7 13 8 14 #from dynamico import partition 9 from dynamico import parallel, meshes10 from dynamico import unstructured as unst11 15 12 16 import math as math … … 46 50 part = 0*xadj_loc[0:-1]; 47 51 48 unst.ker.dynamico_partition_graph(mpi_rank, mpi_size, vtxdist, xadj_loc, adjncy_loc, 4, part) 52 # unst.ker.dynamico_partition_graph(mpi_rank, mpi_size, vtxdist, xadj_loc, adjncy_loc, 4, part) 53 partition_graph(comm, vtxdist, xadj_loc, adjncy_loc, part, nparts=4) 49 54 50 #for i in range(len(part)):51 #print 'vertex', i+idx_start, 'proc', part[i]55 for i in range(len(part)): 56 print 'vertex', i+idx_start, 'proc', part[i] 52 57 53 58 #-----------------------------------------------------------------------------# … … 84 89 def coriolis(lon,lat): return 0.*lat 85 90 llm, nqdyn, radius = 1,1,1. 86 lmesh = meshes.Local_Mesh(pmesh, llm, nqdyn, radius, coriolis) 91 planet = maps.SphereMap(radius, 0.) 92 lmesh = meshes.Local_Mesh(pmesh, llm, nqdyn, planet) 87 93 88 94 (primal_deg, primal_vertex, dim_vertex, dim_cell, cell_owner,
Note: See TracChangeset
for help on using the changeset viewer.