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

save dev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.