cloudsimsdn icon indicating copy to clipboard operation
cloudsimsdn copied to clipboard

StartExperimentSFCEdge.java file potential bug or intended feature

Open Ten000hours opened this issue 6 years ago • 3 comments

Hi, I think I run across a bug when I run the example java file(StartExperimentSFCEdge) with program arguments LFF 0 example-edge/edge.physical.json example-edge/edge.virtual.json example-edge/ edge.workload_host1.csv edge.workload_host2.csv It throws the Null pointer exception instead of finishing correctly. The exception info as follows.

java.lang.NullPointerException at org.cloudbus.cloudsim.sdn.example.StartExperimentSFCEdge.getAllHostList(StartExperimentSFCEdge.java:360) at org.cloudbus.cloudsim.sdn.example.StartExperimentSFCEdge.startSimulation(StartExperimentSFCEdge.java:340) at org.cloudbus.cloudsim.sdn.example.StartExperimentSFCEdge.main(StartExperimentSFCEdge.java:316)

and this execption

java.lang.Exception: net : Error - this entity has no PEs. Therefore, can't process any Cloudlets. at org.cloudbus.cloudsim.Datacenter.(Datacenter.java:104) at org.cloudbus.cloudsim.sdn.physicalcomponents.SDNDatacenter.(SDNDatacenter.java:61) at org.cloudbus.cloudsim.sdn.example.StartExperimentSFCEdge.createSDNDatacenter(StartExperimentSFCEdge.java:443) at org.cloudbus.cloudsim.sdn.example.StartExperimentSFCEdge.createPhysicalTopology(StartExperimentSFCEdge.java:379) at org.cloudbus.cloudsim.sdn.example.StartExperimentSFCEdge.main(StartExperimentSFCEdge.java:291)

The enviornment: --jdk1.8.0_181 --cloudsim 4.0 jar --idea 2019.2 Ultimate

I try to fix this bug by adding function to assert the type of dcName field ("network" or "cloud"). If this is an intended feature, I am sorry for disturbing you guys.

Ten000hours avatar Jan 30 '20 09:01 Ten000hours

Hi, thank you for your comments. I think you are correct with the bug originally published by the author. However, I had patched the zero PEs bug for NOS_net type in the DataCenter.java from CloudSim.

hetianzhang avatar Jun 02 '20 14:06 hetianzhang

Dear author, I meet this problem again in the latest release. Here are my settings: cloudsimsdn version: cloudsimsdn-2.0.1-beta cloudsim jar version: 4.0 (I also create jar file from cloudsim 5.0 source code and change pom.xml) IDE: Eclipse 4.16 JDK: 1.11 OS: win10

I have tried cloudsim-4.0.jar from release page, jar file created from cloudsim 4.0 and 5.0 source code.

magaboomchen avatar Sep 01 '20 11:09 magaboomchen

Dear author, I meet this problem again in the latest release. Here are my settings: cloudsimsdn version: cloudsimsdn-2.0.1-beta cloudsim jar version: 4.0 (I also create jar file from cloudsim 5.0 source code and change pom.xml) IDE: Eclipse 4.16 JDK: 1.11 OS: win10

I have tried cloudsim-4.0.jar from release page, jar file created from cloudsim 4.0 and 5.0 source code.

Hi, I can't reproduce the bug you encountered. To clarify any confusion of the CloudSim jar version, I simply update the installation guild. Please check.

hetianzhang avatar Sep 10 '20 08:09 hetianzhang