Changeset 1787


Ignore:
Timestamp:
12/13/19 17:55:14 (2 years ago)
Author:
ymipsl
Message:

More cleaning : replace contextClient rank and size by context rank and size.
Because for couling it will have more than one contextClient.

YM

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp

    r1784 r1787  
    9393      // A condition to make sure that if there is only one client, axis 
    9494      // should be considered to be distributed. This should be a temporary solution      
    95       distributed |= (1 == CContext::getCurrent()->client->clientSize); 
     95      distributed |= (1 == CContext::getCurrent()->intraCommSize_); 
    9696      return distributed; 
    9797   } 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp

    r1784 r1787  
    227227              (!i_index.isEmpty() && i_index.numElements() == ni_glo*nj_glo)); 
    228228      bool distributed_glo ; 
    229       distributed |= (1 == CContext::getCurrent()->client->clientSize); 
     229      distributed |= (1 == CContext::getCurrent()->intraCommSize_); 
    230230 
    231231      return distributed; 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp

    r1784 r1787  
    13521352    CContext* context = CContext::getCurrent();     
    13531353    { 
    1354       CContextClient* client = context->client; 
    1355  
    1356       int rank = client->clientRank; 
     1354      int rank = context->intraCommRank_; 
    13571355 
    13581356      clientDistribution_ = new CDistributionClient(rank, this); 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm_interpolate.cpp

    r1785 r1787  
    562562{ 
    563563  CContext* context = CContext::getCurrent(); 
    564   CContextClient* client=context->client; 
    565   int clientRank = client->clientRank; 
     564  int clientRank = context->intraCommRank_; 
     565  int nbClient = context-> intraCommSize_; 
    566566 
    567567  this->transformationMapping_.resize(1); 
     
    587587 
    588588  CClientServerMappingDistributed domainIndexClientClientMapping(globalIndexOfDomainDest, 
    589                                                                  client->intraComm, 
     589                                                                 context->intraComm_, 
    590590                                                                 true); 
    591591  CArray<size_t,1> globalIndexInterp(interpMapValue.size()); 
     
    599599  } 
    600600 
    601   domainIndexClientClientMapping.computeServerIndexMapping(globalIndexInterp, client->clientSize); 
     601  domainIndexClientClientMapping.computeServerIndexMapping(globalIndexInterp, nbClient); 
    602602  const CClientServerMapping::GlobalIndexMap& globalIndexInterpSendToClient = domainIndexClientClientMapping.getGlobalIndexOnServer(); 
    603603 
    604604  //Inform each client number of index they will receive 
    605   int nbClient = client->clientSize; 
    606605  int* sendBuff = new int[nbClient]; 
    607606  int* recvBuff = new int[nbClient]; 
     
    628627 
    629628 
    630   MPI_Allreduce(sendBuff, recvBuff, nbClient, MPI_INT, MPI_SUM, client->intraComm); 
     629  MPI_Allreduce(sendBuff, recvBuff, nbClient, MPI_INT, MPI_SUM, context->intraComm_); 
    631630 
    632631  int* sendIndexDestBuff = new int [sendBuffSize]; 
     
    661660             itMap->first, 
    662661             MPI_DOMAIN_INTERPOLATION_DEST_INDEX, 
    663              client->intraComm, 
     662             context->intraComm_, 
    664663             &sendRequest.back()); 
    665664    sendRequest.push_back(MPI_Request()); 
     
    669668             itMap->first, 
    670669             MPI_DOMAIN_INTERPOLATION_SRC_INDEX, 
    671              client->intraComm, 
     670             context->intraComm_, 
    672671             &sendRequest.back()); 
    673672    sendRequest.push_back(MPI_Request()); 
     
    677676             itMap->first, 
    678677             MPI_DOMAIN_INTERPOLATION_WEIGHT, 
    679              client->intraComm, 
     678             context->intraComm_, 
    680679             &sendRequest.back()); 
    681680    sendOffSet += k; 
     
    696695             MPI_ANY_SOURCE, 
    697696             MPI_DOMAIN_INTERPOLATION_DEST_INDEX, 
    698              client->intraComm, 
     697             context->intraComm_, 
    699698             &recvStatus); 
    700699 
     
    708707             clientSrcRank, 
    709708             MPI_DOMAIN_INTERPOLATION_SRC_INDEX, 
    710              client->intraComm, 
     709             context->intraComm_, 
    711710             &recvStatus); 
    712711 
     
    716715             clientSrcRank, 
    717716             MPI_DOMAIN_INTERPOLATION_WEIGHT, 
    718              client->intraComm, 
     717             context->intraComm_, 
    719718             &recvStatus); 
    720719 
Note: See TracChangeset for help on using the changeset viewer.