--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+<platform version="4.1">
+ <zone id="AS0" routing="Full">
+ <host id="Tremblay" speed="25Mf"/>
+ <host id="Jupiter" speed="25Mf" availability_file="trace/jupiter_speed.trace" />
+ <host id="Fafard" speed="25Mf"/>
+ <host id="Ginette" speed="25Mf"/>
+ <host id="Bourassa" speed="25Mf"/>
+
+ <link id="1" bandwidth="1MBps" latency="10ms" bandwidth_file="trace/link1_bandwidth.trace" latency_file="trace/link1_latency.trace" />
+ <link id="2" bandwidth="1MBps" latency="10ms"/>
+ <link id="3" bandwidth="1MBps" latency="10ms"/>
+ <link id="4" bandwidth="1MBps" latency="10ms"/>
+ <link id="5" bandwidth="1MBps" latency="10ms"/>
+ <link id="6" bandwidth="1MBps" latency="10ms"/>
+ <link id="7" bandwidth="1MBps" latency="10ms"/>
+ <link id="8" bandwidth="1MBps" latency="10ms"/>
+ <link id="9" bandwidth="1MBps" latency="10ms"/>
+ <link id="10" bandwidth="1MBps" latency="10ms"/>
+ <link id="loopback_FATPIPE" bandwidth="10MBps" latency="0" sharing_policy="FATPIPE"/>
+ <link id="loopback" bandwidth="100MBps" latency="0"/>
+
+ <route src="Tremblay" dst="Tremblay">
+ <link_ctn id="loopback"/>
+ </route>
+ <route src="Jupiter" dst="Jupiter">
+ <link_ctn id="loopback"/>
+ </route>
+ <route src="Fafard" dst="Fafard">
+ <link_ctn id="loopback"/>
+ </route>
+ <route src="Ginette" dst="Ginette">
+ <link_ctn id="loopback"/>
+ </route>
+ <route src="Bourassa" dst="Bourassa">
+ <link_ctn id="loopback"/>
+ </route>
+ <route src="Tremblay" dst="Jupiter">
+ <link_ctn id="1"/>
+ </route>
+ <route src="Tremblay" dst="Fafard">
+ <link_ctn id="2"/>
+ </route>
+ <route src="Tremblay" dst="Ginette">
+ <link_ctn id="3"/>
+ </route>
+ <route src="Tremblay" dst="Bourassa">
+ <link_ctn id="4"/>
+ </route>
+ <route src="Jupiter" dst="Fafard">
+ <link_ctn id="5"/>
+ </route>
+ <route src="Jupiter" dst="Ginette">
+ <link_ctn id="6"/>
+ </route>
+ <route src="Jupiter" dst="Bourassa">
+ <link_ctn id="7"/>
+ </route>
+ <route src="Fafard" dst="Ginette">
+ <link_ctn id="8"/>
+ </route>
+ <route src="Fafard" dst="Bourassa">
+ <link_ctn id="9"/>
+ </route>
+ <route src="Ginette" dst="Bourassa">
+ <link_ctn id="10"/>
+ </route>
+ </zone>
+</platform>
0 0.5
-2 1.0
\ No newline at end of file
+2 1.0
+4 0.7
+6 0.1
+8 4
+LOOPAFTER 10
\ No newline at end of file
+++ /dev/null
-2 62500000
-4 31250000
-LOOPAFTER 6
--- /dev/null
+2 2000000
+4 3000000
+LOOPAFTER 6
--- /dev/null
+1 0.003
+3 0.015
+LOOPAFTER 6
engine-filtering
exec-async exec-basic exec-dvfs exec-monitor exec-ptask exec-remote
io-async io-file-system io-file-remote io-storage-raw
- platform-failures platform-properties plugin-hostload
+ platform-failures platform-profile platform-properties
+ plugin-hostload
replay-comm replay-storage
routing-get-clusters
synchro-barrier synchro-mutex synchro-semaphore)
|br| `examples/s4u/platform-properties/s4u-platform-properties_d.xml <https://framagit.org/simgrid/simgrid/tree/master/examples/s4u/platform-properties/s4u-platform-properties_d.xml>`_
|br| `examples/platforms/prop.xml <https://framagit.org/simgrid/simgrid/tree/master/examples/platforms/prop.xml>`_
+ - **Specifying state profiles:** shows how to specify when the
+ resources must be turned off and on again, and how to react to such
+ failures in your code.
+
+ |br| `examples/platforms/small_platform_with_failure.xml <https://framagit.org/simgrid/simgrid/tree/master/examples/platforms/small_platform_with_failure.xml>`_
+ |br| The state profiles in `examples/platforms/trace <https://framagit.org/simgrid/simgrid/tree/master/examples/platforms/trace>`_
+
+ - **Specifying speed profiles:** shows how to specify an external
+ load to resources, variating their peak speed over time.
+
+ |br| `examples/platforms/small_platform_profile.xml <https://framagit.org/simgrid/simgrid/tree/master/examples/platforms/small_platform_profile.xml>`_
+ |br| The speed, bandwidth and latency profiles in `examples/platforms/trace <https://framagit.org/simgrid/simgrid/tree/master/examples/platforms/trace>`_
+
=================
Energy Simulation
=================
--- /dev/null
+/* Copyright (c) 2017-2019. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include "simgrid/s4u.hpp"
+
+/* This example demonstrates how to attach a profile to an host or a link,
+ * to specify external changes to the resource speed. The first way to do
+ * so is to use a file in the XML, while the second is to use the programmatic interface.
+ */
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_platform_profile, "Messages specific for this s4u example");
+
+/* Main function of the Yielder process */
+static void watcher()
+{
+ simgrid::s4u::Host* jupiter = simgrid::s4u::Host::by_name("Jupiter");
+ simgrid::s4u::Host* fafard = simgrid::s4u::Host::by_name("Fafard");
+ simgrid::s4u::Link* link1 = simgrid::s4u::Link::by_name("1");
+ simgrid::s4u::Link* link2 = simgrid::s4u::Link::by_name("2");
+
+ for (int i = 0; i < 10; i++) {
+ XBT_INFO("Fafard: %.0fGflops, Jupiter: % 3.0fGflops, Link1: (%.2fMB/s %.0fms), Link2: (%.2fMB/s %.0fms)",
+ fafard->get_speed() * fafard->get_available_speed() / 1000000,
+ jupiter->get_speed() * jupiter->get_available_speed() / 1000000, link1->get_bandwidth() / 1000,
+ link1->get_latency() * 1000, link2->get_bandwidth() / 1000, link2->get_latency() * 1000);
+ simgrid::s4u::this_actor::sleep_for(1);
+ }
+};
+
+int main(int argc, char* argv[])
+{
+ simgrid::s4u::Engine e(&argc, argv);
+
+ xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s platform.xml deployment.xml\n", argv[0], argv[0]);
+
+ e.load_platform(argv[1]);
+
+ simgrid::s4u::Actor::create("watcher", simgrid::s4u::Host::by_name("Tremblay"), watcher);
+
+ e.run(); /* - Run the simulation */
+
+ return 0;
+}
--- /dev/null
+#!/usr/bin/env tesh
+
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-profile ${platfdir}/small_platform_profile.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [ 0.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 12Gflops, Link1: (1000.00MB/s 10ms), Link2: (1000.00MB/s 10ms)
+> [ 1.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 12Gflops, Link1: (1000.00MB/s 3ms), Link2: (1000.00MB/s 10ms)
+> [ 2.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 25Gflops, Link1: (2000.00MB/s 3ms), Link2: (1000.00MB/s 10ms)
+> [ 3.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 25Gflops, Link1: (2000.00MB/s 15ms), Link2: (1000.00MB/s 10ms)
+> [ 4.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 18Gflops, Link1: (3000.00MB/s 15ms), Link2: (1000.00MB/s 10ms)
+> [ 5.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 18Gflops, Link1: (3000.00MB/s 15ms), Link2: (1000.00MB/s 10ms)
+> [ 6.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 2Gflops, Link1: (3000.00MB/s 15ms), Link2: (1000.00MB/s 10ms)
+> [ 7.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 2Gflops, Link1: (3000.00MB/s 15ms), Link2: (1000.00MB/s 10ms)
+> [ 8.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 100Gflops, Link1: (3000.00MB/s 15ms), Link2: (1000.00MB/s 10ms)
+> [ 9.000000] (1:watcher@Tremblay) Fafard: 25Gflops, Jupiter: 100Gflops, Link1: (3000.00MB/s 15ms), Link2: (1000.00MB/s 10ms)
examples/platforms/trace/ginette_state.trace
examples/platforms/trace/jupiter_speed.trace
examples/platforms/trace/jupiter_state.trace
- examples/platforms/trace/link1_avail.trace
+ examples/platforms/trace/link1_bandwidth.trace
+ examples/platforms/trace/link1_latency.trace
examples/platforms/trace/link3_state.trace
examples/platforms/trace/link4_state.trace
examples/platforms/trace/linkBandwidth7.bw
examples/platforms/small_platform_constant.xml
examples/platforms/small_platform_fatpipe.xml
examples/platforms/small_platform_one_link_routes.xml
+ examples/platforms/small_platform_profile.xml
examples/platforms/small_platform_with_failures.xml
examples/platforms/small_platform_with_routers.xml
examples/platforms/syscoord/generate_peer_platform.pl