[2236] | 1 | #include "grid_client_server_remote_connector.hpp" |
---|
| 2 | |
---|
| 3 | namespace xios |
---|
| 4 | { |
---|
| 5 | /** |
---|
| 6 | * \brief class constructor. |
---|
| 7 | * \param srcView List of sources views. |
---|
| 8 | * \param dstView List of remotes views. |
---|
| 9 | * \param localComm Local MPI communicator |
---|
| 10 | * \param remoteSize Size of the remote communicator |
---|
| 11 | */ |
---|
[2267] | 12 | CGridClientServerRemoteConnector::CGridClientServerRemoteConnector( vector<shared_ptr<CLocalView> >& srcFullView, vector<shared_ptr<CLocalView>>& srcWorkflowView, |
---|
| 13 | vector<shared_ptr<CDistributedView>>& dstView, MPI_Comm localComm, int remoteSize) |
---|
[2236] | 14 | : CGridRemoteConnector(srcFullView, dstView, localComm, remoteSize) , srcWorkflowView_(srcWorkflowView) |
---|
| 15 | {} |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | void CGridClientServerRemoteConnector::computeConnector(void) |
---|
| 19 | { |
---|
[2267] | 20 | auto workflowRemoteConnector=make_shared<CGridRemoteConnector>(srcWorkflowView_,dstView_,localComm_,remoteSize_) ; |
---|
| 21 | workflowRemoteConnector->computeConnector() ; |
---|
[2236] | 22 | computeViewDistribution() ; |
---|
| 23 | |
---|
[2267] | 24 | for(int i=0;i<srcView_.size();i++) isSrcViewDistributed_[i] = isSrcViewDistributed_[i] || workflowRemoteConnector->getIsSrcViewDistributed()[i] ; |
---|
[2236] | 25 | computeConnectorMethods() ; |
---|
| 26 | computeRedondantRanks() ; |
---|
| 27 | |
---|
| 28 | for(auto& rank : rankToRemove_) |
---|
[2267] | 29 | if (workflowRemoteConnector->getRankToRemove().count(rank)!=0) |
---|
[2236] | 30 | for(auto& element : elements_) element.erase(rank) ; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | } |
---|