From: <sul...@us...> - 2007-09-01 02:10:25
|
Revision: 50 http://gridsim.svn.sourceforge.net/gridsim/?rev=50&view=rev Author: sulistio Date: 2007-08-31 19:10:24 -0700 (Fri, 31 Aug 2007) Log Message: ----------- add resource failure examples from gridsim4.0-branch1 to this trunk directory. Modified Paths: -------------- trunk/examples/README.txt Added Paths: ----------- trunk/examples/ResFailure/ trunk/examples/ResFailure/README.txt trunk/examples/ResFailure/ResFailureEx01/ trunk/examples/ResFailure/ResFailureEx01/Ex01_Regional_GIS trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_0 trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_1 trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_2 trunk/examples/ResFailure/ResFailureEx01/Ex01_User0 trunk/examples/ResFailure/ResFailureEx01/Ex01_User0_Fin trunk/examples/ResFailure/ResFailureEx01/GridUserFailureEx01.java trunk/examples/ResFailure/ResFailureEx01/GridletSubmission.java trunk/examples/ResFailure/ResFailureEx01/README.txt trunk/examples/ResFailure/ResFailureEx01/ResFailureEx01.java trunk/examples/ResFailure/ResFailureEx01/network_ex01.txt trunk/examples/ResFailure/ResFailureEx01/output.txt trunk/examples/ResFailure/ResFailureEx02/ trunk/examples/ResFailure/ResFailureEx02/Ex02_Regional_GIS trunk/examples/ResFailure/ResFailureEx02/Ex02_Res_0 trunk/examples/ResFailure/ResFailureEx02/Ex02_Res_1 trunk/examples/ResFailure/ResFailureEx02/Ex02_Res_2 trunk/examples/ResFailure/ResFailureEx02/Ex02_Res_3 trunk/examples/ResFailure/ResFailureEx02/Ex02_Res_4 trunk/examples/ResFailure/ResFailureEx02/Ex02_Res_5 trunk/examples/ResFailure/ResFailureEx02/Ex02_User_0 trunk/examples/ResFailure/ResFailureEx02/GridUserFailureEx02.java trunk/examples/ResFailure/ResFailureEx02/GridletSubmission.java trunk/examples/ResFailure/ResFailureEx02/README.txt trunk/examples/ResFailure/ResFailureEx02/ResFailureEx02.java trunk/examples/ResFailure/ResFailureEx02/network_ex02.txt trunk/examples/ResFailure/ResFailureEx02/output.txt trunk/examples/ResFailure/ResFailureEx03/ trunk/examples/ResFailure/ResFailureEx03/Ex03_Regional_GIS_0 trunk/examples/ResFailure/ResFailureEx03/Ex03_Regional_GIS_1 trunk/examples/ResFailure/ResFailureEx03/Ex03_Regional_GIS_2 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_0 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_10 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_12 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_14 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_2 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_4 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_6 trunk/examples/ResFailure/ResFailureEx03/Ex03_Res_8 trunk/examples/ResFailure/ResFailureEx03/Ex03_User_0 trunk/examples/ResFailure/ResFailureEx03/GridUserFailureEx03.java trunk/examples/ResFailure/ResFailureEx03/GridletSubmission.java trunk/examples/ResFailure/ResFailureEx03/README.txt trunk/examples/ResFailure/ResFailureEx03/ResFailureEx03.java trunk/examples/ResFailure/ResFailureEx03/network_ex03.txt trunk/examples/ResFailure/ResFailureEx03/output.txt Modified: trunk/examples/README.txt =================================================================== --- trunk/examples/README.txt 2007-08-30 02:33:11 UTC (rev 49) +++ trunk/examples/README.txt 2007-09-01 02:10:24 UTC (rev 50) @@ -37,6 +37,8 @@ ./RegionalGIS : shows how to create multiple regional GridInformationService (GIS) entities in a network topology. +./ResFailure : shows how to use the resource failures of GridSim. + ./WorkloadTrace : shows few examples how to use workload traces from a file in GridSim. Added: trunk/examples/ResFailure/README.txt =================================================================== --- trunk/examples/ResFailure/README.txt (rev 0) +++ trunk/examples/ResFailure/README.txt 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,18 @@ + +This directory contains few examples regarding to +resource failure functionalities. +Here are the summary of what each example does: +./ResFailureEx01 : shows a very basic example, + dealing with 1 user, 3 resources and 1 GIS entities. + +./ResFailureEx02 : shows a basic example, + dealing with 20 users, 6 resources and 1 GIS entities. + +./ResFailureEx03 : shows a more complex example, + dealing with 30 users, 15 resources and 3 GIS entities. + However, you can modify these parameters as you wish, + but keep in mind that the simulation might run longer + if you increase the numbers. + +NOTE: Detailed explanations are provided in the source file(s). + Added: trunk/examples/ResFailure/ResFailureEx01/Ex01_Regional_GIS =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/Ex01_Regional_GIS (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/Ex01_Regional_GIS 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,4 @@ +Event ResourceID Clock +Registering 10 10.020000998399999 +Registering 15 10.030000998399998 +Registering 20 10.040000998399998 Added: trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_0 =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_0 (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_0 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1 @@ +Event NumMachines Clock Added: trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_1 =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_1 (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_1 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,2 @@ +Event NumMachines Clock +Failure 3 31.205408168820174 Added: trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_2 =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_2 (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/Ex01_Res_2 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1 @@ +Event NumMachines Clock Added: trunk/examples/ResFailure/ResFailureEx01/Ex01_User0 =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/Ex01_User0 (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/Ex01_User0 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,11 @@ +User Event GridletID Resource GridletStatus Clock +Ex01_User0 Sending 0 Ex01_Res_2 Created 374.04012479999994 +Ex01_User0 Sending 1 Ex01_Res_1 Created 374.77037439999924 +Ex01_User0 Sending 2 Ex01_Res_2 Created 375.50062399999854 +Ex01_User0 Sending 3 Ex01_Res_2 Created 376.23087359999784 +Ex01_User0 Sending 4 Ex01_Res_0 Created 376.96112319999713 +Ex01_User0 Receiving 0 Ex01_Res_2 Success 1233.4001439999986 +Ex01_User0 Receiving 1 Ex01_Res_1 Success 1234.130393599998 +Ex01_User0 Receiving 2 Ex01_Res_2 Success 1234.8606431999972 +Ex01_User0 Receiving 3 Ex01_Res_2 Success 1235.5306431999966 +Ex01_User0 Receiving 4 Ex01_Res_0 Success 1236.3211423999958 Added: trunk/examples/ResFailure/ResFailureEx01/Ex01_User0_Fin =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/Ex01_User0_Fin (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/Ex01_User0_Fin 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,6 @@ +User GridletID Resource Cost CPU time Latency +Ex01_User0 0 Ex01_Res_2 2574.0 858.0 245555.1188510172 +Ex01_User0 1 Ex01_Res_1 2574.0 858.0 245555.1188510172 +Ex01_User0 2 Ex01_Res_2 2574.0 858.0 245555.1188510172 +Ex01_User0 3 Ex01_Res_2 2571.809251200002 857.2697504000007 245555.1188510172 +Ex01_User0 4 Ex01_Res_0 2574.0 858.0 245555.1188510172 Added: trunk/examples/ResFailure/ResFailureEx01/GridUserFailureEx01.java =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/GridUserFailureEx01.java (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/GridUserFailureEx01.java 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,745 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: UCLM (Spain) + * Created on: August 2007 + */ + +import gridsim.*; +import gridsim.index.AbstractGIS; +import gridsim.net.Link; +import java.util.Random; +import java.util.ArrayList; +import java.io.FileWriter; +import gridsim.resFailure.RegionalGISWithFailure; +import eduni.simjava.Sim_system; +import eduni.simjava.Sim_event; + + +/** + * Creates a Grid User that also considers what happens if a resource fails. + * @author Agustin Caminero and Anthony Sulistio + * @since GridSim Toolkit 4.1 + */ +public class GridUserFailureEx01 extends GridUser +{ + // the base for our constants (chosen at random) + private static final int BASE = 440000; + + /** This constant is to tell the user when he should submit a gridlet */ + private static final int SUBMIT_GRIDLET = BASE + 1; + + private ArrayList GridletSubmittedList_; // list of submitted Gridlets + private GridletList GridletReceiveList_; // list of received Gridlets + + private int NUM_GRIDLETS; + private double pollingTime_; + + // The sizes of gridlets + private int gridletLength; + private int gridletInput; + private int gridletOutput; + + // we keep here the time when each gridlet is submitted + private double gridletSubmissionTime []; + private double gridletLatencyTime []; + + // a flag that denotes whether to trace GridSim events or not. + private boolean trace_flag; + + + /** + * Creates a GridUserFailure object + * @param name this entity name + * @param link a network link connecting this entity + * @param pollTime the time between polls + * @param glLength length (MI) for the gridlets of this user + * @param glIn input file size for the gridlets of this user + * @param glOut output file size for the gridlets of this user + * @param trace_flag a flag that denotes whether to trace this user events + * or not. + * @throws java.lang.Exception happens if either name or link is empty + */ + public GridUserFailureEx01(String name, Link link, double pollTime, + int glLength, int glIn, int glOut, boolean trace_flag) + throws Exception + { + super(name, link); + + this.GridletSubmittedList_ = new ArrayList(); + this.GridletReceiveList_ = new GridletList(); + pollingTime_ = pollTime; + + gridletLength = glLength; + gridletInput = glIn; + gridletOutput = glOut; + this.trace_flag = trace_flag; + } + + /** + * Sets the number of gridlets that this user has to submit. + * Also, create the submission and reception times arrays. + * @param gridlet_num the number of gridlets + */ + public void setGridletNumber(int gridlet_num) + { + NUM_GRIDLETS = gridlet_num; + + gridletSubmissionTime = new double[NUM_GRIDLETS]; + gridletLatencyTime = new double[NUM_GRIDLETS]; + } + + /** + * Handles incoming requests to this entity. + * This method specifies the behaviours and/or scenarios of a user. + */ + public void body() + { + initializeResultsFile(); + createGridlet(super.get_id(), NUM_GRIDLETS); + + // schedule the initial sending of gridlets. + // The sending will start in a ramdom time within 5 min + Random random = new Random(); + int init_time = random.nextInt(5*60); + + // sends a reminder to itself + super.send(super.get_id(), init_time, SUBMIT_GRIDLET); + System.out.println(super.get_name() + + ": initial SUBMIT_GRIDLET event will be at clock: " + + init_time + ". Current clock: " + GridSim.clock()); + + + //////////////////////////////////////////////////////////// + // Now, we have the framework of the entity: + while (Sim_system.running()) + { + Sim_event ev = new Sim_event(); + super.sim_get_next(ev); // get the next event in the queue + + switch (ev.get_tag()) + { + // submit a gridlet + case SUBMIT_GRIDLET: + processGridletSubmission(ev); // process the received event + break; + + // Receive a gridlet back + case GridSimTags.GRIDLET_RETURN: + processGridletReturn(ev); + break; + + case GridSimTags.END_OF_SIMULATION: + System.out.println("\n============== " + super.get_name() + + ". Ending simulation..."); + break; + + default: + System.out.println(super.get_name() + + ": Received an event: " + ev.get_tag()); + break; + + } // switch + + } // while + + // remove I/O entities created during construction of this entity + super.terminateIOEntities(); + + // prints the completed gridlets + printGridletList(GridletReceiveList_, super.get_name(), false, + gridletLatencyTime); + } // body() + + ///////////////////////////////////////////////////////////////////////// + + /** + * This functions process the submission of a gridlet. We have to get the + * list of available resources from the RegGIS, choose one of them, and + * submit the gridlet. + * @param ev an incoming event + */ + private void processGridletSubmission(Sim_event ev) + { + if (trace_flag) + { + System.out.println(super.get_name() + + ": received an SUBMIT_GRIDLET event. Clock: " + GridSim.clock()); + } + + /*********** + We have to submit: + - the gridlet whose id comes with the event + - all the gridlets with the "gridletSub.getSubmitted() == false" + + So, set the gridletSub.getSubmitted() to false for the gridlet whose + id comes with the event + ***********/ + + int i = 0; + GridletSubmission gridletSub; + int resourceID[]; + Random random = new Random(5); // a random generator with a random seed + int index; + Gridlet gl; + Integer obj; + int glID; + + // This is because the initial GRIDLET_SUBMIT event, at the beginning + // of sims, does not have any gridlet id. We have to submit + // all the gridlets. + if (ev.get_data() instanceof Integer) + { + obj = (Integer) ev.get_data(); + glID = obj.intValue(); // get the gridlet id. + } + else { + glID = 99; // a value at random, not used at all in this case + } + + while (i < GridletSubmittedList_.size()) + { + gridletSub = (GridletSubmission)GridletSubmittedList_.get(i); + + if ( (gridletSub.getGridlet()).getGridletID() == glID ) + { + // set this gridlet whose id comes with the event as not submitted, + // so that it is submitted as soon as possible. + ((GridletSubmission) GridletSubmittedList_.get(i)).setSubmitted(false); + } + + // Submit the gridlets with the "gridletSub.getSubmitted() == false" + if ( (gridletSub.getSubmitted() == false)) + { + // we have to resubmit this gridlet + gl = ((GridletSubmission) GridletSubmittedList_.get(i)).getGridlet(); + resourceID = getResList(); // Get list of resources from GIS + + // If we have resources in the list + if ((resourceID != null) && (resourceID.length != 0)) + { + index = random.nextInt(resourceID.length); + + // make sure the gridlet will be executed from the begining + resetGridlet(gl); + + // submits this gridlet to a resource + super.gridletSubmit(gl, resourceID[index]); + gridletSubmissionTime[gl.getGridletID()] = GridSim.clock(); + + // set this gridlet as submitted + ((GridletSubmission) GridletSubmittedList_.get(i)).setSubmitted(true); + + if (trace_flag) + { + System.out.println(super.get_name() + + ": Sending Gridlet #" + i + " to " + + GridSim.getEntityName(resourceID[index]) + + " at clock: " + GridSim.clock()); + + // Write into a results file + write(super.get_name(), "Sending", gl.getGridletID(), + GridSim.getEntityName(resourceID[index]), + gl.getGridletStatusString(), GridSim.clock()); + } + + } + // No resources available at this moment, so schedule an event + // in the future. The event wil be in 15 min (900 sec), as + // resource failures may last several hours. + // This event includes the gridletID, so that the user will + // try to submit only this gridlet + else + { + super.send(super.get_id(), GridSimTags.SCHEDULE_NOW + 900, + SUBMIT_GRIDLET, new Integer(gl.getGridletID()) ); + } + + }// if (gridletSub.getSubmitted() == false) + + i++; + } // while (i < GridletSubmittedList_.size()) + + } // processGridletSubmission + + /** + * This functions process the return of a gridlet. + * We pay attention to the status of the gridlet + * and then decide what we have to do the next + * @param ev an incoming event + */ + private void processGridletReturn(Sim_event ev) + { + if (trace_flag) + { + System.out.println(super.get_name() + + ": received an GRIDLET_RETURN event. Clock: " + GridSim.clock()); + } + + Object obj = (Object) ev.get_data(); + Gridlet gl = null; + Random random = new Random(5); // a random generator with a random seed + + if (obj instanceof Gridlet) + { + gl = (Gridlet) obj; + gridletLatencyTime[gl.getGridletID()] = GridSim.clock(); + + // Write into a results file + if (trace_flag) + { + write(super.get_name(), "Receiving", gl.getGridletID(), + GridSim.getEntityName(gl.getResourceID()), + gl.getGridletStatusString(), GridSim.clock()); + } + + ///////////////////////// Gridlet Success + if (gl.getGridletStatusString().compareTo("Success") == 0) + { + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + " with status Success at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID())); + + this.GridletReceiveList_.add(gl); // add into the received list + gridletLatencyTime[gl.getGridletID()] = + gridletLatencyTime[gl.getGridletID()] - + gridletSubmissionTime[gl.getGridletID()]; + + // We have received all the gridlets. So, finish the simulation. + if (GridletReceiveList_.size() == GridletSubmittedList_.size()) + { + super.finishSimulation(); + } + + } // if (gl.getGridletStatusString() == "Success") + + //////////////////////// Gridlet Failed + else if (gl.getGridletStatusString().compareTo("Failed") == 0) + { + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + " with status Failed at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID())); + + // Send the gridlet as soon as we have resources available. + // This gridlet will be resend as soon as possible, + // in the first loop. + int pos = findGridletInGridletSubmittedList(gl); + if (pos == -1) { + System.out.println(super.get_name() + + ". Gridlet not found in GridletSubmittedList."); + } + else + { + // set this gridlet as submitted, because otherwise + // this gridlet may be submitted several times. + // A gridlet will only be submitted when the event carrying + // its id reaches the user + ((GridletSubmission) GridletSubmittedList_.get(pos)).setSubmitted(true); + + // Now, schedule an event to itself to submit the gridlet + // The gridlet will be sent as soon as possible + Integer glID_Int = new Integer(gl.getGridletID()); + + // This event includes the gridletID, so that the user + // will try to submit only this gridlet + super.send(super.get_id(), GridSimTags.SCHEDULE_NOW, + SUBMIT_GRIDLET, glID_Int); + } + } // if (gl.getGridletStatusString() == "Failed") + + ////////////////////////////// Gridlet Failed_resource + else if (gl.getGridletStatusString().compareTo("Failed_resource_unavailable") == 0) + { + int pos = findGridletInGridletSubmittedList(gl); + if (pos == -1) { + System.out.println(super.get_name() + + ". Gridlet not found in GridletSubmittedList."); + } + else + { + // Now, set its submission time for a random time between + // 1 and the polling time + double resubmissionTime = random.nextDouble() * pollingTime_; + + // this is to prevent the gridlet from being submitted + // before its resubmission time. + // This is different from the FAILED case, because + // in that case, the gridlet should be resubmited as soon + // as possible. As oppossed to that, this gridlet should + // not be resubmited before its resubmission time. + ((GridletSubmission) GridletSubmittedList_.get(pos)).setSubmitted(true); + + + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + + " with status Failed_resource_unavailable at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID()) + + "(resID: " + gl.getResourceID() + + "). Resubmission time will be: " + + resubmissionTime + GridSim.clock()); + + // Now, we have to inform the GIS about this failure, so it + // can keep the list of resources up-to-date. + informGIS(gl.getResourceID()); + + // Now, schedule an event to itself to submit the gridlet + Integer glID_Int = new Integer(gl.getGridletID()); + + // This event includes the gridletID, so that the user + // will try to submit only this gridlet + super.send(super.get_id(), resubmissionTime, + SUBMIT_GRIDLET, glID_Int); + } + } // else if + else + { + System.out.println(super.get_name() + ": Receiving Gridlet #" + + gl.getGridletID() + " with status " + + gl.getGridletStatusString() + " at time = " + + GridSim.clock() + " from resource " + + GridSim.getEntityName(gl.getResourceID()) + + " resID: " + gl.getResourceID()); + } + + } // if (obj instanceof Gridlet) + } + + /** + * Prints the Gridlet objects + * @param list the list of gridlets + * @param name the name of the user + * @param detail if we want the gridlet's history or not + * @param gridletLatencyTime array containing the latencies of gridlets. + * Latencies are from the moment when the gridlet is sent, till + * the moment they are back at the user. + * They take into account the last submission of a gridlet + * (when the gridlet is successfully run) + */ + private void printGridletList(GridletList list, String name, + boolean detail, double gridletLatencyTime[]) + { + int size = list.size(); + Gridlet gridlet = null; + + String indent = " "; + System.out.println(); + System.out.println("============= OUTPUT for " + name + " =========="); + System.out.println("Gridlet ID" + indent + "STATUS" + indent + + "Resource ID" + indent + "Cost" + indent + + "CPU Time"+ indent + "Latency"); + + // a loop to print the overall result + int i = 0; + for (i = 0; i < size; i++) + { + gridlet = (Gridlet) list.get(i); + System.out.print(indent + gridlet.getGridletID() + indent + + indent); + + System.out.print(gridlet.getGridletStatusString()); + + System.out.println(indent + indent + gridlet.getResourceID() + + indent + indent + gridlet.getProcessingCost() + + indent + indent + gridlet.getActualCPUTime()+ + indent + indent + + gridletLatencyTime[gridlet.getGridletID()]); + + writeFin(name, gridlet.getGridletID(), + GridSim.getEntityName(gridlet.getResourceID()), + gridlet.getProcessingCost(), gridlet.getActualCPUTime(), + GridSim.clock()); + + + + } + + + if (detail == true) + { + // a loop to print each Gridlet's history + for (i = 0; i < size; i++) + { + gridlet = (Gridlet) list.get(i); + System.out.println(gridlet.getGridletHistory()); + + System.out.print("Gridlet #" + gridlet.getGridletID()); + System.out.println(", length = " + gridlet.getGridletLength() + + ", finished so far = " + + gridlet.getGridletFinishedSoFar()); + System.out.println("======================================\n"); + } + } + + System.out.println("================================================="); + + } + + /** + * This method will show you on how to create Gridlets + * @param userID owner ID of a Gridlet + * @param numGridlet number of Gridlet to be created + */ + private void createGridlet(int userID, int numGridlet) + { + for (int i = 0; i < numGridlet; i++) + { + // Creates a Gridlet + Gridlet gl = new Gridlet(i, gridletLength, gridletInput, gridletOutput); + gl.setUserID(userID); + + // Originally, gridlets are created to be submitted + // as soon as possible (the 0.0 param) + GridletSubmission gst = new GridletSubmission(gl, false); + + // add this gridlet into a list + this.GridletSubmittedList_.add(gst); + } + } + + /** + * Gets a list of received Gridlets + * @return a list of received/completed Gridlets + */ + public GridletList getGridletList() { + return GridletReceiveList_; + } + + /** + * Tells you the possition of this gridlet in the GridletSubmittedList_ + * @param gl the gridlet + * @return the position of this gridlet in the list of submitted gridlets + */ + private int findGridletInGridletSubmittedList(Gridlet gl) + { + Gridlet g = null; + GridletSubmission gst = null; + for (int i = 0; i< GridletSubmittedList_.size(); i++) + { + gst = (GridletSubmission)GridletSubmittedList_.get(i); + g = gst.getGridlet(); + + if ( g.getGridletID() == gl.getGridletID() ) + return i; + } + + return -1; + } + + /** This function resets the gridlet into its original values of + * length and gridletFinishedSoFar + * @param gl the gridlet to be resetted + */ + private void resetGridlet (Gridlet gl) + { + gl.setGridletLength(gridletLength); + gl.setGridletFinishedSoFar(0); + + } + + /** + * Write some data into the final results file. + * @param user user name + * @param glID gridlet id + * @param resName Name of the resource + * @param cost the processing cost of the gridlet + * @param cpu the cpu time + * @param clock Current time + */ + private void writeFin(String user, int glID, String resName, + double cost, double cpu, double clock) + { + if (trace_flag == false) { + return; + } + + // Write into a results file + FileWriter fwriter = null; + try + { + fwriter = new FileWriter(user+"_Fin", true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + user+"_Fin"); + } + + try + { + fwriter.write(user +"\t "+ glID + "\t" + + resName + "\t" + cost + "\t"+ cpu + "\t" + + clock + "\n"); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + user+"_Fin"); + } + + try + { + fwriter.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + user+"_Fin"); + } + + } + + /** + * Write some data into a results file. + * @param user user name + * @param event Values: "Sending" or "Receive" a gridlet + * @param glID gridlet id + * @param resName Name of the resource + * @param status Status of the gridlet + * @param clock Current time + * */ + private void write(String user, String event, int glID, String resName, + String status, double clock) + { + if (trace_flag == false) { + return; + } + + // Write into a results file + FileWriter fwriter = null; + try + { + fwriter = new FileWriter(super.get_name(), true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + super.get_name()); + } + + try + { + fwriter.write(user + "\t " + event + "\t" + glID + "\t" + + resName + "\t" + status + "\t\t" + clock + "\t" + "\n"); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + super.get_name()); + } + + + try + { + fwriter.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + super.get_name()); + } + + } + + /** + * This function informs the GIS of this user about the failure of a resource + * @param resID the id of the resource which has failed + */ + private void informGIS(int resID) + { + Integer resID_Int = new Integer(resID); + + super.send(super.output, 0.0, AbstractGIS.NOTIFY_GIS_RESOURCE_FAILURE, + new IO_data(resID_Int, Link.DEFAULT_MTU, super.getRegionalGISId()) ); + } + + /** + * Initialize the results files (put headers over each column) + * */ + private void initializeResultsFile() + { + if (trace_flag == false) { + return; + } + + // Initialize the results file + FileWriter fwriter = null; + FileWriter fwriterFin = null; + try + { + fwriter = new FileWriter(super.get_name(), true); + fwriterFin = new FileWriter(super.get_name() + "_Fin", true); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while opening file " + super.get_name() + + " or " + super.get_name()+"_Fin"); + } + + try + { + fwriter.write( + "User \t\t Event \t GridletID \t Resource \t GridletStatus \t\t\t Clock\n"); + fwriterFin.write( + "User \t\t GridletID \t Resource \t Cost \t CPU time \t Latency\n"); + + + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while writing on file " + super.get_name()+ + " or " + super.get_name()+"_Fin"); + } + + try + { + fwriter.close(); + fwriterFin.close(); + } catch (Exception ex) + { + ex.printStackTrace(); + System.out.println( + "Unwanted errors while closing file " + super.get_name()+ + " or " + super.get_name()+"_Fin"); + } + } + + /** + * This function retrieves a list of available resources from the GIS. + * @return an array containing the ids of the resources + */ + private int[] getResList() + { + Object[] resList = super.getLocalResourceList(); + int resourceID[] = null; + + // if we have any resource + if ((resList != null) && (resList.length != 0)) + { + resourceID = new int[resList.length]; + for (int x = 0; x < resList.length; x++) + { + // Resource list contains list of resource IDs + resourceID[x] = ((Integer) resList[x]).intValue(); + + if (trace_flag == true) + { + System.out.println(super.get_name() + + ": resource[" + x + "] = " + resourceID[x]); + } + } + + } + + return resourceID; + } + +} // end class Added: trunk/examples/ResFailure/ResFailureEx01/GridletSubmission.java =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/GridletSubmission.java (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/GridletSubmission.java 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,54 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: UCLM (Spain) + * Created on: August 2007 + */ + + +import gridsim.Gridlet; + +/** + * This class is just a wrapper to denote + * whether this gridlet has been already submitted or not + * @author Agustin Caminero and Anthony Sulistio + * @since GridSim Toolkit 4.1 + */ +public class GridletSubmission +{ + private Gridlet gl; + private boolean submitted; + + + public GridletSubmission(Gridlet gl,boolean submitted) + { + this.gl = gl; + this.submitted = submitted; + } + + public Gridlet getGridlet() + { + return gl; + } + + public boolean getSubmitted() + { + return submitted; + } + + public void setGridlet(Gridlet g) + { + this.gl = g; + } + + public void setSubmitted(boolean submitted) + { + this.submitted = submitted; + } + +} // end class Added: trunk/examples/ResFailure/ResFailureEx01/README.txt =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/README.txt (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/README.txt 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,68 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: UCLM (Spain) + * Created on: August 2007 + */ + +Welcome to the example of how to use the computing resource failure functionality +To compile the example source code: + In Unix/Linux: javac -classpath $GRIDSIM/jars/gridsim.jar:. ResFailureEx01.java + In Windows: javac -classpath %GRIDSIM%\jars\gridsim.jar;. ResFailureEx01.java + +where $GRIDSIM or %GRIDSIM% is the location of the gridsimtoolkit package. + + +To run the class file: +In Unix/Linux: + java -classpath $GRIDSIM/jars/gridsim.jar:. ResFailureEx01 network_ex01.txt > file.txt + +In Windows: + java -classpath %GRIDSIM%\jars\gridsim.jar;. ResFailureEx01 network_ex01.txt > file.txt + + +The above command means run the program and output the results into a file +named "file.txt" rather than into screen or standard output. +To prevent from overwriting an existing file, +I renamed "file.txt" into "output.txt" + +NOTE: This example uses probabilistic distributions and random variables. + Hence, when running this example many times, the values will be different. + + +When running the example file, it will produce the following files: + + sim_trace -> created by the SimJava2 package (lower-level) to trace every + events (performed by SimJava and GridSim) during the simulation. + We don't need to worry about this file. Not to important for our + example. + + sim_report -> created by the SimJava2 package (lower-level) of GridSim. + This is a simulation report that contains general information about + running this experiment. We don't need to worry about this file. + Not to important for our example. + + Ex01_Regional_GIS -> contains one line describing each + registering/removing an event that takes place at the GIS. Resources + register in the begining of simulations, and after recovering from a + failure affecting all their machines. Resources will be removed when + they suffer a failure affecting all their machines. + + Ex01_Res_0, Ex01_Res_1, Ex01_Res_2 -> records when the resource + suffers a failure and when it recovers from the failure. It also records + how many machines failed, and the time of the fail/recovery. + + Ex01_User0 -> contains one line for each event regarding to the Gridlets. + These events are the sending/reception of a gridlet, and + each line include the status of the gridlet, time and resource. + + Ex01_User0_Fin -> contains one line for each gridlet, showing the resource + it has been executed, its cost, CPU time and total latency. + +NOTE: When you run the program multiple times, the new statistics will be + appended at the end of a file. Added: trunk/examples/ResFailure/ResFailureEx01/ResFailureEx01.java =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/ResFailureEx01.java (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/ResFailureEx01.java 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,326 @@ +/* + * Title: GridSim Toolkit + * Description: GridSim (Grid Simulation) Toolkit for Modeling and Simulation + * of Parallel and Distributed Systems such as Clusters and Grids + * An example of how to use the failure functionality. + * Licence: GPL - http://www.gnu.org/copyleft/gpl.html + * + * Author: Agustin Caminero and Anthony Sulistio + * Organization: UCLM (Spain) + * Created on: August 2007 + */ + +import gridsim.resFailure.*; +import gridsim.*; +import gridsim.net.*; +import java.util.*; +import gridsim.util.NetworkReader; +import gridsim.util.HyperExponential; + + +/** + * This example shows a basic topology with 1 user, 3 resources and 1 GIS. + * All of them are connected by a router. + * There is only one VO in this example. + * @author Agustin Caminero and Anthony Sulistio + * @since GridSim Toolkit 4.1 + */ +public class ResFailureEx01 +{ + public static void main(String[] args) + { + System.out.println("Starting failure example 1..."); + + try + { + if (args.length < 1) + { + System.out.println("Usage: java ResFailureEx01 network_ex01.txt"); + return; + } + + + ////////////////////////////////////////// + // First step: Initialize the GridSim package. It should be called + // before creating any entities. We can't run this example without + // initializing GridSim first. We will get a run-time exception + // error. + + // a flag that denotes whether to trace GridSim events or not. + boolean trace_flag = false; // dont use SimJava trace + int num_user = 1; // number of grid users + Calendar calendar = Calendar.getInstance(); + + // Initialize the GridSim package + System.out.println("Initializing GridSim package"); + GridSim.init(num_user, calendar, trace_flag); + trace_flag = true; + + + ////////////////////////////////////////// + // Second step: Builds the network topology among Routers. + + String filename = args[0]; // get the network topology + System.out.println("Reading network from " + filename); + LinkedList routerList = NetworkReader.createFIFO(filename); + + + ////////////////////////////////////////// + // Third step: Creates one RegionalGISWithFailure entity, + // linked to a router in the topology + + Router router = null; + double baud_rate = 100000000; // 100Mbps, i.e. baud rate of links + double propDelay = 10; // propagation delay in milliseconds + int mtu = 1500; // max. transmission unit in byte + int totalMachines = 10; // num of machines each resource has + + String NAME = "Ex01_"; // a common name + String gisName = NAME + "Regional_GIS"; // GIS name + + // a network link attached to this regional GIS entity + Link link = new SimpleLink(gisName + "_link", baud_rate, + propDelay, mtu); + + + // HyperExponential: mean, standard deviation, stream + // how many resources will fail + HyperExponential failureNumResPattern = + new HyperExponential(totalMachines / 2, totalMachines, 4); + + // when they will fail + HyperExponential failureTimePattern = + new HyperExponential(25, 100, 4); + + // how long the failure will be + HyperExponential failureLengthPattern = + new HyperExponential(20, 25, 4); // big test: (20, 100, 4); + + + // creates a new Regional GIS entity that generates a resource + // failure message according to these patterns. + RegionalGISWithFailure gis = new RegionalGISWithFailure(gisName, + link, failureNumResPattern, failureTimePattern, + failureLengthPattern); + gis.setTrace(trace_flag); // record this GIS activity + + // link these GIS to a router + router = NetworkReader.getRouter("Router0", routerList); + linkNetwork(router, gis); + + // print some info messages + System.out.println("Created a REGIONAL GIS with name " + gisName + + " and id = " + gis.get_id() + ", connected to " + + router.get_name() ); + + + ////////////////////////////////////////// + // Fourth step: Creates one or more GridResourceWithFailure + // entities, linked to a router in the topology + + String sched_alg = "SPACE"; // use space-shared policy + int totalResource = 3; // number of resources + ArrayList resList = new ArrayList(totalResource); + + // Each resource may have different baud rate, + // totalMachine, rating, allocation policy and the router to + // which it will be connected. However, in this example, we assume + // all have the same properties for simplicity. + int totalPE = 4; // num of PEs each machine has + int rating = 49000; // rating (MIPS) of PEs + int GB = 1000000000; // 1 GB in bits + baud_rate = 2.5 * GB; + + for (int i = 0; i < totalResource; i++) + { + // gets the router object from the list + router = NetworkReader.getRouter("Router0", routerList); + + // creates a new grid resource + String resName = NAME + "Res_" + i; + GridResourceWithFailure res = createGridResource(resName, + baud_rate, propDelay, mtu, totalPE, totalMachines, + rating, sched_alg); + + // add a resource into a list + resList.add(res); + res.setRegionalGIS(gis); // set the regional GIS entity + res.setTrace(trace_flag); // record this resource activity + + // link a resource to this router object + linkNetwork(router, res); + + System.out.println("Created a RESOURCE (" + totalMachines + + " machines, each with " + totalPE + " PEs) with name = " + + resName + " and id = " + res.get_id() + + ", connected to router " + router.get_name() + + " and registered to " + gis.get_name() ); + } + + + ////////////////////////////////////////// + // Fifth step: Creates one GridUserFailure entity, + // linked to a router of the topology + + int totalGridlet = 5; // total jobs + double pollTime = 100; // time between polls + int glSize = 100000; // the size of gridlets (input/output) + int glLength = 42000000; // the length (MI) of gridlets + String userName = NAME + "User0"; + + // gets the router object from the list + router = NetworkReader.getRouter("Router0", routerList); + + // a network link attached to this entity + Link link2 = new SimpleLink(userName + "_link", baud_rate, + propDelay, mtu); + + GridUserFailureEx01 user = new GridUserFailureEx01(userName, link2, + pollTime, glLength, glSize, glSize, trace_flag); + + user.setRegionalGIS(gis); // set the regional GIS entity + user.setGridletNumber(totalGridlet); + + // link a resource to this router object + linkNetwork(router, user); + + System.out.println("Created a USER with name " + userName + + " and id = " + user.get_id() + ", connected to " + + router.get_name() + ", and with " + totalGridlet + + " gridlets. Registered to " + gis.get_name() ); + System.out.println(); + + + ////////////////////////////////////////// + // Sixth step: Starts the simulation + GridSim.startGridSimulation(); + System.out.println("\nFinish failure example 1... \n"); + } + catch (Exception e) + { + e.printStackTrace(); + System.out.println("Unwanted errors happen"); + } + } + + /** + * Links a particular entity with a given Router. + * + * @param router a Router object + * @param obj a GridSim entity to be attached to the Router + */ + private static void linkNetwork(Router router, GridSimCore obj) throws Exception + { + if (router == null) { + System.out.println("Error - router is NULL."); + return; + } + + // get the baud rate of a link + double baud_rate = obj.getLink().getBaudRate(); + + // create the packet scheduler for this link + PacketScheduler pktObj = new FIFOScheduler(router.get_name() + + "_to_" + obj.get_name() ); + + // attach this GridSim entity to a Router + router.attachHost(obj, pktObj); + } + + /** + * Creates one Grid resource. A Grid resource contains one or more + * Machines. Similarly, a Machine contains one or more PEs (Processing + * Elements or CPUs). + * <p> + * In this simple example, we are simulating one Grid resource with three + * Machines that contains one or more PEs. + * + * @param name a Grid Resource name + * @param baud_rate the bandwidth of this entity + * @param delay the propagation delay + * @param MTU Maximum Transmission Unit + * @param totalPE number of PE per machine + * @param totalMachine number of machines in this resources + * @param rating rating of mahcines in this resource + * @param sched_alg the scheduling algorithm of this resource + * @return a GridResource object + */ + private static GridResourceWithFailure createGridResource(String name, + double baud_rate, double delay, int MTU, int totalPE, + int totalMachine, int rating, String sched_alg) + { + // Here are the steps needed to create a Grid resource: + // 1. We need to create an object of MachineList to store one or more + // Machines + MachineList mList = new MachineList(); + for (int i = 0; i < totalMachine; i++) + { + // 2. A Machine contains one or more PEs or CPUs. Therefore, should + // create an object of PEList to store these PEs before creating + // a Machine. + PEList peList = new PEList(); + + // 3. Create PEs and add these into an object of PEList. + for (int k = 0; k < totalPE; k++) + { + // need to store PE id and MIPS Rating + peList.add( new PE(k, rating) ); + } + + // 4. Create one Machine with its id and list of PEs or CPUs + mList.add( new Machine(i, peList) ); + } + + + // 5. Create a ResourceCharacteristics object that stores the + // properties of a Grid resource: architecture, OS, list of + // Machines, allocation policy: time- or space-shared, time zone + // and its price (G$/PE time unit). + String arch = "Sun Ultra"; // system architecture + String os = "Solaris"; // operating system + double time_zone = 9.0; // time zone this resource located + double cost = 3.0; // the cost of using this resource + + // we create Space_Shared_failure or Time_Shared_failure schedulers + int scheduling_alg = 0; // space_shared or time_shared + if (sched_alg.equals("SPACE") == true) { + scheduling_alg = ResourceCharacteristics.SPACE_SHARED; + } + else if (sched_alg.equals("TIME") == true) { + scheduling_alg = ResourceCharacteristics.TIME_SHARED; + } + + ResourceCharacteristics resConfig = new ResourceCharacteristics( + arch, os, mList, scheduling_alg, time_zone, cost); + + + // 6. Finally, we need to create a GridResource object. + long seed = 11L*13*17*19*23+1; + double peakLoad = 0.0; // the resource load during peak hour + double offPeakLoad = 0.0; // the resource load during off-peak hr + double holidayLoad = 0.0; // the resource load during holiday + + // incorporates weekends so the grid resource is on 7 days a week + LinkedList Weekends = new LinkedList(); + Weekends.add(new Integer(Calendar.SATURDAY)); + Weekends.add(new Integer(Calendar.SUNDAY)); + + // incorporates holidays. However, no holidays are set in this example + LinkedList Holidays = new LinkedList(); + GridResourceWithFailure gridRes = null; + try + { + // creates a GridResource with a link + gridRes = new GridResourceWithFailure(name, + new SimpleLink(name + "_link", baud_rate, delay, MTU), + seed, resConfig, peakLoad, offPeakLoad, holidayLoad, + Weekends, Holidays); + } + catch (Exception e) { + e.printStackTrace(); + } + + return gridRes; + } + +} // end class Added: trunk/examples/ResFailure/ResFailureEx01/network_ex01.txt =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/network_ex01.txt (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/network_ex01.txt 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,15 @@ +# The topology of this example is as follows (with 1 user and 1 resource) +# +# user --- Router0 ---- Resource0 +# +# total number of Routers +1 + +# specifies each router name and whether to log its activities or not +# by default no logging is required +Router0 + +# specify the link between two Routers +# The format is: +# Router_name1 Router_name2 baud_rate(GB/s) prop_delay(ms) mtu(byte) + Added: trunk/examples/ResFailure/ResFailureEx01/output.txt =================================================================== --- trunk/examples/ResFailure/ResFailureEx01/output.txt (rev 0) +++ trunk/examples/ResFailure/ResFailureEx01/output.txt 2007-09-01 02:10:24 UTC (rev 50) @@ -0,0 +1,96 @@ +Starting failure example 1... +Initializing GridSim package +Initialising... +Reading network from network_ex01.txt +Created a REGIONAL GIS with name Ex01_Regional_GIS and id = 6, connected to Router0 +Created a RESOURCE (10 machines, each with 4 PEs) with name = Ex01_Res_0 and id = 10, connected to router Router0 and registered to Ex01_Regional_GIS +Created a RESOURCE (10 machines, each with 4 PEs) with name = Ex01_Res_1 and id = 15, connected to router Router0 and registered to Ex01_Regional_GIS +Created a RESOURCE (10 machines, each with 4 PEs) with name = Ex01_Res_2 and id = 20, connected to router Router0 and registered to Ex01_Regional_GIS +Created a USER with name Ex01_User0 and id = 25, connected to Router0, and with 5 gridlets. Registered to Ex01_Regional_GIS + +Starting GridSim version 4.0 +Entities started. +Ex01_Regional_GIS: sends an autogenerated GRIDRESOURCE_FAILURE to itself. Clock(): 0.0. resTimeFail: 20.918443148412194 seconds +Ex01_User0: initial SUBMIT_GRIDLET event will be at clock: 294. Current clock: 0.0 +Ex01_Res_1.body(): wait for 10 seconds before registering to Ex01_Regional_GIS +Ex01_Res_0.body(): wait for 10 seconds before registering to Ex01_Regional_GIS +Ex01_Res_2.body(): wait for 10 seconds before registering to Ex01_Regional_GIS + +Ex01_Regional_GIS: registering Ex01_Res_0 +Ex01_Regional_GIS: list[0] = Ex01_Res_0 + + +Ex01_Regional_GIS: registering Ex01_Res_1 +Ex01_Regional_GIS: list[0] = Ex01_Res_0 +Ex01_Regional_GIS: list[1] = Ex01_Res_1 + + +Ex01_Regional_GIS: registering Ex01_Res_2 +Ex01_Regional_GIS: list[0] = Ex01_Res_0 +Ex01_Regional_GIS: list[1] = Ex01_Res_1 +Ex01_Regional_GIS: list[2] = Ex01_Res_2 + +Ex01_Regional_GIS: 3 resources will fail in this simulation. Num of failed machines on each resource will be decided later +Ex01_Regional_GIS: sends an autogenerated GRIDRESOURCE_FAILURE to itself. Clock: 20.918443148412194, resTimeFail: 9.29564320636208 seconds +Ex01_Regional_GIS: sends an autogenerated GRIDRESOURCE_FAILURE to itself. Clock: 20.918443148412194, resTimeFail: 10.226805942007969 seconds +Ex01_Regional_GIS: sends an autogenerated GRIDRESOURCE_FAILURE to itself. Clock: 20.918443148412194, resTimeFail: 9.592465799264474 seconds +Ex01_Regional_GIS: sends a GRIDRESOURCE_FAILURE event to the resource Ex01_Res_1. numMachFailed: 3. Clock: 31.185283368820173. Fail duration: 68.2010926576801 hours. Some machines may still work or may not. +Ex01_Res_1.processFailure(): receives an event GRIDRESOURCE_FAILURE. Clock: 31.205408168820174. There are STILL working machines in this resource. +Ex01_Res_1 - Machine: 0 is set to FAILED +Ex01_Res_1 - Machine: 0 is FAILED +Ex01_Res_1 - Machine: 1 is set to FAILED +Ex01_Res_1 - Machine: 1 is FAILED +Ex01_Res_1 - Machine: 2 is set to FAILED +Ex01_Res_1 - Machine: 2 is FAILED +Ex01_User0: received an SUBMIT_GRIDLET event. Clock: 294.0 +Ex01_User0: resource[0] = 10 +Ex01_User0: resource[1] = 15 +Ex01_User0: resource[2] = 20 +Ex01_User0: Sending Gridlet #0 to Ex01_Res_2 at clock: 374.04012479999994 +Ex01_User0: resource[0] = 10 +Ex01_User0: resource[1] = 15 +Ex01_User0: resource[2] = 20 +Ex01_User0: Sending Gridlet #1 to Ex01_Res_1 at clock: 374.77037439999924 +Ex01_User0: resource[0] = 10 +Ex01_User0: resource[1] = 15 +Ex01_User0: resource[2] = 20 +Ex01_User0: Sending Gridlet #2 to Ex01_Res_2 at clock: 375.50062399999854 +Ex01_User0: resource[0] = 10 +Ex01_User0: resource[1] = 15 +Ex01_User0: resource[2] = 20 +Ex01_User0: Sending Gridlet #3 to Ex01_Res_2 at clock: 376.23087359999784 +Ex01_User0: resource[0] = 10 +Ex01_User0: resource[1] = 15 +Ex01_User0: resource[2] = 20 +Ex01_User0: Sending Gridlet #4 to Ex01_Res_0 at clock: 376.96112319999713 +Ex01_User0: received an GRIDLET_RETURN event. Clock: 1233.4001439999986 +Ex01_User0: Receiving Gridlet #0 with status Success at time = 1233.4001439999986 from resource Ex01_Res_2 +Ex01_User0: received an GRIDLET_RETURN event. Clock: 1234.130393599998 +Ex01_User0: Receiving Gridlet #1 with status Success at time = 1234.130393599998 from resource Ex01_Res_1 +Ex01_User0: received an GRIDLET_RETURN event. Clock: 1234.8606431999972 +Ex01_User0: Receiving Gridlet #2 with status Success at time = 1234.8606431999972 from resource Ex01_Res_2 +Ex01_User0: received an GRIDLET_RETURN event. Clock: 1235.5306431999966 +Ex01_User0: Receiving Gridlet #3 with status Success at time = 1235.5306431999966 from resource Ex01_Res_2 +Ex01_User0:... [truncated message content] |