Changeset 691 for codes/icosagcm


Ignore:
Timestamp:
05/03/18 17:26:18 (6 years ago)
Author:
dubos
Message:

devel/Python : bugfix, on Irene all2all corrupts its argument ?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/Python/dynamico/parallel.py

    r682 r691  
    3636        index_list, self.order = ordered_list(index_list) 
    3737        comm, vtxdist = dim.comm, dim.vtxdist 
     38        self.comm, self.n, self.vtxdist = comm, len(index_list), vtxdist 
    3839        list_local = [ [ j-vtxdist[i] for j in index_list if j>=vtxdist[i] and j<vtxdist[i+1]]  
    3940                      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) 
    4444    def get(self, get_data, put_data): 
    4545        data_send = [get_data(indices) for indices in self.list_send] 
Note: See TracChangeset for help on using the changeset viewer.