git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9657
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
18 files changed:
i++;
} else {
XBT_INFO("Hey ?! What's up ? ");
i++;
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die( "Unexpected behavior");
XBT_DEBUG("Set timeout to %d", timeout);
}
else {
XBT_DEBUG("Set timeout to %d", timeout);
}
else {
- xbt_assert1(0, "Invalid chord option '%s'", options[0]);
+ xbt_die(bprintf("Invalid chord option '%s'", options[0]));
if (a != MSG_OK) {
XBT_INFO("Hey?! What's up?");
if (a != MSG_OK) {
XBT_INFO("Hey?! What's up?");
- xbt_assert0(0, "Unexpected behavior.");
+ xbt_die("Unexpected behavior.");
}
elapsed_time = MSG_get_clock() - start_time;
}
elapsed_time = MSG_get_clock() - start_time;
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die( "Unexpected behavior");
}
}
XBT_INFO("I'm done. See you!");
}
}
XBT_INFO("I'm done. See you!");
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
- }
+ xbt_die("Unexpected behavior");
+ }
}
XBT_INFO("I'm done. See you!");
return 0;
}
XBT_INFO("I'm done. See you!");
return 0;
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die( "Unexpected behavior");
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
MSG_task_destroy(task);
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert2(0, "Unexpected behavior with '%s': %d", slaves[i]->name,
- a);
+ xbt_die(bprintf("Unexpected behavior with '%s': %d", slaves[i]->name,
+ a));
return 0;
} else {
XBT_INFO("Hey ?! What's up ? ");
return 0;
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
}
} else if (a == MSG_HOST_FAILURE) {
XBT_INFO
}
} else if (a == MSG_HOST_FAILURE) {
XBT_INFO
XBT_INFO("Mmh. Something went wrong. Nevermind. Let's keep going!");
} else {
XBT_INFO("Hey ?! What's up ? ");
XBT_INFO("Mmh. Something went wrong. Nevermind. Let's keep going!");
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
}
}
XBT_INFO("I'm done. See you!");
}
}
XBT_INFO("I'm done. See you!");
i++;
} else {
XBT_INFO("Hey ?! What's up ? ");
i++;
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
XBT_INFO("Communic. time %le", communication_time);
XBT_INFO("--- la %f ----", communication_time);
} else {
XBT_INFO("Communic. time %le", communication_time);
XBT_INFO("--- la %f ----", communication_time);
} else {
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
XBT_INFO("Communic. time %le", communication_time);
XBT_INFO("--- bw %f ----", task_comm_size_bw / communication_time);
} else {
XBT_INFO("Communic. time %le", communication_time);
XBT_INFO("--- bw %f ----", task_comm_size_bw / communication_time);
} else {
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
int MSG_get_host_msgload(m_host_t h)
{
xbt_assert0((h != NULL), "Invalid parameters");
int MSG_get_host_msgload(m_host_t h)
{
xbt_assert0((h != NULL), "Invalid parameters");
- xbt_assert0(0, "Not implemented yet");
+ xbt_die( "Not implemented yet");
task->state_set = sd_global->failed_task_set;
break;
default:
task->state_set = sd_global->failed_task_set;
break;
default:
- xbt_assert0(0, "Invalid state");
+ xbt_die( "Invalid state");
}
xbt_swag_insert(task, task->state_set);
task->state = new_state;
}
xbt_swag_insert(task, task->state_set);
task->state = new_state;
- xbt_assert0(0, "Shouldn't be here");
+ xbt_die("Shouldn't be here");
link_count, name, lat, bw);
if (gtnets_add_link(link_count, bw, lat)) {
link_count, name, lat, bw);
if (gtnets_add_link(link_count, bw, lat)) {
- xbt_assert0(0, "Cannot create GTNetS link");
+ xbt_die("Cannot create GTNetS link");
}
gtnets_link->id = link_count;
}
gtnets_link->id = link_count;
}
if (gtnets_add_route(src_id, dst_id, gtnets_links, nb_link)) {
}
if (gtnets_add_route(src_id, dst_id, gtnets_links, nb_link)) {
- xbt_assert0(0, "Cannot create GTNetS route");
+ xbt_die("Cannot create GTNetS route");
network_link_GTNETS_t link)
{
if (gtnets_add_onehop_route(src_id, dst_id, link->id)) {
network_link_GTNETS_t link)
{
if (gtnets_add_onehop_route(src_id, dst_id, link->id)) {
- xbt_assert0(0, "Cannot create GTNetS route");
+ xbt_die("Cannot create GTNetS route");
static int resource_used(void *resource_id)
{
static int resource_used(void *resource_id)
{
- xbt_assert0(0,
- "The resource_used feature is not implemented in GTNets model");
+ xbt_die("The resource_used feature is not implemented in GTNets model");
}
static int action_unref(surf_action_t action)
}
static int action_unref(surf_action_t action)
static void action_cancel(surf_action_t action)
{
static void action_cancel(surf_action_t action)
{
- xbt_assert0(0, "Cannot cancel GTNetS flow");
+ xbt_die("Cannot cancel GTNetS flow");
return;
}
static void action_recycle(surf_action_t action)
{
return;
}
static void action_recycle(surf_action_t action)
{
- xbt_assert0(0, "Cannot recycle GTNetS flow");
+ xbt_die("Cannot recycle GTNetS flow");
num_flows = 0;
if (gtnets_run_until_next_flow_completion(&metadata, &num_flows)) {
num_flows = 0;
if (gtnets_run_until_next_flow_completion(&metadata, &num_flows)) {
- xbt_assert0(0,
- "Cannot run GTNetS simulation until next flow completion");
+ xbt_die("Cannot run GTNetS simulation until next flow completion");
- xbt_assert0(0,
- "GTNetS simulation couldn't find a flow that would complete");
+ xbt_die("GTNetS simulation couldn't find a flow that would complete");
}
xbt_swag_foreach(action, running_actions) {
}
xbt_swag_foreach(action, running_actions) {
} else { /* run for a given number of seconds */
if (gtnets_run(delta)) {
} else { /* run for a given number of seconds */
if (gtnets_run(delta)) {
- xbt_assert0(0, "Cannot run GTNetS simulation");
+ xbt_die("Cannot run GTNetS simulation");
tmgr_trace_event_t event_type,
double value, double date)
{
tmgr_trace_event_t event_type,
double value, double date)
{
- xbt_assert0(0, "Cannot update model state for GTNetS simulation");
+ xbt_die("Cannot update model state for GTNetS simulation");
}
/* Max durations are not supported */
}
/* Max durations are not supported */
/* Add a flow to the GTNets Simulation, associated to this action */
if (gtnets_create_flow(src, dst, size, (void *) action) < 0) {
/* Add a flow to the GTNets Simulation, associated to this action */
if (gtnets_create_flow(src, dst, size, (void *) action) < 0) {
- xbt_assert2(0, "Not route between host %s and host %s", src_name,
- dst_name);
+ xbt_die(bprintf("Not route between host %s and host %s", src_name,
+ dst_name));
}
#ifdef HAVE_TRACING
TRACE_surf_gtnets_communicate(action, src, dst);
}
#ifdef HAVE_TRACING
TRACE_surf_gtnets_communicate(action, src, dst);
/* Added the initialization for GTNetS interface */
if (gtnets_initialize(sg_tcp_gamma)) {
/* Added the initialization for GTNetS interface */
if (gtnets_initialize(sg_tcp_gamma)) {
- xbt_assert0(0, "Impossible to initialize GTNetS interface");
+ xbt_die("Impossible to initialize GTNetS interface");
}
routing_model_create(sizeof(network_link_GTNETS_t), NULL, NULL);
}
routing_model_create(sizeof(network_link_GTNETS_t), NULL, NULL);
strcat(name_list, ", ");
strcat(name_list, table[i].name);
}
strcat(name_list, ", ");
strcat(name_list, table[i].name);
}
- xbt_assert2(0, "Model '%s' is invalid! Valid models are: %s.", name,
- name_list);
+ xbt_die(bprintf("Model '%s' is invalid! Valid models are: %s.", name,
+ name_list));
param_list = dst_list;
param_size = dst_size;
} else {
param_list = dst_list;
param_size = dst_size;
} else {
"bad string parameter, support only \"src\" and \"dst\", at offset: %d (\"%s\")",
"bad string parameter, support only \"src\" and \"dst\", at offset: %d (\"%s\")",
(routing_component_rulebased_t) rc;
int are_processing_units=0;
(routing_component_rulebased_t) rc;
int are_processing_units=0;
- xbt_dynar_t rule_list = NULL;
if (xbt_dict_get_or_null(routing->dict_processing_units, src)
&& xbt_dict_get_or_null(routing->dict_processing_units, dst)) {
are_processing_units = 1;
if (xbt_dict_get_or_null(routing->dict_processing_units, src)
&& xbt_dict_get_or_null(routing->dict_processing_units, dst)) {
are_processing_units = 1;
are_processing_units = 0;
rule_list = routing->list_ASroute;
} else
are_processing_units = 0;
rule_list = routing->list_ASroute;
} else
- xbt_assert2(NULL,
- "Ask for route \"from\"(%s) or \"to\"(%s) no found in the local table",
- src, dst);
+ xbt_die(bprintf("Ask for route \"from\"(%s) or \"to\"(%s) no found in the local table",
+ src, dst));
int rc_src = -1;
int rc_dst = -1;
int rc_src = -1;
int rc_dst = -1;
- xbt_assert2(0, "Config element variable %s not valid (type=%d)", name,
- type);
+ xbt_die(bprintf("Config element variable %s not valid (type=%d)", name,
+ type));
val = strchr(name, ':');
if (!val) {
free(optionlist_cpy);
val = strchr(name, ':');
if (!val) {
free(optionlist_cpy);
"Option '%s' badly formated. Should be of the form 'name:value'",
"Option '%s' badly formated. Should be of the form 'name:value'",
i = strtol(val, &val, 0);
if (val == NULL) {
free(optionlist_cpy);
i = strtol(val, &val, 0);
if (val == NULL) {
free(optionlist_cpy);
"Value of option %s not valid. Should be an integer",
"Value of option %s not valid. Should be an integer",
}
xbt_cfg_set_int(cfg, name, i); /* throws */
}
xbt_cfg_set_int(cfg, name, i); /* throws */
d = strtod(val, &val);
if (val == NULL) {
free(optionlist_cpy);
d = strtod(val, &val);
if (val == NULL) {
free(optionlist_cpy);
"Value of option %s not valid. Should be a double",
"Value of option %s not valid. Should be a double",
}
xbt_cfg_set_double(cfg, name, d); /* throws */
}
xbt_cfg_set_double(cfg, name, d); /* throws */
val = strchr(val, ':');
if (!val) {
free(optionlist_cpy);
val = strchr(val, ':');
if (!val) {
free(optionlist_cpy);
"Value of option %s not valid. Should be an peer (machine:port)",
"Value of option %s not valid. Should be an peer (machine:port)",
}
*(val++) = '\0';
i = strtol(val, &val, 0);
if (val == NULL) {
free(optionlist_cpy);
}
*(val++) = '\0';
i = strtol(val, &val, 0);
if (val == NULL) {
free(optionlist_cpy);
"Value of option %s not valid. Should be an peer (machine:port)",
"Value of option %s not valid. Should be an peer (machine:port)",
}
xbt_cfg_set_peer(cfg, name, str, i); /* throws */
}
xbt_cfg_set_peer(cfg, name, str, i); /* throws */
xbt_test_add0("==== Traverse the empty dynar");
d = xbt_dynar_new(sizeof(int), NULL);
xbt_dynar_foreach(d, cursor, i) {
xbt_test_add0("==== Traverse the empty dynar");
d = xbt_dynar_new(sizeof(int), NULL);
xbt_dynar_foreach(d, cursor, i) {
- xbt_assert0(0, "Damnit, there is something in the empty dynar");
+ xbt_die( "Damnit, there is something in the empty dynar");
}
xbt_dynar_free(&d); /* This code is used both as example and as regression test, so we try to */
xbt_dynar_free(&d); /* free the struct twice here to check that it's ok, but freeing it only once */
}
xbt_dynar_free(&d); /* This code is used both as example and as regression test, so we try to */
xbt_dynar_free(&d); /* free the struct twice here to check that it's ok, but freeing it only once */
a - x, lmm_variable_getvalue(R_1_2_3) - (a - x));
}
} else {
a - x, lmm_variable_getvalue(R_1_2_3) - (a - x));
}
} else {
- xbt_assert0(0, "Invalid method");
+ xbt_die( "Invalid method");
} else if (method == LAGRANGE_RENO) {
lagrange_solve(Sys);
} else {
} else if (method == LAGRANGE_RENO) {
lagrange_solve(Sys);
} else {
- xbt_assert0(0, "Invalid method");
+ xbt_die("Invalid method");
} else if (method == LAGRANGE_RENO) {
lagrange_solve(Sys);
} else {
} else if (method == LAGRANGE_RENO) {
lagrange_solve(Sys);
} else {
- xbt_assert0(0, "Invalid method");
+ xbt_die("Invalid method");
}
for (j = 0; j < 16; j++) {
}
for (j = 0; j < 16; j++) {
deployment_file = argv[i];
surf_parse_open(deployment_file);
if (surf_parse())
deployment_file = argv[i];
surf_parse_open(deployment_file);
if (surf_parse())
- xbt_assert1(0, "Parse error in %s", deployment_file);
+ xbt_die(bprintf("Parse error in %s", deployment_file));