From: ye h. <hua...@gm...> - 2009-02-09 23:42:37
|
Hi, Actually, I think the problem also exists upon gridsim itself (or i haven't understood it well so far). I encountered a similar problem by extend the Example code of gridsim itself, which i had also submitted to the maillist. Unfortunately, no one replied that last time. The following is the details: --- ---- [start] -------------- However, I find another confusing "bug", it's about the way of receiving gridlet sent back from resources. Here i am going to explain it using a demo from GridSim's official example file: Example 04: Starting from line 109 of Example 04, submitting and receiving gridlets are finished in one loop as follows: --- code snippet 1 --- for (int i = 0; i < this.list_.size(); i++) { gridlet = (Gridlet) this.list_.get(i); info = "Gridlet_" + gridlet.getGridletID(); super.gridletSubmit(gridlet, resourceID); gridlet = super.gridletReceive(); this.receiveList_.add(gridlet); } In my scenario, in order the decouple the behavior, I split the procedure into two parts as follows: --- code snippet 2 --- // part 1: submit gridlet for (int i = 0; i < this.list_.size(); i++) { gridlet = (Gridlet) this.list_.get(i); info = "Gridlet_" + gridlet.getGridletID(); super.send(resourceID, GridSimTags.SCHEDULE_NOW, GridSimTags.GRIDLET_SUBMIT, gridlet); } // part 2: receive gridlet from gridresource Sim_event ev = new Sim_event(); while (Sim_system.running()) { super.sim_get_next(ev); if (ev.get_tag() == GridSimTags.GRIDLET_RETURN){ gridlet = (Gridlet) ev.get_data(); // stores the received Gridlet into a new GridletList object this.receiveList_.add(gridlet); } } // part 3, print the received gridlet list printGridletList(this.receiveList_); --- Then, during the execution, I got the prompted warning : Resource_0: Warning - Gridlet #2 owned by Example4 is already completed/finished. The more gridlets were submitted, the more warning will be prompted. I have to say, it seems there is no mistake caused by this warning. But to understand the infrastructure better, is there anyone could help me about why it appears and how to avoid it? --- ---- [end] -------------- Regards ye On 9 Feb, 2009, at 6:09 PM, Jeyarani Rajarathinam wrote: > Hi Friends, > I am using GridSim4.0 and I have created new internal policy > instead > of FCFS. I get the following error. Please help me to correct the > problem > > JR > I have submitted 4 gridlets and the fourth gridlet is small > compared to > rest. > > Sim_system: No more future events > Gathering simulation data. > GridResource_0: Warning - Gridlet #3 owned by User_0 is already > completed/finish > ed.Exception in thread "Thread-9" > java.lang.NullPointerExceptionTherefore, it is not being executed > again > > at Example8.body(Example8.java:107) > > at eduni.simjava.Sim_entity.run(Sim_entity.java:603) > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with > Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills > and code to > build responsive, highly engaging applications that combine the > power of local > resources and data with the reach of the web. Download the Adobe AIR > SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > Gridsim-developers mailing list > Gri...@li... > https://lists.sourceforge.net/lists/listinfo/gridsim-developers -- Ye Huang, Department of Informatics University of Fribourg / Pérolles 2 - Bld de Pérolles 90 1700 Fribourg, Switzerland e-mail: ye....@he..., ye....@un... http://diuf.unifr.ch/people/huangy/ Office: +41 26 429 65 95 |