From: Jonathan M. <jon...@bs...> - 2009-03-12 19:43:05
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, Analyzing the code, I've found that my problem with new flow level network is that there is a "pretty" static attribute in GridSimCore, which is initialized to NET_PACKET_LEVEL by default... [...] /** Specifies which type of network to be used. * By default, the simulation uses the gridsim.net package or differentiated * network service. To change this default property, please use the * {@link gridsim.GridSim#initNetworkType(int)} method <b>before</b> the * simulation starts. * @see gridsim.GridSim#initNetworkType(int) * @see gridsim.GridSimTags#NET_PACKET_LEVEL * @see gridsim.GridSimTags#NET_FLOW_LEVEL * @see gridsim.GridSimTags#NET_BUFFER_PACKET_LEVEL */ protected static int NETWORK_TYPE = GridSimTags.NET_PACKET_LEVEL; [...] This implies that every creation of an entity based on GridSimCore (such as users) initializes its Sim_ports in/out with Input/Output types... which are incompatible with flow networking (that use FlowInput/FlowOutput). To solve this...you can see the "note" in the javadoc of GridSimCore that tells us how to change this attribute: [...] use the gridsim.GridSim.initNetworkType(int) method before the simulation starts. [...] But that is not completely true, because calling the method immediately before GridSim.startGridSimulation is useless, since all the entities that are created before starting the simulation would use the default NET_PACKET_LEVEL. So eventually, the solution is using the method immediately after GridSim is initialized (GridSim.init), instead of before starting the simulation. Finally, my question to developers is, why do you use this static attribute instead of taking the type of Link into account to know whether we want old input/output or new flowinput/flowoutput? Moreover, I think that you shouldn't expect that users find this note in GridSimCore class documentation. Thanks, - -- - ----------------------------------------------------------------------- Jonathan Martí Fraiz Storage Systems Research Group - Computer Sciences Department Barcelona Supercomputing Center - Centro Nacional de Supercomputación www : http://www.bsc.es/StorageSystems email : jonathan(dot)marti(at)bsc(dot)es phone : (0034) 934054281 - ----------------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkm5ZckACgkQ4cH1a6R2mCveJgCfTlxF3tL36UfE72Uf1YicKp5x oC8AnR1jm/WJc9irrBR3zryXi3JSWhKs =ltVV -----END PGP SIGNATURE----- |