Ignore:
Timestamp:
05/29/18 13:12:21 (6 years ago)
Author:
yushan
Message:

mpi_comm_split respect the norme of MPI: ranking according to the key argument. Key can be the same. In such case, the original ranking is used.

File:
1 edited

Legend:

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

    r1504 r1506  
    686686    MPI_Comm_size(comm, &size); 
    687687 
    688     //int color = rank%2; 
    689     int tab_color[16]={2,2,2,3,0,1,1,3,2,1,3,0,0,2,0,0}; 
    690     int tab_key[16]={3,11,10,5,6,8,15,7,2,1,9,13,4,14,12,0}; 
     688    //int tab_color[16]={2,2,2,3,0,1,1,3,2,1,3,0,0,2,0,0};     // OK 
     689    //int tab_key[16]={3,11,10,5,6,8,15,7,2,1,9,13,4,14,12,0}; // OK  
     690     
     691 
     692    int tab_color[16]={2,2,1,1,1,1,0,1,1,1,0,1,1,1,2,0}; 
     693    //int tab_key[16]={3,11,12,4,6,15,10,5,2,8,14,7,13,9,1,0}; 
     694    int tab_key[16]={3,11,7,7,6,15,10,5,2,8,14,7,13,9,1,0}; 
     695     
    691696    int color = tab_color[rank]; 
    692697    int key = tab_key[rank]; 
     
    700705    MPI_Comm_rank(split_comm, &split_rank); 
    701706     
    702     printf("rank = %d, color = %d, key = %d, split_rank = %d\n", rank, color, key, split_rank); 
     707    printf("rank = %d, color = %d, key = %d, split_rank = %d, local_rank=%d\n", rank, color, key, split_rank, split_comm->ep_comm_ptr->size_rank_info[1].first); 
    703708 
    704709 
Note: See TracChangeset for help on using the changeset viewer.