RefineOnly.C

Go to the documentation of this file.
00001 
00007 #include "InfoStream.h"
00008 #include "RefineOnly.h"
00009 
00010 RefineOnly::RefineOnly(computeInfo *computeArray, patchInfo *patchArray, 
00011            processorInfo *processorArray, int nComps, 
00012            int nPatches, int nPes) :
00013 Rebalancer(computeArray, patchArray, 
00014            processorArray, nComps, 
00015            nPatches, nPes)
00016 {
00017   strategyName = "Refine";
00018   strategy();
00019 #if 0
00020     if(proxySendSpanning || proxyRecvSpanning) {
00021       decrSTLoad();
00022       computeAverage();
00023       createSpanningTree();
00024       incrSTLoad();
00025       for(int i=0; i<P; i++)
00026         delete [] processors[i].proxyUsage; 
00027       InitProxyUsage();
00028       multirefine(); 
00029       printLoads();
00030       //createSpanningTree();
00031     }
00032 #endif
00033 
00034 }
00035 
00036 void RefineOnly::strategy()
00037 { 
00038   // iout << iINFO << "numComputes: " << numComputes << "\n" << endi;
00039   for (int i=0; i<numComputes; i++)
00040     assign((computeInfo *) &(computes[i]),
00041            (processorInfo *) &(processors[computes[i].oldProcessor]));
00042          
00043   // merge refinement code and move to Rebalancer
00044   multirefine();
00045 
00046   //  while (!refine())
00047   //    overLoad += .01;
00048 
00049   computeAverage();
00050 #if 0
00051   iout << iINFO
00052        << "------------------------------------------------------------\n"
00053        << iINFO 
00054        << "After load balancing (predicted stats):\n" << endi;
00055 #endif
00056   printLoads();
00057 #if 0
00058        << "------------------------------------------------------------\n"
00059        << endi;
00060 #endif
00061   double max = computeMax();
00062 
00063 }

Generated on Thu Sep 21 01:17:14 2017 for NAMD by  doxygen 1.4.7