[Simgrid-user] Creating a simulator for dynamic environment

Arnaud Legrand Arnaud.Legrand at imag.fr
Wed Jun 22 19:45:09 CEST 2005


A few days ago, Nguyen The Loc wrote:

> Because I can not conduct my algorithm in a real LAN or WAN, I want to build
> my simulator base on SimGrid in order to simulate above environment, but I
> don't know how to change CPU power (and bandwidth) during running time.
> For example, now I use a platform file (platform.xml)  like that 
> <?xml version='1.0'?>
> <!DOCTYPE platform_description SYSTEM "surfxml.dtd">
> <platform_description>
>   <!-- ljlkj -->
>   <cpu name="Tremblay" power="98.094999999999999"/>
>   <cpu name="Jupiter" power="76.296000000000006"/>
>   <cpu name="Fafard" power="76.296000000000006"/>
>   <cpu name="Ginette" power="48.492"/>
>   <cpu name="Bourassa" power="48.492"/>
>   <network_link name="6" bandwidth="41.279125" latency="5.9904e-05"/>
>   <network_link name="11" bandwidth="0.25275" latency="0.00570455"/>
>   <network_link name="3" bandwidth="34.285625" latency="0.000514433"/>
> so during running time of my program, the CPU power of Tremblay always is
> 98.094999, Jupiter always is 76.296000 .... I don't like that. I want the
> CPU power of slaves such as Tremblay change (according to a my rule) while
> slaves execute its chunk.

OK. Have a look in testsuite/surf/. Here is a simple example of cpu
availability trace:

0.0 1.0
11.0 0.5
20.0 0.9

It means that at time 0, the cpu availability is equal to 1.0. At time 11.0,
it changes to be equal to 0.5. At time 20.0, the new value is 0.9. At time
21.0, the new value is 1.0. At time 32.0 the new value is 0.5, and so on.
Get rid of the first line if you don't want a periodic trace.

Assume you have such a file called trace_A.txt. Then if you replace

   <cpu name="Tremblay" power="98.094999999999999"/>


   <cpu name="Tremblay" power="98.094999999999999" availability_file="trace_A.txt"/>

The power of Tremblay will vary accordingly. As I already explained in a
recent email, I know I have to give more detailed examples about trace usage
and I even have opened a bug for that:


I'll do it as soon as I have a little bit of time... :(

Hope this helps.


    Arnaud Legrand

Most people find the concept of programming obvious, but the doing
    -- "Epigrams in Programming", by Alan J. Perlis of Yale University.

More information about the Simgrid-user mailing list