1 #ifndef PARALLELIOMGR_H 2 #define PARALLELIOMGR_H 12 #include "Node.decl.h" 18 #define COLLECT_PERFORMANCE_DATA 0 20 #ifdef MEM_OPT_VERSION 23 class CollectionMidMaster;
24 class CollectMidVectorInstance;
31 #include "ParallelIOMgr.decl.h" 157 #ifdef MEM_OPT_VERSION 160 friend class CollectionMidMaster;
161 friend class CollectMidVectorInstance;
191 bool isOKToRecvHPAtoms;
201 int64 numTotalExclusions;
202 int64 numCalcExclusions;
203 int64 numCalcFullExclusions;
208 int *outputProcArray;
209 char *outputProcFlags;
219 int numProxiesPerOutputProc;
220 int myOutputProxyRank;
221 int *outputProxyArray;
222 int *myOutputProxies;
224 int calcMyOutputProxyClients();
238 int numRemoteClusters;
262 #ifdef MEM_OPT_VERSION 263 CollectMidVectorInstance *coorInstance;
264 CollectionMidMaster *midCM;
267 CkChareID mainMaster;
271 #if COLLECT_PERFORMANCE_DATA 272 int numFixedAtomLookup;
276 void readCoordinatesAndVelocity();
278 void prepareHomePatchAtomList();
280 int binaryFindHPID(
int pid);
282 void readInfoForParOutput();
284 void integrateClusterCoor();
286 int numMyAtoms(
int rank,
int numProcs);
288 inline int numInitMyAtomsOnInput() {
289 return numMyAtoms(myInputRank, numInputProcs);
291 inline int numMyAtomsOnOutput() {
292 return numMyAtoms(myOutputRank, numOutputProcs);
295 int atomRank(
int atomID,
int numProcs);
297 inline int atomInitRankOnInput(
int atomID) {
298 return atomRank(atomID, numInputProcs);
300 inline int atomRankOnOutput(
int atomID) {
301 return atomRank(atomID, numOutputProcs);
304 void getMyAtomsRange(
int &lowerIdx,
int &upperIdx,
int rank,
int numProcs);
308 inline void getMyAtomsInitRangeOnInput(
int &lowerIdx,
int &upperIdx) {
309 return getMyAtomsRange(lowerIdx,upperIdx,myInputRank,numInputProcs);
311 inline void getMyAtomsRangeOnOutput(
int &lowerIdx,
int &upperIdx) {
312 return getMyAtomsRange(lowerIdx,upperIdx,myOutputRank,numOutputProcs);
314 inline void getAtomsRangeOnOutput(
int &lowerIdx,
int &upperIdx,
int rank) {
315 return getMyAtomsRange(lowerIdx,upperIdx,rank,numOutputProcs);
320 inline int isAtomFixed(
int mySAId,
int reqAId){
321 int localIdx = reqAId-mySAId;
322 if(localIdx>=0 && localIdx<initAtoms.
size()){
324 return initAtoms[localIdx].atomFixed;
326 #if COLLECT_PERFORMANCE_DATA 327 numFixedAtomLookup++;
335 inline int getMyOutputGroupHighestRank(){
336 int step = numOutputProcs/numOutputWrts;
337 int remains = numOutputProcs%numOutputWrts;
340 int limit = (step+1)*remains;
341 if(myOutputRank<limit){
342 int idx = myOutputRank/(step+1);
343 return (idx+1)*(step+1)-1;
345 int idx = (myOutputRank-limit)/step;
346 return limit+(idx+1)*step-1;
375 std::vector<std::string> inputFileNames,
376 std::vector<std::string> outputFileNames,
377 std::vector<int> freqs,
378 std::vector<OUTPUTFILETYPE> types);
int64 numCalcFullExclusions
unsigned short * fixedAtomsCntList
void sendAtomsToHomePatchProcs()
void recvClusterSize(ClusterSizeMsg *msg)
UniqueSet< ClusterCoorElem > ClusterCoorSet
int operator==(const ClusterCoorElem &a) const
void integrateClusterSize()
void recvAtomsMGrp(MoveInputAtomsMsg *msg)
void disposePositions(int seq, double prevT)
UniqueSetIter< ClusterElem > ClusterSetIter
Molecule stores the structural information for the system.
void wrapCoor(int seq, Lattice lat)
ResizeArray< ClusterCoorMsg * > ClusterCoorMsgBuffer
void receiveForces(CollectVectorVarMsg *msg)
void recvAtomsToHomePatchProcs(MovePatchAtomsMsg *msg)
void integrateMigratedAtoms()
void disposeForces(int seq, double prevT)
void initializeDcdSelectionParams()
void recvClusterCoor(ClusterCoorMsg *msg)
void recvDcdParams(std::vector< uint16 > tags, std::vector< std::string > inputFileNames, std::vector< std::string > outputFileNames, std::vector< int > freqs, std::vector< OUTPUTFILETYPE > types)
void recvAtomsCntPerPatch(AtomsCntPerPatchMsg *msg)
void recvHydroBasedCounter(HydroBasedMsg *msg)
CthThread sendAtomsThread
void recvFinalClusterCoor(ClusterCoorMsg *msg)
void readInfoForParOutDcdSelection()
void ackAtomsToHomePatchProcs()
void initialize(Node *node)
void recvFinalClusterSize(ClusterSizeMsg *msg)
void disposeVelocities(int seq, double prevT)
void calcAtomsInEachPatch()
ResizeArray< ClusterSizeMsg * > ClusterSizeMsgBuffer
unsigned short * atomsCntList
bool isOutputProcessor(int pe)
UniqueSetIter< ClusterCoorElem > ClusterCoorSetIter
void bcastHydroBasedCounter(HydroBasedMsg *msg)
void receiveVelocities(CollectVectorVarMsg *msg)
Bool is_atom_fixed(int atomnum) const
void recvMolInfo(MolInfoMsg *msg)
int operator==(const ClusterElem &a) const
void bcastMolInfo(MolInfoMsg *msg)
UniqueSet< ClusterElem > ClusterSet
void receivePositions(CollectVectorVarMsg *msg)