41 #ifndef REPASTPROCESS_H_
42 #define REPASTPROCESS_H_
50 #include <boost/mpi/communicator.hpp>
51 #include <boost/lexical_cast.hpp>
52 #include <boost/unordered_set.hpp>
53 #include <boost/noncopyable.hpp>
54 #include <boost/ptr_container/ptr_list.hpp>
55 #include <boost/serialization/utility.hpp>
56 #include <boost/serialization/map.hpp>
60 #include "SharedContext.h"
61 #include "AgentRequest.h"
62 #include "AgentStatus.h"
63 #include "mpi_constants.h"
64 #include "SRManager.h"
65 #include "RepastErrors.h"
66 #include "AgentImporterExporter.h"
67 #include "CartesianTopology.h"
70 #include "Utilities.h"
98 template<
typename Content>
101 friend class boost::serialization::access;
104 std::vector<Content>* agentContentPtr;
105 std::map<std::string, std::vector<ProjectionInfoPacket*> >* projectionInfoPtr;
108 agentContentPtr(0), projectionInfoPtr(0) {
112 std::map<std::string, std::vector<ProjectionInfoPacket*> >* projectionInfo) :
113 agentContentPtr(agentContent), projectionInfoPtr(projectionInfo) {
117 delete agentContentPtr;
120 if (projectionInfoPtr != 0) {
121 for (std::map<std::string, std::vector<ProjectionInfoPacket*> >::iterator
122 iter = projectionInfoPtr->begin(), iterEnd =
123 projectionInfoPtr->end(); iter != iterEnd; ++iter) {
124 for (std::vector<ProjectionInfoPacket*>::iterator PIPIter =
125 iter->second.begin(), PIPIterEnd = iter->second.end();
126 PIPIter != PIPIterEnd; ++PIPIter) {
131 delete projectionInfoPtr;
132 projectionInfoPtr = 0;
136 template<
class Archive>
137 void serialize(Archive& ar,
const unsigned int version) {
138 ar & agentContentPtr;
139 ar & projectionInfoPtr;
154 template<
typename Content>
157 friend class boost::serialization::access;
160 std::vector<Content>* agentContentPtr;
161 std::map<std::string, std::vector<ProjectionInfoPacket*> >* projectionInfoPtr;
162 std::set<AgentId>* secondaryIdsPtr;
163 AgentExporterInfo* exporterInfoPtr;
166 agentContentPtr(0), projectionInfoPtr(0), secondaryIdsPtr(0), exporterInfoPtr(
171 std::map<std::string, std::vector<ProjectionInfoPacket*> >* projectionInfo,
172 std::set<AgentId>* secondaryIds, AgentExporterInfo* exporterInfo) :
173 agentContentPtr(agentContent), projectionInfoPtr(projectionInfo), secondaryIdsPtr(
174 secondaryIds), exporterInfoPtr(exporterInfo) {
178 delete agentContentPtr;
181 if (projectionInfoPtr != 0) {
182 for (std::map<std::string, std::vector<ProjectionInfoPacket*> >::iterator
183 iter = projectionInfoPtr->begin(), iterEnd =
184 projectionInfoPtr->end(); iter != iterEnd; ++iter) {
185 for (std::vector<ProjectionInfoPacket*>::iterator PIPIter =
186 iter->second.begin(), PIPIterEnd = iter->second.end();
187 PIPIter != PIPIterEnd; ++PIPIter) {
192 delete projectionInfoPtr;
193 projectionInfoPtr = 0;
195 delete secondaryIdsPtr;
212 delete exporterInfoPtr;
217 template<
class Archive>
218 void serialize(Archive& ar,
const unsigned int version) {
219 ar & agentContentPtr;
220 ar & projectionInfoPtr;
221 ar & secondaryIdsPtr;
222 ar & exporterInfoPtr;
235 enum EXCHANGE_PATTERN {
236 POLL, USE_CURRENT, USE_LAST_OR_POLL, USE_LAST_OR_USE_CURRENT
241 typedef boost::unordered_set<AgentId, HashId> MovedAgentSetType;
245 boost::mpi::communicator* world;
250 #ifndef SHARE_AGENTS_BY_SET
261 std::map<int, std::vector<AgentRequest>*> importers;
262 MovedAgentSetType movedAgents;
265 #ifndef SHARE_AGENTS_BY_SET
268 void initiateAgentRequest(
AgentRequest& requests, std::string setName =
269 DEFAULT_AGENT_REQUEST_SET, AGENT_IMPORTER_EXPORTER_TYPE setType =
270 DEFAULT_ENUM_SYMBOL);
273 std::vector<int>* procsToSendProjInfoTo;
274 std::vector<int>* procsToRecvProjInfoFrom;
276 std::vector<int>* procsToSendAgentStatusInfoTo;
277 std::vector<int>* procsToRecvAgentStatusInfoFrom;
279 std::vector<CartesianTopology*> cartesianTopologies;
284 void saveProjInfoSRProcs(std::vector<int>& sends, std::vector<int>& recvs) {
285 if (procsToSendProjInfoTo == NULL) {
286 procsToSendProjInfoTo =
new std::vector<int>;
287 procsToRecvProjInfoFrom =
new std::vector<int>;
289 procsToSendProjInfoTo->clear();
290 procsToRecvProjInfoFrom->clear();
292 procsToSendProjInfoTo->assign(sends.begin(), sends.end());
293 procsToRecvProjInfoFrom->assign(recvs.begin(), recvs.end());
296 void saveAgentStatusInfoSRProcs(std::vector<int>& sends,
297 std::vector<int>& recvs) {
298 if (procsToSendAgentStatusInfoTo == NULL) {
299 procsToSendAgentStatusInfoTo =
new std::vector<int>;
300 procsToRecvAgentStatusInfoFrom =
new std::vector<int>;
302 procsToSendAgentStatusInfoTo->clear();
303 procsToRecvAgentStatusInfoFrom->clear();
305 procsToSendAgentStatusInfoTo->assign(sends.begin(), sends.end());
306 procsToRecvAgentStatusInfoFrom->assign(recvs.begin(), recvs.end());
320 boost::mpi::communicator* comm = 0,
int maxConfigFileSize =
321 MAX_CONFIG_FILE_SIZE);
330 static boost::mpi::communicator* communicator();
405 boost::mpi::communicator* getCommunicator() {
410 CartesianTopology* getCartesianTopology(std::vector<int> processesPerDim,
bool spaceIsPeriodic);
413 #ifdef SHARE_AGENTS_BY_SET
414 void dropImporterExporterSet(std::string setName) {
415 importer_exporter->dropSet(setName);
419 std::string ImporterExporterVersion() {
420 return "" + importer_exporter->
version();
423 std::string ImporterExporterReport() {
443 template<
typename T,
typename Content,
typename Provider,
typename Updater,
444 typename AgentCreator>
445 void requestAgents(SharedContext<T>& context, AgentRequest& request,
446 Provider& provider, Updater& updater, AgentCreator& creator
447 #ifdef SHARE_AGENTS_BY_SET
448 , std::string setName = DEFAULT_AGENT_REQUEST_SET,
449 AGENT_IMPORTER_EXPORTER_TYPE setType = DEFAULT_ENUM_SYMBOL
457 template<
typename Content,
typename Prov
ider,
typename Updater>
459 #ifdef SHARE_AGENTS_BY_SET
460 , std::string setName = REQUEST_AGENTS_ALL
467 template<
typename T,
typename Content,
typename Provider,
typename Updater,
468 typename AgentCreator>
470 Provider& provider, Updater& updater, AgentCreator& creator,
471 EXCHANGE_PATTERN exchangePattern = POLL
472 #ifdef SHARE_AGENTS_BY_SET
473 ,
bool declareNoAgentsKeptOnAnyProcess =
false
493 template<
typename T,
typename Content,
typename Provider,
494 typename AgentCreator,
typename Updater>
496 Updater& updater, AgentCreator& creator,
497 EXCHANGE_PATTERN exchangePattern = POLL);
522 template<
typename T,
typename Content,
typename Provider,
typename Updater,
523 typename AgentCreator>
525 AgentRequest& request, Provider& provider, Updater& updater,
526 AgentCreator& creator
527 #ifdef SHARE_AGENTS_BY_SET
528 , std::string setName, AGENT_IMPORTER_EXPORTER_TYPE setType
533 #ifdef SHARE_AGENTS_BY_SET
534 initiateAgentRequest(request, setName, setType);
536 initiateAgentRequest(request);
540 #ifdef SHARE_AGENTS_BY_SET
541 const std::set<int>& exporters = importer_exporter->getExportingProcesses(
543 const std::map<int, AgentRequest>& agentsToExport =
544 importer_exporter->getAgentsToExport(setName);
546 const std::set<int>& exporters = importer_exporter->getExportingProcesses();
547 const std::map<int, AgentRequest>& agentsToExport = importer_exporter->getAgentsToExport();
551 std::vector<boost::mpi::request> requests;
554 std::vector<Request_Packet<Content>*> toReceive;
556 for (std::set<int>::const_iterator iter = exporters.begin();
557 iter != exporters.end(); ++iter) {
560 requests.push_back(world->irecv(*iter, 23, *packet));
564 boost::ptr_list<Request_Packet<Content> >* toSend =
new boost::ptr_list<
567 for (std::map<int, AgentRequest>::const_iterator iter =
568 agentsToExport.begin(); iter != agentsToExport.end(); ++iter) {
571 std::vector<Content>* content =
new std::vector<Content>;
572 provider.provideContent(iter->second, *content);
575 std::map<std::string, std::vector<ProjectionInfoPacket*> >* projInfo =
576 new std::map<std::string,
577 std::vector<repast::ProjectionInfoPacket*> >;
583 requests.push_back(world->isend(iter->first, 23, *packet));
587 boost::mpi::wait_all(requests.begin(), requests.end());
594 toReceive.begin(), iterEnd = toReceive.end(); iter != iterEnd;
596 std::vector<Content>* content = (*iter)->agentContentPtr;
597 for (
typename std::vector<Content>::const_iterator contentIter =
598 content->begin(), contentIterEnd = content->end();
599 contentIter != contentIterEnd; ++contentIter) {
600 T* out = creator.createAgent(*contentIter);
601 T* inContext = context.
addAgent(out);
602 if (inContext != out) {
603 updater.updateAgent(*contentIter);
613 template<
typename Content,
typename Prov
ider,
typename Updater>
615 #ifdef SHARE_AGENTS_BY_SET
616 , std::string setName
621 #ifdef SHARE_AGENTS_BY_SET
622 const std::set<int>& processesToReceiveFrom =
623 importer_exporter->getExportingProcesses(setName);
624 const std::map<int, AgentRequest>& agentsToExport =
625 importer_exporter->getAgentsToExport(setName);
627 const std::set<int>& processesToReceiveFrom = importer_exporter->getExportingProcesses();
628 const std::map<int, AgentRequest>& agentsToExport = importer_exporter->getAgentsToExport();
632 std::vector<boost::mpi::request> requests;
635 std::vector<std::vector<Content>*> received;
636 for (std::set<int>::const_iterator iter = processesToReceiveFrom.begin(),
637 iterEnd = processesToReceiveFrom.end(); iter != iterEnd; ++iter) {
638 std::vector<Content>* content =
new std::vector<Content>();
639 requests.push_back(world->irecv(*iter, 47, *content));
640 received.push_back(content);
644 boost::ptr_list<std::vector<Content> >* toSend =
new boost::ptr_list<
645 std::vector<Content> >;
646 std::vector<Content>* content;
648 for (std::map<int, AgentRequest>::const_iterator iter =
649 agentsToExport.begin(), iterEnd = agentsToExport.end();
650 iter != iterEnd; ++iter) {
651 toSend->push_back(content =
new std::vector<Content>);
652 provider.provideContent(iter->second, *content);
653 requests.push_back(world->isend(iter->first, 47, *content));
657 boost::mpi::wait_all(requests.begin(), requests.end());
663 for (
typename std::vector<std::vector<Content>*>::iterator iter =
664 received.begin(), iterEnd = received.end(); iter != iterEnd;
667 for (
typename std::vector<Content>::const_iterator agentIter =
668 content->begin(), agentIterEnd = content->end();
669 agentIter != agentIterEnd; ++agentIter) {
670 updater.updateAgent(*agentIter);
677 template<
typename T,
typename Content,
typename Provider,
typename Updater,
678 typename AgentCreator>
680 Provider& provider, Updater& updater, AgentCreator& creator,
681 EXCHANGE_PATTERN exchangePattern
682 #ifdef SHARE_AGENTS_BY_SET
683 ,
bool declareNoAgentsKeptOnAnyProcess
688 std::set<AgentId> agentsToKeep;
690 bool agentsMayBeKept =
691 #ifdef SHARE_AGENTS_BY_SET
698 #ifdef SHARE_AGENTS_BY_SET
699 if (declareNoAgentsKeptOnAnyProcess) {
700 importer_exporter->clear();
702 importer_exporter->getSetOfAgentsBeingImported(agentsToKeep,
703 DEFAULT_AGENT_REQUEST_SET);
704 importer_exporter->clear(DEFAULT_AGENT_REQUEST_SET);
707 importer_exporter->clear();
711 std::set<AgentId> agentsToDrop;
715 std::set<AgentId>::iterator dropIter = agentsToDrop.begin(), dropIterEnd =
717 while (dropIter != dropIterEnd) {
724 context.cleanProjectionInfo(agentsToKeep);
727 if (agentsMayBeKept) {
729 for (std::set<AgentId>::iterator iter = agentsToKeep.begin(), iterEnd =
730 agentsToKeep.end(); iter != iterEnd; ++iter) {
733 initiateAgentRequest(req);
737 std::map<int, std::set<AgentId> > agentsToPush;
738 context.getAgentsToPushToOtherProcesses(agentsToPush);
741 std::vector<AgentRequest> requests;
742 for (std::map<
int, std::set<AgentId> >::iterator iter =
743 agentsToPush.begin(), iterEnd = agentsToPush.end(); iter != iterEnd;
746 for (std::set<AgentId>::iterator i = iter->second.begin(), iEnd =
747 iter->second.end(); i != iEnd; i++)
749 requests.push_back(req);
752 #ifdef SHARE_AGENTS_BY_SET
753 importer_exporter->registerIncomingRequests(requests,
754 DEFAULT_AGENT_REQUEST_SET);
756 importer_exporter->registerIncomingRequests(requests);
761 #ifdef SHARE_AGENTS_BY_SET
762 const std::map<int, AgentRequest>& tmpAgentsToExport =
763 importer_exporter->getAgentsToExport(DEFAULT_AGENT_REQUEST_SET);
765 const std::map<int, AgentRequest>& tmpAgentsToExport = importer_exporter->getAgentsToExport();
768 std::map<int, AgentRequest> agentsToExport = tmpAgentsToExport;
770 std::vector<int> psToSendTo;
771 std::vector<int> psToReceiveFrom;
772 if (exchangePattern == USE_CURRENT
773 || ((exchangePattern == USE_LAST_OR_USE_CURRENT)
774 && (procsToSendProjInfoTo == NULL))) {
775 std::set<int> sends, recvs;
776 context.getProjInfoExchangePartners(sends, recvs);
777 psToSendTo.assign(sends.begin(), sends.end());
778 psToReceiveFrom.assign(recvs.begin(), recvs.end());
780 for (std::vector<int>::iterator iter = psToSendTo.begin(), iterEnd =
781 psToSendTo.end(); iter != iterEnd; ++iter) {
783 if (agentsToExport.find(dest) == agentsToExport.end()) {
785 agentsToExport[dest] = dummy;
788 }
else if (exchangePattern == POLL
789 || ((exchangePattern == USE_LAST_OR_POLL)
790 && (procsToSendProjInfoTo == NULL))) {
791 for (std::map<int, AgentRequest>::const_iterator iter =
792 agentsToExport.begin(), iterEnd = agentsToExport.end();
793 iter != iterEnd; ++iter) {
794 psToSendTo.push_back(iter->first);
798 AGENT_MOVED_SENDERS);
800 psToSendTo.assign(procsToSendProjInfoTo->begin(),
801 procsToSendProjInfoTo->end());
802 psToReceiveFrom.assign(procsToRecvProjInfoFrom->begin(),
803 procsToRecvProjInfoFrom->end());
806 for (std::vector<int>::iterator iter = psToSendTo.begin(), iterEnd =
807 psToSendTo.end(); iter != iterEnd; ++iter) {
809 if (agentsToExport.find(dest) == agentsToExport.end()) {
811 agentsToExport[dest] = dummy;
816 saveProjInfoSRProcs(psToSendTo, psToReceiveFrom);
819 std::vector<boost::mpi::request> MPIRequests;
822 std::map<int, Request_Packet<Content>*> toReceive;
824 for (std::vector<int>::iterator iter = psToReceiveFrom.begin(), iterEnd =
825 psToReceiveFrom.end(); iter != iterEnd; ++iter) {
828 MPIRequests.push_back(world->irecv(*iter, 23, *packet));
832 boost::ptr_list<Request_Packet<Content> >* toSend =
new boost::ptr_list<
835 for (std::map<int, AgentRequest>::const_iterator iter =
836 agentsToExport.begin(), iterEnd = agentsToExport.end();
837 iter != iterEnd; ++iter) {
838 int dest = iter->first;
842 std::vector<Content>* contentVector =
new std::vector<Content>;
843 provider.provideContent(rq, *contentVector);
846 std::map<std::string, std::vector<ProjectionInfoPacket*> >* projInfo =
847 new std::map<std::string,
848 std::vector<repast::ProjectionInfoPacket*> >;
854 MPIRequests.push_back(world->isend(dest, 23, *packet));
858 boost::mpi::wait_all(MPIRequests.begin(), MPIRequests.end());
865 toReceive.begin(), iterEnd = toReceive.end(); iter != iterEnd;
867 std::vector<Content>* contentVector = iter->second->agentContentPtr;
869 for (
typename std::vector<Content>::const_iterator contentIter =
870 contentVector->begin(), contentIterEnd = contentVector->end();
871 contentIter != contentIterEnd; ++contentIter) {
872 T* newAgent = creator.createAgent(*contentIter);
873 T* agentInContext = context.
addAgent(newAgent);
874 if (agentInContext != newAgent) {
875 updater.updateAgent(*contentIter);
879 requestToRegister.
addRequest(agentInContext->getId());
886 importer_exporter->registerOutgoingRequests(requestToRegister);
890 template<
typename T,
typename Content,
typename Provider,
typename AgentCreator,
893 Provider& provider, Updater& updater, AgentCreator& creator,
894 EXCHANGE_PATTERN exchangePattern) {
902 std::vector<std::vector<AgentStatus>*> statusUpdates;
905 for (
size_t i = 0, n = statusUpdates.size(); i < n; i++) {
906 std::vector<AgentStatus>* vec = statusUpdates[i];
907 for (
size_t j = 0, k = vec->size(); j < k; ++j) {
909 if (status.
getStatus() == AgentStatus::REMOVED) {
910 importer_exporter->importedAgentIsRemoved(status.
getOldId());
912 }
else if (status.
getStatus() == AgentStatus::MOVED) {
916 importer_exporter->importedAgentIsMoved(status.
getOldId(),
920 importer_exporter->importedAgentIsNowLocal(
928 if (agent == (
void*) 0)
929 throw Repast_Error_32<AgentId>(status.
getOldId());
940 std::set<AgentId> agentsToDrop;
941 std::set<int> psMovedTo;
942 std::map<int, AgentRequest> agentRequests;
948 for (MovedAgentSetType::const_iterator iter = movedAgents.begin(), iterEnd =
949 movedAgents.end(); iter != iterEnd; ++iter) {
951 context.
getAgent(
id)->getId().currentRank(
id.currentRank());
952 agentsToDrop.insert(
id);
953 int currentProc =
id.currentRank();
954 if (psMovedTo.insert(currentProc).second) {
957 agentRequests[currentProc] = req;
959 agentRequests[currentProc].addRequest(
id);
979 std::vector<int> psToSendTo;
980 std::vector<int> psToReceiveFrom;
982 if (exchangePattern == USE_CURRENT
983 || ((exchangePattern == USE_LAST_OR_USE_CURRENT)
984 && (procsToSendAgentStatusInfoTo == NULL))) {
985 std::set<int> sends, recvs;
986 context.getAgentStatusInfoExchangePartners(sends, recvs);
987 psToSendTo.assign(sends.begin(), sends.end());
988 psToReceiveFrom.assign(recvs.begin(), recvs.end());
990 for (std::vector<int>::iterator iter = psToSendTo.begin(), iterEnd =
991 psToSendTo.end(); iter != iterEnd; ++iter) {
993 if (agentRequests.find(dest) == agentRequests.end()) {
995 agentRequests[dest] = dummy;
998 }
else if (exchangePattern == POLL
999 || ((exchangePattern == USE_LAST_OR_POLL)
1000 && (procsToSendAgentStatusInfoTo == NULL))) {
1001 for (std::map<int, AgentRequest>::const_iterator iter =
1002 agentRequests.begin(), iterEnd = agentRequests.end();
1003 iter != iterEnd; ++iter) {
1004 psToSendTo.push_back(iter->first);
1008 AGENT_MOVED_SENDERS);
1010 psToSendTo.assign(procsToSendAgentStatusInfoTo->begin(),
1011 procsToSendAgentStatusInfoTo->end());
1012 psToReceiveFrom.assign(procsToRecvAgentStatusInfoFrom->begin(),
1013 procsToRecvAgentStatusInfoFrom->end());
1016 for (std::vector<int>::iterator iter = psToSendTo.begin(), iterEnd =
1017 psToSendTo.end(); iter != iterEnd; ++iter) {
1019 if (agentRequests.find(dest) == agentRequests.end()) {
1021 agentRequests[dest] = dummy;
1026 saveAgentStatusInfoSRProcs(psToSendTo, psToReceiveFrom);
1029 bool sendSecondaryData = context.sendsSecondaryDataOnStatusExchange();
1032 std::vector<boost::mpi::request> requests;
1035 std::vector<SyncStatus_Packet<Content>*> packetsRecd;
1037 for (std::vector<int>::const_iterator iter = psToReceiveFrom.begin();
1038 iter != psToReceiveFrom.end(); ++iter) {
1043 world->irecv(source, AGENT_MOVED_AGENT, *packetToRecv));
1044 packetsRecd.push_back(packetToRecv);
1048 boost::ptr_list<SyncStatus_Packet<Content> >* packetsToSend =
1049 new boost::ptr_list<SyncStatus_Packet<Content> >;
1051 for (std::map<int, repast::AgentRequest>::iterator iter =
1052 agentRequests.begin(); iter != agentRequests.end(); ++iter) {
1054 std::vector<Content>* content =
new std::vector<Content>;
1055 provider.provideContent(iter->second, *content);
1058 std::map<std::string, std::vector<ProjectionInfoPacket*> >* projInfo =
1059 new std::map<std::string,
1060 std::vector<repast::ProjectionInfoPacket*> >;
1061 std::set<AgentId>* secondaryIds = (
1062 sendSecondaryData ?
new std::set<AgentId> : 0);
1067 if (secondaryIds != 0) {
1069 for (std::set<AgentId>::iterator sidIter = secondaryIds->begin(),
1070 sidIterEnd = secondaryIds->end(); sidIter != sidIterEnd;
1073 provider.provideContent(sidReq, *content);
1077 AgentExporterInfo* agentImporterInfoPtr =
1078 importer_exporter->getAgentExportInfo(iter->first);
1081 packetsToSend->push_back(
1083 secondaryIds, agentImporterInfoPtr));
1086 world->isend(iter->first, AGENT_MOVED_AGENT, *packetToSend));
1088 boost::mpi::wait_all(requests.begin(), requests.end());
1089 delete packetsToSend;
1091 importer_exporter->clearAgentExportInfo();
1094 std::set<AgentId> agentsToKeep;
1098 for (std::set<AgentId>::iterator idIter = agentsToDrop.begin(), idIterEnd =
1099 agentsToDrop.end(); idIter != idIterEnd; ++idIter)
1103 typename std::vector<SyncStatus_Packet<Content>*>::iterator packetIter;
1104 typename std::vector<SyncStatus_Packet<Content>*>::iterator packetIterEnd =
1107 for (packetIter = packetsRecd.begin(); packetIter != packetIterEnd;
1109 std::vector<Content>* content = (*packetIter)->agentContentPtr;
1110 typename std::vector<Content>::iterator contentIter = content->begin();
1111 while (contentIter != content->end()) {
1112 T* out = creator.createAgent(*contentIter);
1113 T* inContext = context.
addAgent(out);
1114 if (inContext != out) {
1117 if (inContext->getId().currentRank() != rank_) {
1122 if (out->getId().currentRank() == rank_) {
1123 updater.updateAgent(*contentIter);
1124 inContext->getId().currentRank(rank_);
1132 if (out->getId().currentRank() != rank_)
1133 secondaryAgentsToRequest.
addRequest(out->getId());
1139 importer_exporter->incorporateAgentExporterInfo(
1140 *((*packetIter)->exporterInfoPtr));
1141 importer_exporter->clearExportToSpecificProc(rank_);
1146 if (sendSecondaryData)
1147 initiateAgentRequest(secondaryAgentsToRequest);
1150 for (packetIter = packetsRecd.begin(); packetIter != packetIterEnd;
1153 delete (*packetIter)->deleteExporterInfo();