38 #ifndef AGENTIMPORTEREXPORTER_H_
39 #define AGENTIMPORTEREXPORTER_H_
45 #include "AgentRequest.h"
47 #include "AgentStatus.h"
48 #include "mpi_constants.h"
68 #define SHARE_AGENTS_BY_SET
81 #ifndef DEFAULT_IMPORTER_EXPORTER
82 #define DEFAULT_IMPORTER_EXPORTER 4
85 #if DEFAULT_IMPORTER_EXPORTER < 1 || DEFAULT_IMPORTER_EXPORTER > 5
86 #error "Invalid value used for default Importer_Exporter"
92 #ifndef SHARE_AGENTS_BY_SET
94 #if DEFAULT_IMPORTER_EXPORTER != 1 && !defined OMIT_IMPORTER_EXPORTER_COUNT_LIST
95 #define OMIT_IMPORTER_EXPORTER_COUNT_LIST
98 #if DEFAULT_IMPORTER_EXPORTER != 2 && !defined OMIT_IMPORTER_EXPORTER_COUNT_SET
99 #define OMIT_IMPORTER_EXPORTER_COUNT_SET
102 #if DEFAULT_IMPORTER_EXPORTER != 3 && !defined OMIT_IMPORTER_EXPORTER_LIST
103 #define OMIT_IMPORTER_EXPORTER_LIST
106 #if DEFAULT_IMPORTER_EXPORTER != 4 && !defined OMIT_IMPORTER_EXPORTER_SET
107 #define OMIT_IMPORTER_EXPORTER_SET
110 #if DEFAULT_IMPORTER_EXPORTER != 5 && !defined OMIT_IMPORTER_EXPORTER_MAP_int
111 #define OMIT_IMPORTER_EXPORTER_MAP_int
120 #if DEFAULT_IMPORTER_EXPORTER == 1
121 #define DEFAULT_IMPORTER_EXPORTER_CLASS ImporterExporter_COUNT_LIST
122 #define DEFAULT_ENUM_SYMBOL COUNT_LIST
123 #undef OMIT_IMPORTER_EXPORTER_COUNT_LIST
126 #if DEFAULT_IMPORTER_EXPORTER == 2
127 #define DEFAULT_IMPORTER_EXPORTER_CLASS ImporterExporter_COUNT_SET
128 #define DEFAULT_ENUM_SYMBOL COUNT_SET
129 #undef OMIT_IMPORTER_EXPORTER_COUNT_SET
132 #if DEFAULT_IMPORTER_EXPORTER == 3
133 #define DEFAULT_IMPORTER_EXPORTER_CLASS ImporterExporter_LIST
134 #define DEFAULT_ENUM_SYMBOL LIST
135 #undef OMIT_IMPORTER_EXPORTER_LIST
138 #if DEFAULT_IMPORTER_EXPORTER == 4
139 #define DEFAULT_IMPORTER_EXPORTER_CLASS ImporterExporter_SET
140 #define DEFAULT_ENUM_SYMBOL SET
141 #undef OMIT_IMPORTER_EXPORTER_SET
144 #if DEFAULT_IMPORTER_EXPORTER == 5
145 #define DEFAULT_IMPORTER_EXPORTER_CLASS ImporterExporter_MAP_int
146 #define DEFAULT_ENUM_SYMBOL MAP_int
147 #undef OMIT_IMPORTER_EXPORTER_MAP_int
152 #ifdef SHARE_AGENTS_BY_SET
155 enum AGENT_IMPORTER_EXPORTER_TYPE{ DEFAULT_ENUM_SYMBOL
156 #if !defined OMIT_IMPORTER_EXPORTER_COUNT_LIST && DEFAULT_IMPORTER_EXPORTER != 1
159 #if !defined OMIT_IMPORTER_EXPORTER_COUNT_SET && DEFAULT_IMPORTER_EXPORTER != 2
162 #if !defined OMIT_IMPORTER_EXPORTER_LIST && DEFAULT_IMPORTER_EXPORTER != 3
165 #if !defined OMIT_IMPORTER_EXPORTER_SET && DEFAULT_IMPORTER_EXPORTER != 4
168 #if !defined OMIT_IMPORTER_EXPORTER_MAP_int && DEFAULT_IMPORTER_EXPORTER != 5
173 #define DEFAULT_AGENT_REQUEST_SET "__Default_Agent_Request_Set__"
180 #define REQUEST_AGENTS_ALL "AGENTS_FROM_ALL_IMPORTER_EXPORTERS"
186 #ifndef SHARE_AGENTS_BY_SET
187 typedef std::map<int, AgentRequest*> AgentExporterInfo;
189 typedef std::map<std::string, std::map<int, AgentRequest*>* > AgentExporterInfo;
201 AgentExporterInfo empty;
202 std::map<int, AgentExporterInfo* > data;
204 #ifdef SHARE_AGENTS_BY_SET
205 std::string selectedSet;
217 void addData(
const AgentId&
id,
const int destProc,
const int sourceProc,
218 const int numberOfCopies = 1);
238 #ifdef SHARE_AGENTS_BY_SET
254 #ifdef ALLOW_FULL_AGENT_REQUEST_CANCELLATION
260 void markIdAsFullCancellation(
AgentId&
id){
261 id.currentRank(((-1) *
id.currentRank()) - 1);
274 bool checkForFullCancellation(AgentId&
id){
275 if(
id.currentRank() < 0){
276 id.currentRank((
id.currentRank() + 1) * (-1));
298 std::set<int> exportingProcesses;
345 virtual void getSetOfAgentsBeingImported(std::set<AgentId>& set) = 0;
347 virtual void clear(){
348 exportingProcesses.clear();
353 #if !defined OMIT_IMPORTER_EXPORTER_COUNT_LIST || \
354 !defined OMIT_IMPORTER_EXPORTER_COUNT_SET
367 std::map<int, int> sources;
368 void incrementCount(
int sourceProcess);
369 void decrementCount(
int sourceProcess);
380 virtual void getSetOfAgentsBeingImported(std::set<AgentId>& set);
384 #ifndef OMIT_IMPORTER_EXPORTER_LIST
403 std::map<int, std::list<AgentId>* > sources;
409 inline std::list<AgentId>* getRecord(
int rank);
414 inline int removeAll(
const AgentId&
id, std::list<AgentId>* record,
int rank);
417 inline void removeID(
AgentId&
id, std::list<AgentId>* record,
int rank);
421 inline void removeID(std::list<AgentId>::iterator idPosition, std::list<AgentId>* record,
int rank);
425 inline void checkRecord(std::list<AgentId>* record,
int rank);
436 virtual void getSetOfAgentsBeingImported(std::set<AgentId>& set);
438 virtual void clear(){
439 AbstractImporter::clear();
446 #ifndef OMIT_IMPORTER_EXPORTER_SET
460 std::map<int, std::set<AgentId>* > sources;
467 inline std::set<AgentId>* getRecord(
int rank);
473 inline int removeID(
const AgentId&
id, std::set<AgentId>* record,
int rank);
477 inline void checkRecord(std::set<AgentId>* record,
int rank);
488 virtual void getSetOfAgentsBeingImported(std::set<AgentId>& set);
489 virtual void clear(){
490 AbstractImporter::clear();
497 #ifndef OMIT_IMPORTER_EXPORTER_MAP_int
512 std::map<int, std::map<AgentId, int>* > sources;
519 std::map<AgentId, int>* getRecord(
int rank);
524 inline int removeAll(
const AgentId&
id, std::map<AgentId, int>* record,
int rank);
530 inline int removeID(
const AgentId&
id, std::map<AgentId, int>* record,
int rank);
535 inline void removeID(std::map<AgentId, int>::iterator idPosition, std::map<AgentId, int>* record,
int rank);
538 inline void checkRecord(std::map<AgentId, int>* record,
int rank);
550 virtual void getSetOfAgentsBeingImported(std::set<AgentId>& set);
552 virtual void clear(){
553 AbstractImporter::clear();
570 static std::vector<AgentStatus> emptyStatus;
585 typedef std::map<int, std::set<AgentStatus> > StatusMap;
588 StatusMap* outgoingStatusChangesDeletePtr;
592 StatusMap* outgoingStatusChanges;
595 std::set<int> processesExportedTo;
596 std::map<int, AgentRequest> exportedMap;
678 #ifdef SHARE_AGENTS_BY_SET
688 virtual void clear(){
689 outgoingStatusChanges->clear();
690 outgoingAgentExporterInformation->
clear();
692 processesExportedTo.clear();
696 virtual void clearExportToSpecificProc(
int rank){
697 processesExportedTo.erase(rank);
698 exportedMap.erase(rank);
704 #if !defined OMIT_IMPORTER_EXPORTER_COUNT_LIST || \
705 !defined OMIT_IMPORTER_EXPORTER_LIST || \
706 !defined OMIT_IMPORTER_EXPORTER_SET || \
707 !defined OMIT_IMPORTER_EXPORTER_MAP_int
726 #ifdef SHARE_AGENTS_BY_SET
736 #ifndef OMIT_IMPORTER_EXPORTER_COUNT_SET
754 #ifdef SHARE_AGENTS_BY_SET
790 virtual void getSetOfAgentsBeingImported(std::set<AgentId>& set){ importer->getSetOfAgentsBeingImported(set); }
792 virtual const AbstractExporter::StatusMap* getOutgoingStatusChanges();
795 virtual void registerIncomingRequests(std::vector<AgentRequest>& requests){ exporter->
registerIncomingRequests(requests); }
797 virtual void agentMoved(
const AgentId&
id,
int process){ exporter->
agentMoved(
id, process); }
800 virtual AgentExporterInfo* getAgentExportInfo(
int destProc){
return exporter->
getAgentExportInfo(destProc); }
802 virtual const std::map<int, AgentRequest>& getAgentsToExport(){
return exporter->
getAgentsToExport(); }
809 virtual void exchangeAgentStatusUpdates(boost::mpi::communicator comm, std::vector<std::vector<AgentStatus>* >& statusUpdates);
816 virtual std::string
version() = 0;
823 virtual void clear(){
828 virtual void clearExporter(){
832 virtual void clearExportToSpecificProc(
int rank){
833 exporter->clearExportToSpecificProc(rank);
840 #ifndef OMIT_IMPORTER_EXPORTER_COUNT_LIST
851 #ifdef SHARE_AGENTS_BY_SET
862 #ifndef OMIT_IMPORTER_EXPORTER_COUNT_SET
872 #ifdef SHARE_AGENTS_BY_SET
882 #ifndef OMIT_IMPORTER_EXPORTER_LIST
893 #ifdef SHARE_AGENTS_BY_SET
903 #ifndef OMIT_IMPORTER_EXPORTER_SET
913 #ifdef SHARE_AGENTS_BY_SET
923 #ifndef OMIT_IMPORTER_EXPORTER_MAP_int
933 #ifdef SHARE_AGENTS_BY_SET
946 #ifdef SHARE_AGENTS_BY_SET
960 AbstractExporter::StatusMap* outgoingStatusChanges;
962 std::map<std::string, AbstractImporterExporter*> importersExportersMap;
963 std::set<int> exportingProcesses;
964 bool exportingProcessesIsDirty;
965 std::set<int> processesExportedTo;
966 bool processesExportedToIsDirty;
967 std::map<int, AgentRequest> exportedMap;
968 bool exportedMapIsDirty;
971 AGENT_IMPORTER_EXPORTER_TYPE setType = DEFAULT_ENUM_SYMBOL);
974 inline void rebuildExportingProcesses(
bool forceRebuild =
false);
976 inline void rebuildProcessesExportedTo(
bool forceRebuild =
false);
978 inline void rebuildExportedMap(
bool forceRebuild =
false);
988 virtual const std::set<int>& getExportingProcesses();
989 const std::set<int>& getExportingProcesses(std::string setName);
992 virtual void registerOutgoingRequests(
AgentRequest& request);
993 void registerOutgoingRequests(
AgentRequest& request, std::string setName,
994 AGENT_IMPORTER_EXPORTER_TYPE setType = DEFAULT_ENUM_SYMBOL);
996 virtual void importedAgentIsRemoved(
const AgentId&
id);
998 virtual void importedAgentIsMoved(
const AgentId&
id,
int newProcess);
1000 virtual void importedAgentIsNowLocal(
const AgentId&
id);
1005 virtual const AbstractExporter::StatusMap* getOutgoingStatusChanges();
1007 virtual const std::set<int>& getProcessesExportedTo();
1008 const std::set<int>& getProcessesExportedTo(std::string setName);
1010 virtual void registerIncomingRequests(std::vector<AgentRequest>& requests);
1011 void registerIncomingRequests(std::vector<AgentRequest>& requests, std::string setName);
1013 virtual void agentRemoved(
const AgentId&
id);
1014 virtual void agentMoved(
const AgentId&
id,
int newProcess);
1017 virtual void incorporateAgentExporterInfo(std::map<int, AgentRequest* > info);
1018 void incorporateAgentExporterInfo(std::map<std::string, std::map<int, AgentRequest*>*> info);
1020 virtual void clearStatusMap();
1022 virtual AgentExporterInfo* getAgentExportInfo(
int destProc);
1024 virtual void clearAgentExportInfo();
1026 virtual const std::map<int, AgentRequest>& getAgentsToExport();
1027 const std::map<int, AgentRequest>& getAgentsToExport(std::string setName);
1029 virtual std::string
version();
1031 void dropSet(std::string setName){
1032 importersExportersMap.erase(setName);
1036 std::stringstream ss;
1037 std::map<std::string, AbstractImporterExporter*>::iterator it = importersExportersMap.begin();
1038 std::map<std::string, AbstractImporterExporter*>::iterator itEnd = importersExportersMap.end();
1040 ss << it->first <<
"\n" << it->second->getReport();
1046 virtual void getSetOfAgentsBeingImported(std::set<AgentId>& set);
1047 void getSetOfAgentsBeingImported(std::set<AgentId>& set, std::string excludeSet);
1049 virtual void clear(){
1050 std::map<std::string, AbstractImporterExporter*>::iterator it = importersExportersMap.begin();
1051 std::map<std::string, AbstractImporterExporter*>::iterator itEnd = importersExportersMap.end();
1053 it->second->clear();
1058 void clear(std::string setName){
1059 std::map<std::string, AbstractImporterExporter*>::iterator it = importersExportersMap.find(setName);
1060 if(it != importersExportersMap.end()) it->second->clear();
1063 virtual void clearExporter(){
1064 std::map<std::string, AbstractImporterExporter*>::iterator it = importersExportersMap.begin();
1065 std::map<std::string, AbstractImporterExporter*>::iterator itEnd = importersExportersMap.end();
1067 it->second->clearExporter();
1072 void clearExporter(std::string setName){
1073 std::map<std::string, AbstractImporterExporter*>::iterator it = importersExportersMap.find(setName);
1074 if(it != importersExportersMap.end()) it->second->clearExporter();
1077 void clearExportToSpecificProc(
int rank){
1078 std::map<std::string, AbstractImporterExporter*>::iterator it = importersExportersMap.begin();
1079 std::map<std::string, AbstractImporterExporter*>::iterator itEnd = importersExportersMap.end();
1081 it->second->clearExportToSpecificProc(rank);
An implementation of AbstractImporterExporter that uses an importer of type 'Importer_LIST' and an ex...
Definition: AgentImporterExporter.h:889
Importer that maintains a simple count of the agents being sent from each sending process.
Definition: AgentImporterExporter.h:364
An implementation of AbstractImporterExporter that uses an importer of type 'Importer_COUNT' and an e...
Definition: AgentImporterExporter.h:847
virtual void importedAgentIsMoved(const AgentId &id, int newProcess)
Notifies this importer that the agent that it (presumably) has been importing from another process ha...
Definition: AgentImporterExporter.cpp:515
virtual std::string getReport()
Get a printable indication of the data in this object.
Definition: AgentImporterExporter.cpp:709
virtual void registerOutgoingRequests(AgentRequest &req)=0
Given an agent request (including requests for agents on multiple other processes),...
const StatusMap * getOutgoingStatusChanges()
Gets the set of status changes for the exported agents.
Definition: AgentImporterExporter.cpp:850
Implementation of the AbstractImporterExporter class that wraps a collection of AbstractImporterExpor...
Definition: AgentImporterExporter.h:956
virtual std::string getReport()
Gets a printable report of the state of this object.
Definition: AgentImporterExporter.h:1035
virtual const std::set< int > & getProcessesExportedTo()
Gets the list of processes this exporter is sending information to.
Definition: AgentImporterExporter.cpp:780
void clearAgentExportInfo()
Clears the outgoing agent export information buffer; should be called after the information is sent.
Definition: AgentImporterExporter.cpp:854
virtual std::string getReport()
Get a printable indication of the data in this object.
Definition: AgentImporterExporter.cpp:408
Agent identity information.
Definition: AgentId.h:60
virtual std::string version()
Returns the version of this AbstractImporterExporter.
Definition: AgentImporterExporter.cpp:1082
virtual void importedAgentIsMoved(const AgentId &id, int newProcess)
Notifies this importer that the agent that it (presumably) has been importing from another process ha...
Definition: AgentImporterExporter.cpp:240
Importer that maintains a map of agents being sent from each sending process and a count of the numbe...
Definition: AgentImporterExporter.h:510
virtual std::string getReport()
Get a printable indication of the data in this object.
Definition: AgentImporterExporter.cpp:245
virtual void importedAgentIsRemoved(const AgentId &id)
Notifies this importer that the agent that it (presumably) has been importing has been removed from t...
Definition: AgentImporterExporter.cpp:693
void selectSet(std::string setName)
Specifies that add and retrieve actions are to be performed on the subset of data identified by the g...
Definition: AgentImporterExporter.cpp:183
void removeAllDataForAgent(AgentId &id)
Remove all the data for a specific agent; useful when the agent is removed.
Definition: AgentImporterExporter.cpp:155
virtual std::string getReport()=0
Get a printable indication of the data in this object.
virtual void importedAgentIsMoved(const AgentId &id, int newProcess)
Notifies this importer that the agent that it (presumably) has been importing from another process ha...
Definition: AgentImporterExporter.cpp:698
virtual void agentRemoved(const AgentId &id)
1) Removes the agent export information from this process 2) Updates the outgoing status change buffe...
Definition: AgentImporterExporter.cpp:785
virtual void exchangeAgentStatusUpdates(boost::mpi::communicator comm, std::vector< std::vector< AgentStatus > * > &statusUpdates)
Exchanges the contents of the 'statusMap' with the destination processes, updating the status (moved ...
Definition: AgentImporterExporter.cpp:1008
virtual std::string getReport()
Gets a printable report of the state of this object.
Definition: AgentImporterExporter.cpp:980
AgentExporterInfo * dataForProc(int destProc)
Gets the packaged set of information to be sent to a specific processor.
Definition: AgentImporterExporter.cpp:119
virtual std::string getReport()
Get a printable indication of the data in this object.
Definition: AgentImporterExporter.cpp:528
virtual void agentMoved(const AgentId &id, int process)
1) Removes the agent export information from this process 2) Places a copy of the agent export inform...
Definition: AgentImporterExporter.cpp:809
virtual void importedAgentIsMoved(const AgentId &id, int newProcess)=0
Notifies this importer that the agent that it (presumably) has been importing from another process ha...
virtual void importedAgentIsRemoved(const AgentId &id)
Notifies this importer that the agent that it (presumably) has been importing has been removed from t...
Definition: AgentImporterExporter.cpp:510
virtual std::string version()
Returns the version of this AbstractImporterExporter.
Definition: AgentImporterExporter.cpp:1124
void addData(const AgentId &id, const int destProc, const int sourceProc, const int numberOfCopies=1)
Adds an agent ID to this list of data that is being exported to a specific processor (destProc),...
Definition: AgentImporterExporter.cpp:63
virtual std::string getReport()
Gets a printable report of the state of this object.
Definition: AgentImporterExporter.cpp:915
virtual void registerIncomingRequests(std::vector< AgentRequest > &requests)
Makes a record of the data receives (in the form of a vector of AgentRequests) so that the agents' da...
Definition: AgentImporterExporter.cpp:883
Importer that maintains a set of agents being sent from each sending process.
Definition: AgentImporterExporter.h:458
Maintains a set of agents being exported for each receiving process.
Definition: AgentImporterExporter.h:746
virtual std::string version()
Returns the version of this AbstractImporterExporter.
Definition: AgentImporterExporter.cpp:1068
virtual std::string getReport()=0
Gets a printable report of the state of this object.
virtual void importedAgentIsRemoved(const AgentId &id)=0
Notifies this importer that the agent that it (presumably) has been importing has been removed from t...
Responsible for keeping a list of the agents that have been requested by other processes for which da...
Definition: AgentImporterExporter.h:583
This class manages importing agent information; primarily this means constructing the appropriate mpi...
Definition: AgentImporterExporter.h:295
virtual void registerOutgoingRequests(AgentRequest &req)
Given an agent request (including requests for agents on multiple other processes),...
Definition: AgentImporterExporter.cpp:318
Encapsulates a request made by one process for agents in another.
Definition: AgentRequest.h:59
Importer that maintains a list of the agents being sent from each sending process.
Definition: AgentImporterExporter.h:400
Data structure for exporter data that is to be sent to other processes when the agents being exported...
Definition: AgentImporterExporter.h:199
virtual void registerOutgoingRequests(AgentRequest &req)
Given an agent request (including requests for agents on multiple other processes),...
Definition: AgentImporterExporter.cpp:625
virtual void registerIncomingRequests(std::vector< AgentRequest > &requests)
Makes a record of the data receives (in the form of a vector of AgentRequests) so that the agents' da...
Definition: AgentImporterExporter.cpp:943
virtual void importedAgentIsRemoved(const AgentId &id)
Notifies this importer that the agent that it (presumably) has been importing has been removed from t...
Definition: AgentImporterExporter.cpp:391
virtual void registerOutgoingRequests(AgentRequest &req)
Given an agent request (including requests for agents on multiple other processes),...
Definition: AgentImporterExporter.cpp:486
virtual void incorporateAgentExporterInfo(std::map< int, AgentRequest * > info)
The set of information received here comprises the information that some other process was using to e...
Definition: AgentImporterExporter.cpp:836
void clearStatusMap()
Clears the outgoing status information buffer; should be called after the information is sent.
Definition: AgentImporterExporter.cpp:858
AgentExporterInfo * getAgentExportInfo(int destProc)
Gets the export information that has been placed into the 'outgoing agent export information' buffer ...
Definition: AgentImporterExporter.cpp:846
virtual const std::set< int > & getExportingProcesses()
Gets a const reference to the set of ints representing the processes that are sending this process ag...
Definition: AgentImporterExporter.h:309
virtual void registerIncomingRequests(std::vector< AgentRequest > &requests)=0
Makes a record of the data receives (in the form of a vector of AgentRequests) so that the agents' da...
Maintains a list of agents being exported for each receiving process.
Definition: AgentImporterExporter.h:717
virtual std::string getReport()
Gets a printable report of the state of this object.
Definition: AgentImporterExporter.h:821
virtual void importedAgentIsRemoved(const AgentId &id)
Notifies this importer that the agent that it (presumably) has been importing has been removed from t...
Definition: AgentImporterExporter.cpp:236
virtual void registerOutgoingRequests(AgentRequest &req)
Given an agent request (including requests for agents on multiple other processes),...
Definition: AgentImporterExporter.cpp:230
An implementation of AbstractImporterExporter that uses an importer of type 'Importer_MAP_int' and an...
Definition: AgentImporterExporter.h:929
Wraps and Importer and an Exporter so that both use commensurate semantics and all imports and export...
Definition: AgentImporterExporter.h:772
An implementation of AbstractImporterExporter that uses an importer of type 'Importer_SET' and an exp...
Definition: AgentImporterExporter.h:909
virtual std::string version()
Returns the version of this AbstractImporterExporter.
Definition: AgentImporterExporter.cpp:1096
An implementation of AbstractImporterExporter that uses an importer of type 'Importer_COUNT' and an e...
Definition: AgentImporterExporter.h:868
virtual std::string version()
Returns the version of this AbstractImporterExporter.
Definition: AgentImporterExporter.cpp:1110
virtual std::string version()
Returns the version of this AbstractImporterExporter.
Definition: AgentImporterExporter.cpp:1410
virtual void importedAgentIsMoved(const AgentId &id, int newProcess)
Notifies this importer that the agent that it (presumably) has been importing from another process ha...
Definition: AgentImporterExporter.cpp:396
void importedAgentIsNowLocal(const AgentId &id)
Some semantic sugar; operationally this is the same as 'importedAgentIsRemoved'.
Definition: AgentImporterExporter.h:338
virtual std::string version()=0
Returns the version of this AbstractImporterExporter.
virtual const std::map< int, AgentRequest > & getAgentsToExport()
Gets the list of agents being exported by this exported, as a map by ints representing the processes ...
Definition: AgentImporterExporter.cpp:862
void clear()
Clears this data structure.
Definition: AgentImporterExporter.cpp:125