Changeset 691 for codes/icosagcm/devel
- Timestamp:
- 05/03/18 17:26:18 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/Python/dynamico/parallel.py
r682 r691 36 36 index_list, self.order = ordered_list(index_list) 37 37 comm, vtxdist = dim.comm, dim.vtxdist 38 self.comm, self.n, self.vtxdist = comm, len(index_list), vtxdist 38 39 list_local = [ [ j-vtxdist[i] for j in index_list if j>=vtxdist[i] and j<vtxdist[i+1]] 39 40 for i in range(len(vtxdist)-1) ] 40 list_send = comm.alltoall(list_local) 41 self.comm, self.n, self.list_n = comm, len(index_list), [len(i) for i in list_local] 42 self.list_local, self.list_send, self.dict = list_local, list_send, inverse_list(index_list) 43 self.vtxdist=vtxdist 41 self.list_local, self.list_n = list_local, map(len, list_local) 42 list_send = comm.alltoall(list_local) # may modify list_local !! 43 self.list_send, self.dict = list_send, inverse_list(index_list) 44 44 def get(self, get_data, put_data): 45 45 data_send = [get_data(indices) for indices in self.list_send]
Note: See TracChangeset
for help on using the changeset viewer.