Changeset 2551


Ignore:
Timestamp:
08/30/23 11:33:23 (9 months ago)
Author:
jderouillat
Message:

Add a test on the inter-communicator in ContextClient? and ContextServer? constructor

Location:
XIOS3/trunk/src/transport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/transport/context_client.cpp

    r2547 r2551  
    3939      MPI_Comm_size(intraComm, &clientSize); 
    4040 
    41       int flag; 
    42        
    43       MPI_Comm_remote_size(interComm, &serverSize); 
     41      int flag;       
     42      MPI_Comm_test_inter(interComm, &flag); 
     43      if (flag) MPI_Comm_remote_size(interComm, &serverSize); 
     44      else  MPI_Comm_size(interComm, &serverSize); 
    4445       
    4546      computeLeader(clientRank, clientSize, serverSize, ranksServerLeader, ranksServerNotLeader); 
  • XIOS3/trunk/src/transport/context_server.cpp

    r2547 r2551  
    4444 
    4545    interComm=interComm_; 
    46     MPI_Comm_remote_size(interComm,&clientSize_); 
     46    int flag; 
     47    MPI_Comm_test_inter(interComm,&flag); 
     48    if (flag) MPI_Comm_remote_size(interComm,&clientSize_); 
     49    else MPI_Comm_size(interComm,&clientSize_); 
    4750     
    4851    SRegisterContextInfo contextInfo ; 
Note: See TracChangeset for help on using the changeset viewer.