Revision: 51
http://gridsim.svn.sourceforge.net/gridsim/?rev=51&view=rev
Author: sulistio
Date: 2007-08-31 19:27:16 -0700 (Fri, 31 Aug 2007)
Log Message:
-----------
change the submit time from int to long. for a trace that spans over 1 year period, the submit time is beyond the max limit of int.
Modified Paths:
--------------
trunk/source/gridsim/util/Workload.java
Modified: trunk/source/gridsim/util/Workload.java
===================================================================
--- trunk/source/gridsim/util/Workload.java 2007-09-01 02:10:24 UTC (rev 50)
+++ trunk/source/gridsim/util/Workload.java 2007-09-01 02:27:16 UTC (rev 51)
@@ -4,7 +4,7 @@
* of Parallel and Distributed Systems such as Clusters and Grids
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
*
- * $Id: Workload.java,v 1.8 2006/06/30 04:30:03 anthony Exp $
+ * $Id: Workload.java,v 1.9 2007/08/30 01:50:04 anthony Exp $
*/
package gridsim.util;
@@ -668,8 +668,8 @@
}
// get the submit time
- obj = new Integer( array[SUBMIT_TIME].trim() );
- int submitTime = obj.intValue();
+ Long l = new Long( array[SUBMIT_TIME].trim() );
+ long submitTime = l.intValue();
// get the run time
obj = new Integer( array[REQ_RUN_TIME].trim() );
@@ -734,7 +734,7 @@
* @pre numProc > 0
* @post $none
*/
- private void submitGridlet(int id, int submitTime, int runTime, int numProc)
+ private void submitGridlet(int id, long submitTime, int runTime, int numProc)
{
// create the gridlet
int len = runTime * rating_; // calculate a job length for each PE
@@ -749,6 +749,11 @@
resName_ + " ...");
}
+ // check the submit time
+ if (submitTime < 0) {
+ submitTime = 0;
+ }
+
gridletID_++; // increment the counter
// submit a gridlet to resource
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|