/** @addtogroup MSG_examples
*
- * - <b>properties/msg_prop.c</b> Attaching arbitrary informations to host, processes and such, and retrieving them
- * with @ref MSG_host_get_properties, @ref MSG_host_get_property_value, @ref MSG_process_get_properties and
- * @ref MSG_process_get_property_value. Also make sure to read the platform and deployment XML files to see how to
- * declare these data.
+ * - <b>User-defined properties: properties/properties.c</b> Attaching arbitrary informations to host, processes and
+ * such, and retrieving them with @ref MSG_host_get_properties, @ref MSG_host_get_property_value,
+ * @ref MSG_process_get_properties, and @ref MSG_process_get_property_value. Also make sure to read the platform and
+ * deployment XML files to see how to declare these data.
*/
XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Property test");
int main(int argc, char *argv[])
{
- msg_error_t res = MSG_OK;
unsigned int i;
- xbt_dynar_t hosts;
msg_host_t host;
MSG_init(&argc, argv);
XBT_INFO("There are %d hosts in the environment", MSG_get_host_number());
- hosts = MSG_hosts_as_dynar();
-
+ 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_free(&hosts);
MSG_launch_application(argv[2]);
- res = MSG_main();
-
- xbt_dynar_free(&hosts);
+ msg_error_t res = MSG_main();
return res!=MSG_OK;
}