From: Vinicius P. <vin...@gm...> - 2008-08-20 18:21:36
|
Hi Anthony, So, I made two simple tests submitting a gridlet. First I submited it to a GridResource. In the second I submitted it to a GridResource and after holding for 100 secs I moved to another GridResource with the same characteristics (one machine with one PE). The result is that the execution seems to start from the beggining, ignoring the amount executed so far. Bellow are the gridlet history for the two executions. So, do you know a wise way to resume the gridlet execution from the point where it stopped? Regards, Vinicius ========== OUTPUT ========== Gridlet ID STATUS Resource ID Cost 0 SUCCESS 5 0.0 Time below denotes the simulation time. Time (sec) Description Gridlet #0 ------------------------------------------ 0,00 Creates Gridlet ID #0 0,00 Assigns the Gridlet to Try (ID #13) 8,28 Allocates this Gridlet to Resource_0 (ID #5) with cost = $0.0/sec 8,28 Sets the submission time to 8,28 8,28 Sets Gridlet status from Created to InExec 8,28 Sets the execution start time to 8,28 248,28 Sets Gridlet status from InExec to Success 248,28 Sets the wall clock time to 240,00 and the actual CPU time to 240,00 248,28 Sets the length's finished so far to 480000.0 Gridlet #0, length = 480000.0, finished so far = 480000.0 =========================================== ========== OUTPUT ========== Gridlet ID STATUS Resource ID Cost 0 SUCCESS 9 0.0 Time below denotes the simulation time. Time (sec) Description Gridlet #0 ------------------------------------------ 0,00 Creates Gridlet ID #0 0,00 Assigns the Gridlet to Try (ID #13) 8,28 Allocates this Gridlet to Resource_0 (ID #5) with cost = $0.0/sec 8,28 Sets the submission time to 8,28 8,28 Sets Gridlet status from Created to InExec 8,28 Sets the execution start time to 8,28 109,32 Sets Gridlet status from InExec to Canceled 109,32 Sets the wall clock time to 101,04 and the actual CPU time to 101,04 109,32 Sets the length's finished so far to 202080.0 109,40 Moves Gridlet from Resource_0 (ID #5) to Resource_1 (ID #9) with cost = $0.0/sec 109,40 Sets the submission time to 109,40 109,40 Sets Gridlet status from Canceled to InExec 109,40 Sets the execution start time to 109,40 350,40 Sets Gridlet status from InExec to Success 350,40 Sets the wall clock time to 241,00 and the actual CPU time to 241,00 350,40 Sets the length's finished so far to 480000.0 Gridlet #0, length = 480000.0, finished so far = 480000.0 =========================================== 2008/8/18 Anthony Sulistio <an...@cs...> > > I think it resume its execution from the point where it stopped. > However, pls double check on this one for me. > > anthony > > > > On Mon, 18 Aug 2008, Vinicius Pinheiro wrote: > > Hi Anthony, >> >> Thank you! It really worked for me now. But I have one more question: when >> the gridlet is moved to another grid resource it resume its execution from >> begining or from the point where it stopped? I did some tests because I'm >> trying to simulate a checkpoint mechanism and I need to know this for >> sure. >> >> Thanks >> >> Vinicius >> >> >> 2008/8/18 Anthony Sulistio <an...@cs...> >> >> >>> Hello, >>> >>> The resource scheduler i.e. SpaceShared or TimeShared >>> will update the gridlet length or call >>> Gridlet#setGridletFinishedSoFar() method, >>> according the following conditions: >>> - the gridlet is finished executing >>> - the gridlet is cancelled >>> - the gridlet is migrated to another resource >>> >>> The reason is GridSim is a discrete-event simulation, hence, the >>> simulation >>> time is not continuous, e.g. time = 1, 2, 3, 4, ... >>> Instead, the time jumps based on the arrival of new events, >>> e.g. simulation time = 0, 40, 100, 700, ... >>> >>> >>> Thus, the best way to check the status of a gridlet is by using >>> the GridSim#gridletStatus() method. >>> This method returns the current Gridlet status or -1 if not found. >>> The various Gridlet status can be found in Gridlet class. >>> Note that you should only call this method at a certain interval, >>> not in a loop, since it will slow down the simulation. >>> In addition, the gridlet length will still be zero, until >>> one of the 3 conditions is satisfied. >>> >>> >>> >>> anthony >>> >>> >>> >>> On Wed, 13 Aug 2008, Vinicius Pinheiro wrote: >>> >>> Hi, >>> >>>> >>>> I'm having problems in getting the amount of computation executed so >>>> far. >>>> The method Gridlet.getGridletFinishedSoFar() always return 0. Just when >>>> the >>>> Gridlet has finished is that it returns the size of the gridlet, what is >>>> useless at this point. >>>> My code something like: >>>> >>>> while(gridletNotFinished()) { >>>> double amount = gridlet.getGridletFinishedSoFar(); >>>> System.out.println("FinishedSofar: " + amount); >>>> } >>>> >>>> Is there something there I have to do in order to get this method >>>> working >>>> properly? >>>> >>>> Thanks in advance, >>>> >>>> Vinicius Pinheiro >>>> >>>> >>>> >> |