From: <mar...@us...> - 2008-02-26 04:57:40
|
Revision: 134 http://gridsim.svn.sourceforge.net/gridsim/?rev=134&view=rev Author: marcos_dias Date: 2008-02-25 20:57:09 -0800 (Mon, 25 Feb 2008) Log Message: ----------- Workload class back to previous status as the creation of gridlets with imprecise execution time will be handled in a different way. Modified Paths: -------------- branches/gridsim4.0-branch3/source/gridsim/util/Workload.java Modified: branches/gridsim4.0-branch3/source/gridsim/util/Workload.java =================================================================== --- branches/gridsim4.0-branch3/source/gridsim/util/Workload.java 2008-02-26 04:48:35 UTC (rev 133) +++ branches/gridsim4.0-branch3/source/gridsim/util/Workload.java 2008-02-26 04:57:09 UTC (rev 134) @@ -669,14 +669,18 @@ Long l = new Long( array[SUBMIT_TIME].trim() ); long submitTime = l.intValue(); - // get the run time estimate + // get the run time obj = new Integer( array[REQ_RUN_TIME].trim() ); - int runTimeEstimate = obj.intValue(); - - // get the run time estimate - obj = new Integer( array[RUN_TIME].trim() ); int runTime = obj.intValue(); - + + // if the required run time field is ignored, then use + // the actual run time + if (runTime == IRRELEVANT) + { + obj = new Integer( array[RUN_TIME].trim() ); + runTime = obj.intValue(); + } + // according to the SWF manual, runtime of 0 is possible due // to rounding down. E.g. runtime is 0.4 seconds -> runtime = 0 if (runTime == 0) { @@ -705,7 +709,7 @@ } // submit a Gridlet - submitGridlet(id, submitTime, runTime, runTimeEstimate, numProc); + submitGridlet(id, submitTime, runTime, numProc); } catch (Exception e) { @@ -721,7 +725,6 @@ * @param id a Gridlet ID * @param submitTime Gridlet's submit time * @param runTime Gridlet's actual run time - * @param runTimeEstimate Gridlet's run time estimate * @param numProc number of processors * @pre id >= 0 * @pre submitTime >= 0 @@ -729,8 +732,8 @@ * @pre numProc > 0 * @post $none */ - protected void submitGridlet(int id, long submitTime, int runTime, - int runTimeEstimate, int numProc) + protected void submitGridlet(int id, long submitTime, + int runTime, int numProc) { // create the gridlet int len = runTime * rating_; // calculate a job length for each PE @@ -738,13 +741,6 @@ gl.setUserID( super.get_id() ); // set the owner ID gl.setNumPE(numProc); // set the requested num of proc - // If runtime estimate was provided, then use it - if(runTimeEstimate != IRRELEVANT) { - // calculate ths job expected length for each PE - int expLen = runTimeEstimate * rating_; - gl.setExpectedGridletLength(expLen); - } - // printing to inform user if (gridletID_ == 1 || gridletID_ % INTERVAL == 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |