io-file task-priority
plugin-hostload
process-create process-join
- platform-properties process-startkilltime synchro-semaphore trace-categories
+ synchro-semaphore trace-categories
trace-route-user-variables trace-link-user-variables trace-masterworker trace-platform
trace-process-migration trace-host-user-variables)
add_executable (${x} ${x}/${x}.c)
set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.c ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/${file}.h)
endforeach()
-foreach (file app-chainsend app-masterworker app-pingpong dht-kademlia dht-pastry platform-properties
- task-priority)
+foreach (file app-chainsend app-masterworker app-pingpong dht-kademlia dht-pastry task-priority)
set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/${file}/${file}_d.xml)
endforeach()
${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/dogbone_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/onelink_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/one_cluster_d.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/two_clusters_d.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/baseline_d.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/kill_d.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_d.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/process-startkilltime/start_kill_d.xml PARENT_SCOPE)
+ ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/two_clusters_d.xml PARENT_SCOPE)
foreach(x app-chainsend app-masterworker app-pingpong app-token-ring
cloud-capping cloud-masterworker cloud-migration cloud-simple
foreach(x actions-comm actions-storage
async-wait async-waitall async-waitany
cloud-sharing get_sender host_on_off host_on_off_recv host_on_off_processes
- process-daemon process-kill process-migration process-suspend process-yield
- energy-ptask energy-pstate
+ process-daemon process-kill process-lifetime process-migration process-suspend process-yield
+ energy-ptask energy-pstate platform-properties
io-raw-storage io-file-remote
trace_integration)
add_executable (${x} ${x}/${x}.c)
${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/async-waitall_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/async-waitany_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/io-file-remote_d.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/platform_properties/platform-properties_d.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/baseline_d.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/kill_d.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_d.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/process-lifetime/start_kill_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/process-yield/process-yield_d.xml
${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp1.0-hbp1.0.xml
${CMAKE_CURRENT_SOURCE_DIR}/trace_integration/test-hbp1.0-hbp3.0-hbp4.0.xml
host_on_off host_on_off_processes host_on_off_recv
get_sender
task_destroy_cancel task_listen_from task_progress
- process-daemon process-kill process-migration process-suspend process-yield
+ process-daemon process-kill process-lifetime process-migration process-suspend process-yield
energy-ptask
io-raw-storage io-file-remote
+ platform-properties
trace_integration)
ADD_TESH_FACTORIES(tesh-msg-${x} "thread;ucontext;raw;boost"
--setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Property test");
-static void test_host(const char*hostname)
+static void test_host(const char* hostname)
{
- msg_host_t thehost = MSG_host_by_name(hostname);
- xbt_dict_t props = MSG_host_get_properties(thehost);
+ msg_host_t thehost = MSG_host_by_name(hostname);
+ xbt_dict_t props = MSG_host_get_properties(thehost);
xbt_dict_cursor_t cursor = NULL;
- char *key;
- char *data;
- const char *noexist = "Unknown";
- const char *value;
+ char* key;
+ char* data;
+ const char* noexist = "Unknown";
+ const char* value;
char exist[] = "Hdd";
XBT_INFO("== Print the properties of the host '%s'", hostname);
- xbt_dict_foreach(props, cursor, key, data)
+ xbt_dict_foreach (props, cursor, key, data)
XBT_INFO(" Host property: '%s' -> '%s'", key, data);
XBT_INFO("== Try to get a host property that does not exist");
xbt_dict_free(&props);
}
-static int alice(int argc, char *argv[]) { /* Dump what we have on the current host */
+static int alice(int argc, char* argv[])
+{ /* Dump what we have on the current host */
test_host("host1");
return 0;
}
-static int carole(int argc, char *argv[]) {/* Dump what we have on a remote host */
+static int carole(int argc, char* argv[])
+{ /* Dump what we have on a remote host */
MSG_process_sleep(1); // Wait for alice to be done with its experiment
test_host("host1");
return 0;
}
-static int david(int argc, char *argv[]) {/* Dump what we have on a remote host */
+static int david(int argc, char* argv[])
+{ /* Dump what we have on a remote host */
MSG_process_sleep(2); // Wait for alice and carole to be done with its experiment
test_host("node-0.acme.org");
return 0;
}
-static int bob(int argc, char *argv[])
+static int bob(int argc, char* argv[])
{
/* this host also tests the properties of the AS*/
msg_as_t root = MSG_zone_get_root();
XBT_INFO(" Process property: author -> %s", MSG_zone_get_property_value(root, "author"));
/* Get the property list of current bob process */
- xbt_dict_t props = MSG_process_get_properties(MSG_process_self());
+ xbt_dict_t props = MSG_process_get_properties(MSG_process_self());
xbt_dict_cursor_t cursor = NULL;
- char *key;
- char *data;
- const char *noexist = "UnknownProcessProp";
- XBT_ATTRIB_UNUSED const char *value;
+ char* key;
+ char* data;
+ const char* noexist = "UnknownProcessProp";
+ XBT_ATTRIB_UNUSED const char* value;
XBT_INFO("== Print the properties of the process");
- xbt_dict_foreach(props, cursor, key, data)
+ xbt_dict_foreach (props, cursor, key, data)
XBT_INFO(" Process property: %s -> %s", key, data);
XBT_INFO("== Try to get a process property that does not exist");
return 0;
}
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
unsigned int i;
msg_host_t host;
MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
- "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
+ "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+ argv[0], argv[0]);
MSG_function_register("alice", alice);
MSG_function_register("bob", bob);
XBT_INFO("There are %d hosts in the environment", MSG_get_host_number());
xbt_dynar_t hosts = MSG_hosts_as_dynar();
- xbt_dynar_foreach(hosts, i, host){
- XBT_INFO("Host '%s' runs at %.0f flops/s",MSG_host_get_name(host), MSG_host_get_speed(host));
+ xbt_dynar_foreach (hosts, i, host) {
+ XBT_INFO("Host '%s' runs at %.0f flops/s", MSG_host_get_name(host), MSG_host_get_speed(host));
}
xbt_dynar_free(&hosts);
MSG_launch_application(argv[2]);
- msg_error_t res = MSG_main();
+ msg_error_t res = MSG_main();
- return res!=MSG_OK;
+ return res != MSG_OK;
}
p Testing a MSG application with properties in the XML for Hosts, Links and Processes
! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/platform-properties$EXEEXT ${platfdir}/prop.xml ${srcdir}/platform-properties_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/platform-properties$EXEEXT ${platfdir}/prop.xml ${srcdir:=.}/platform-properties_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (0:maestro@) There are 7 hosts in the environment
> [ 0.000000] (0:maestro@) Host 'host1' runs at 1000000000 flops/s
> [ 0.000000] (0:maestro@) Host 'host2' runs at 1000000000 flops/s
}
/* Just sleep until termination */
-static int sleeper(int argc, char *argv[])
+static int sleeper(int argc, char* argv[])
{
XBT_INFO("Hello! I go to sleep.");
MSG_process_on_exit(my_onexit, NULL);
return 0;
}
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
{
MSG_init(&argc, argv);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
- "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
+ "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+ argv[0], argv[0]);
- MSG_create_environment(argv[1]); /* - Load the platform description */
+ MSG_create_environment(argv[1]); /* - Load the platform description */
MSG_function_register("sleeper", sleeper);
- MSG_launch_application(argv[2]); /* - Deploy the sleeper processes with explicit start/kill times */
+ MSG_launch_application(argv[2]); /* - Deploy the sleeper processes with explicit start/kill times */
msg_error_t res = MSG_main(); /* - Run the simulation */
XBT_INFO("Simulation time %g", MSG_get_clock());
p Test0 Process without time
-$ $SG_TEST_EXENV ${bindir:=.}/process-startkilltime ${platfdir}/cluster.xml ${srcdir}/baseline_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/process-lifetime ${platfdir}/cluster.xml ${srcdir:=.}/baseline_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:sleeper@node-0.acme.org) Hello! I go to sleep.
> [ 10.000000] (1:sleeper@node-0.acme.org) Done sleeping.
> [ 10.000000] (1:sleeper@node-0.acme.org) Exiting now (done sleeping or got killed).
p Test1 Process with start time
-$ $SG_TEST_EXENV ${bindir:=.}/process-startkilltime ${platfdir}/cluster.xml ${srcdir}/start_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/process-lifetime ${platfdir}/cluster.xml ${srcdir:=.}/start_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:sleeper@node-0.acme.org) Hello! I go to sleep.
> [ 1.000000] (2:sleeper@node-1.acme.org) Hello! I go to sleep.
> [ 2.000000] (3:sleeper@node-2.acme.org) Hello! I go to sleep.
p Test1 Process with kill time
! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/process-startkilltime ${platfdir}/cluster.xml ${srcdir}/kill_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/process-lifetime ${platfdir}/cluster.xml ${srcdir:=.}/kill_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:sleeper@node-1.acme.org) Hello! I go to sleep.
> [ 0.000000] (2:sleeper@node-2.acme.org) Hello! I go to sleep.
> [ 0.000000] (3:sleeper@node-3.acme.org) Hello! I go to sleep.
p Test2 Process with start and kill times
! output sort
-$ $SG_TEST_EXENV ${bindir:=.}/process-startkilltime ${platfdir}/cluster.xml ${srcdir}/start_kill_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+$ $SG_TEST_EXENV ${bindir:=.}/process-lifetime ${platfdir}/cluster.xml ${srcdir:=.}/start_kill_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
> [ 0.000000] (1:sleeper@node-0.acme.org) Hello! I go to sleep.
> [ 1.000000] (2:sleeper@node-1.acme.org) Hello! I go to sleep.
> [ 2.000000] (3:sleeper@node-2.acme.org) Hello! I go to sleep.