Ignore:
Timestamp:
05/28/18 17:28:07 (4 years ago)
Author:
yushan
Message:

rank_map is passed from vector to map, in order to have more flexibility in comm_split

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_merge.cpp

    r1500 r1503  
    9292      for(int i=0; i<intra_ep_size; i++) 
    9393      { 
    94         tmp_rank_map[reorder[i]] = (*newintracomm)->rank_map->at(i) ; 
     94        tmp_rank_map[reorder[i]] = (*newintracomm)->ep_rank_map->at(i) ; 
    9595      } 
    9696 
    97       (*newintracomm)->rank_map->swap(tmp_rank_map); 
     97      //(*newintracomm)->rank_map->swap(tmp_rank_map); 
     98      (*newintracomm)->ep_rank_map->clear(); 
     99      for(int i=0; i<tmp_rank_map.size(); i++) 
     100      { 
     101        (*newintracomm)->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(i, tmp_rank_map[i].first, tmp_rank_map[i].second)); 
     102      } 
     103       
    98104 
    99105      tmp_rank_map.clear(); 
     
    206212    for(int i=0; i<newintracomm_ep_size; i++) 
    207213    { 
    208       (*newintracomm)->rank_map->at(rankmap_buf[3*i]).first  = rankmap_buf[3*i+1]; 
    209       (*newintracomm)->rank_map->at(rankmap_buf[3*i]).second = rankmap_buf[3*i+2]; 
     214      (*newintracomm)->ep_rank_map->at(rankmap_buf[3*i]).first  = rankmap_buf[3*i+1]; 
     215      (*newintracomm)->ep_rank_map->at(rankmap_buf[3*i]).second = rankmap_buf[3*i+2]; 
    210216    } 
    211217 
Note: See TracChangeset for help on using the changeset viewer.