System.out.println("[bestMult] [DWS] Returning Multiplicity : "+min_mult);
if (ClusterBackend.debugPrint) { System.out.println("[bestMult] [DWS] Returning Multiplicity : "+min_mult); }
    public static int bestMult(int data_cache1,                                int data_cache2) {                           /* WorkEstimate work_est) { */        int threadCount = NodeEnumerator.getNumberOfNodes();        int min_mult;// = cache_size;        int histogram[] = new int[threadCount];	// create a histogram of multipicities for individual operators        for (int t = 0; t < threadCount; t++) {                    SIROperator oper = NodeEnumerator.getOperator(t);            int dws = DataEstimate.estimateDWS(oper);            int io = DataEstimate.estimateIOSize(oper);            int avail = 0;            // if dws < .8 * data_cahce1            if ((dws + io) / 8 * 10 < data_cache1) {                avail = (data_cache1 - dws);// * 2 / 3;            } else {                avail = (data_cache2 - dws) * 2 / 3;            }            if (io == 0) io = 1;            int mult = avail / io;            if (mult <= 0) mult = 1;            int globals = 0;            if (oper instanceof SIRFilter) {                globals = DataEstimate.filterGlobalsSize((SIRFilter)oper);            }            System.out.println("DWS: "+dws+" (g="+globals+") Avail: "+avail+" IO: "+io+" Mult: "+mult);            /*              if (oper instanceof SIRFilter) {              SIRFilter filter = (SIRFilter)oper;              System.out.println("DWS Filter work: "+work_est.getWork(filter)+" reps: "+work_est.getReps(filter));              }            */            histogram[t] = mult;            //if (mult < min_mult) { min_mult = mult; }        }                   Arrays.sort(histogram);        System.out.println("[bestMult] [DWS] min: "+histogram[0]+" max: "+histogram[threadCount-1]);        System.out.println("[bestMult] [DWS] 0th-precentile: "+histogram[threadCount-1]);        System.out.println("[bestMult] [DWS] 10th-precentile: "+histogram[(threadCount-1)*9/10]);        System.out.println("[bestMult] [DWS] 20th-precentile: "+histogram[(threadCount-1)*8/10]);        System.out.println("[bestMult] [DWS] 30th-precentile: "+histogram[(threadCount-1)*7/10]);        System.out.println("[bestMult] [DWS] 40th-precentile: "+histogram[(threadCount-1)*6/10]);        System.out.println("[bestMult] [DWS] 50th-precentile: "+histogram[(threadCount-1)*5/10]);        System.out.println("[bestMult] [DWS] 60th-precentile: "+histogram[(threadCount-1)*4/10]);        System.out.println("[bestMult] [DWS] 70th-precentile: "+histogram[(threadCount-1)*3/10]);        System.out.println("[bestMult] [DWS] 80th-precentile: "+histogram[(threadCount-1)*2/10]);        System.out.println("[bestMult] [DWS] 90th-precentile: "+histogram[(threadCount-1)*1/10]);        System.out.println("[bestMult] [DWS] 100th-precentile: "+histogram[0]);        min_mult = histogram[(threadCount-1)/10];        //if (min_mult > 100) min_mult = 100;           if (min_mult <= 0) min_mult = 1;            System.out.println("[bestMult] [DWS] Returning Multiplicity : "+min_mult);        return min_mult;    }