Changeset 1512


Ignore:
Timestamp:
05/30/18 20:20:07 (2 years ago)
Author:
yushan
Message:

save dev

Location:
XIOS/dev/branch_openmp/extern/ep_dev
Files:
1 deleted
5 edited

Legend:

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

    r1500 r1512  
    9090        out_comm[i]->is_intercomm = true; 
    9191 
    92         out_comm[i]->ep_comm_ptr->intercomm->intercomm_rank_map = new RANK_MAP; 
     92        out_comm[i]->ep_comm_ptr->intercomm->inter_rank_map = new RANK_MAP; 
    9393        out_comm[i]->ep_comm_ptr->intercomm->local_rank_map = new RANK_MAP; 
    9494        out_comm[i]->ep_comm_ptr->intercomm->remote_rank_map = new RANK_MAP; 
     
    9696        int map_size = 0; 
    9797        map_size = comm->ep_comm_ptr->comm_list[i]->ep_comm_ptr->intercomm->intercomm_rank_map->size(); 
    98         out_comm[i]->ep_comm_ptr->intercomm->intercomm_rank_map->resize(map_size); 
     98        out_comm[i]->ep_comm_ptr->intercomm->inter_rank_map->resize(map_size); 
    9999        for(int ii=0; ii<map_size; ii++) 
    100100          out_comm[i]->ep_comm_ptr->intercomm->intercomm_rank_map->at(ii) = comm->ep_comm_ptr->comm_list[i]->ep_comm_ptr->intercomm->intercomm_rank_map->at(ii); 
     
    115115        //out_comm[i]->ep_comm_ptr->intercomm->remote_rank_map = comm->ep_comm_ptr->comm_list[i]->ep_comm_ptr->intercomm->remote_rank_map; 
    116116 
    117         out_comm[i]->ep_comm_ptr->intercomm->local_comm = comm->ep_comm_ptr->comm_list[i]->ep_comm_ptr->intercomm->local_comm;         
     117        //out_comm[i]->ep_comm_ptr->intercomm->local_comm = comm->ep_comm_ptr->comm_list[i]->ep_comm_ptr->intercomm->local_comm;         
    118118        out_comm[i]->ep_comm_ptr->intercomm->intercomm_tag = comm->ep_comm_ptr->comm_list[i]->ep_comm_ptr->intercomm->intercomm_tag; 
    119119 
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_intercomm.hpp

    r1511 r1512  
    1919 
    2020    INTERCOMM_RANK_MAP *intercomm_rank_map; 
     21    RANK_MAP *inter_rank_map; 
    2122    RANK_MAP *local_rank_map; 
    2223    RANK_MAP *remote_rank_map; 
     
    2627 
    2728 
    28     ep_comm *local_comm; 
     29    //ep_comm *local_comm; 
    2930    int intercomm_tag; 
    3031 
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_intercomm_world.cpp

    r1503 r1512  
    472472 
    473473 
    474     (*newintercomm)->ep_comm_ptr->intercomm->local_rank_map = new RANK_MAP; 
    475     (*newintercomm)->ep_comm_ptr->intercomm->local_rank_map->resize(local_ep_size); 
    476  
    477     MPI_Allgather(my_rank_map_elem, 2, MPI_INT, (*newintercomm)->ep_comm_ptr->intercomm->local_rank_map->data(), 2, MPI_INT, local_comm); 
     474    //(*newintercomm)->ep_comm_ptr->intercomm->local_rank_map = new RANK_MAP; 
     475    //(*newintercomm)->ep_comm_ptr->intercomm->local_rank_map->resize(local_ep_size); 
     476 
     477    //MPI_Allgather(my_rank_map_elem, 2, MPI_INT, (*newintercomm)->ep_comm_ptr->intercomm->local_rank_map->data(), 2, MPI_INT, local_comm); 
    478478    
    479     (*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map = new RANK_MAP; 
    480     (*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map->resize(remote_ep_size); 
     479    //(*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map = new RANK_MAP; 
     480    //(*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map->resize(remote_ep_size); 
    481481 
    482482    int local_intercomm_size = intercomm_ep_size; 
     
    488488      ::MPI_Status status; 
    489489 
    490       ::MPI_Send((*newintercomm)->ep_comm_ptr->intercomm->local_rank_map->data(), 2*local_ep_size, to_mpi_type(MPI_INT), mpi_remote_leader, tag, peer_comm); 
    491  
    492       ::MPI_Recv((*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map->data(), 2*remote_ep_size, to_mpi_type(MPI_INT), mpi_remote_leader, tag, peer_comm, &status); 
     490      //::MPI_Send((*newintercomm)->ep_comm_ptr->intercomm->local_rank_map->data(), 2*local_ep_size, to_mpi_type(MPI_INT), mpi_remote_leader, tag, peer_comm); 
     491 
     492      //::MPI_Recv((*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map->data(), 2*remote_ep_size, to_mpi_type(MPI_INT), mpi_remote_leader, tag, peer_comm, &status); 
    493493 
    494494      ::MPI_Send(&local_intercomm_size, 1, to_mpi_type(MPI_INT), mpi_remote_leader, tag, peer_comm); 
     
    497497    } 
    498498 
    499     MPI_Bcast((*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map->data(), 2*remote_ep_size, MPI_INT, local_leader, local_comm); 
     499    //MPI_Bcast((*newintercomm)->ep_comm_ptr->intercomm->remote_rank_map->data(), 2*remote_ep_size, MPI_INT, local_leader, local_comm); 
    500500    MPI_Bcast(&remote_intercomm_size, 1, MPI_INT, 0, *newintercomm); 
    501501 
    502502 
    503     (*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map = new RANK_MAP; 
    504     (*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map->resize(remote_intercomm_size); 
    505  
    506     (*newintercomm)->ep_comm_ptr->intercomm->size_rank_info[0] = local_comm->ep_comm_ptr->size_rank_info[0]; 
    507     (*newintercomm)->ep_comm_ptr->intercomm->size_rank_info[1] = local_comm->ep_comm_ptr->size_rank_info[1]; 
    508     (*newintercomm)->ep_comm_ptr->intercomm->size_rank_info[2] = local_comm->ep_comm_ptr->size_rank_info[2]; 
     503    //(*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map = new RANK_MAP; 
     504    //(*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map->resize(remote_intercomm_size); 
     505 
     506    //(*newintercomm)->ep_comm_ptr->intercomm->size_rank_info[0] = local_comm->ep_comm_ptr->size_rank_info[0]; 
     507    //(*newintercomm)->ep_comm_ptr->intercomm->size_rank_info[1] = local_comm->ep_comm_ptr->size_rank_info[1]; 
     508    //(*newintercomm)->ep_comm_ptr->intercomm->size_rank_info[2] = local_comm->ep_comm_ptr->size_rank_info[2]; 
    509509 
    510510 
     
    529529      for(ii=0; ii<vec2map.size(); ii++) 
    530530      { 
    531         (*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map->at(vec2map[ii].first) = make_pair(vec2map[ii].second.first, vec2map[ii].second.second); 
    532       } 
    533     } 
    534  
    535     MPI_Bcast((*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map->data(), 2*remote_intercomm_size, MPI_INT, 0, *newintercomm); 
    536  
    537     (*newintercomm)->ep_comm_ptr->intercomm->local_comm = (local_comm->ep_comm_ptr->comm_list[ep_rank_loc]); 
     531        //(*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map->at(vec2map[ii].first) = make_pair(vec2map[ii].second.first, vec2map[ii].second.second); 
     532      } 
     533    } 
     534 
     535    //MPI_Bcast((*newintercomm)->ep_comm_ptr->intercomm->intercomm_rank_map->data(), 2*remote_intercomm_size, MPI_INT, 0, *newintercomm); 
     536 
     537    //(*newintercomm)->ep_comm_ptr->intercomm->local_comm = (local_comm->ep_comm_ptr->comm_list[ep_rank_loc]); 
    538538    (*newintercomm)->ep_comm_ptr->intercomm->intercomm_tag = local_comm->ep_comm_ptr->comm_label; 
    539539 
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_lib.cpp

    r1503 r1512  
    5050    for(int i=0; i<comm->ep_comm_ptr->intercomm->intercomm_rank_map->size(); i++) 
    5151    { 
    52       if(   ( comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(i).first  == ep_rank_loc ) 
    53          && ( comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(i).second == mpi_rank ) ) 
     52      if(   ( comm->ep_comm_ptr->intercomm->inter_rank_map->at(i).first  == ep_rank_loc ) 
     53         && ( comm->ep_comm_ptr->intercomm->inter_rank_map->at(i).second == mpi_rank ) ) 
    5454      { 
    5555        inter_rank =  i; 
  • XIOS/dev/branch_openmp/extern/ep_dev/ep_send.cpp

    r1503 r1512  
    240240      int inter_src = comm->ep_comm_ptr->intercomm->local_rank_map->at(src_ep_rank).first; 
    241241      int ep_src_loc = comm->ep_rank_map->at(inter_src).first; 
    242       int ep_dest_loc = comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(dest_remote_ep_rank).first; 
    243       int mpi_dest    = comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(dest_remote_ep_rank).second; 
     242      int ep_dest_loc = comm->ep_comm_ptr->intercomm->inter_rank_map->at(dest_remote_ep_rank).first; 
     243      int mpi_dest    = comm->ep_comm_ptr->intercomm->inter_rank_map->at(dest_remote_ep_rank).second; 
    244244      int mpi_tag = tag_combine(tag, ep_src_loc, ep_dest_loc); 
    245245 
     
    328328      int inter_src = comm->ep_comm_ptr->intercomm->local_rank_map->at(src_ep_rank).first; 
    329329      int ep_src_loc = comm->ep_rank_map->at(inter_src).first; 
    330       int ep_dest_loc = comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(dest_remote_ep_rank).first; 
    331       int mpi_dest    = comm->ep_comm_ptr->intercomm->intercomm_rank_map->at(dest_remote_ep_rank).second; 
     330      int ep_dest_loc = comm->ep_comm_ptr->intercomm->inter_rank_map->at(dest_remote_ep_rank).first; 
     331      int mpi_dest    = comm->ep_comm_ptr->intercomm->inter_rank_map->at(dest_remote_ep_rank).second; 
    332332      int mpi_tag = tag_combine(tag, ep_src_loc, ep_dest_loc); 
    333333 
Note: See TracChangeset for help on using the changeset viewer.