Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'noRngStream' into 'master'
[simgrid.git] / examples / s4u / plugin-hostload / s4u-plugin-hostload.cpp
index 6ac50d8..27ecdda 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -35,9 +35,8 @@ static void execute_load_test()
            "far: %.2E, average load as reported by the HostLoad plugin: %.5f (should be %.5f)",
            simgrid::s4u::Engine::get_clock() - start, host->get_speed(), speed, sg_host_get_computed_flops(host),
            sg_host_get_avg_load(host),
-           static_cast<double>(200E6) /
-               (10.5 * speed * host->get_core_count() +
-                (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->get_speed() * host->get_core_count()));
+           200E6 / (10.5 * speed * host->get_core_count() +
+                    (simgrid::s4u::Engine::get_clock() - start - 0.5) * host->get_speed() * host->get_core_count()));
 
   // ========= Change power peak =========
   int pstate = 1;
@@ -88,7 +87,7 @@ int main(int argc, char* argv[])
   sg_host_load_plugin_init();
   simgrid::s4u::Engine e(&argc, argv);
 
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/energy_platform.xml\n", argv[0], argv[0]);
   e.load_platform(argv[1]);
 
   simgrid::s4u::Actor::create("load_test", simgrid::s4u::Host::by_name("MyHost1"), execute_load_test);