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_assert1(0, "Invalid chord option '%s'", options[0]);
+ xbt_die(bprintf("Invalid chord option '%s'", options[0]));
}
}
options++;
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;
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!");
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;
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 ? ");
- 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 ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
}
} 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_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
}
}
XBT_INFO("I'm done. See you!");
i++;
} else {
XBT_INFO("Hey ?! What's up ? ");
- xbt_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
}
}
xbt_free(slaves);
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_assert0(0, "Unexpected behavior");
+ xbt_die("Unexpected behavior");
}
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");
return (0);
}
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;
}
else{
- xbt_assert0(0, "Shouldn't be here");
+ xbt_die("Shouldn't be here");
}
return 0;
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;
}
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");
}
XBT_OUT();
}
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)
{
- 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 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)
{
- xbt_assert0(0, "Cannot recycle GTNetS flow");
+ xbt_die("Cannot recycle GTNetS flow");
return;
}
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");
}
if (num_flows < 1) {
- 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) {
} 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)
{
- xbt_assert0(0, "Cannot update model state for GTNetS simulation");
+ xbt_die("Cannot update model state for GTNetS simulation");
}
/* 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) {
- 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);
/* 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);
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));
return -1;
}
param_list = dst_list;
param_size = dst_size;
} else {
- xbt_assert2(0,
+ xbt_die(bprintf(
"bad string parameter, support only \"src\" and \"dst\", at offset: %d (\"%s\")",
- i, value);
+ i, value));
}
i = i + 3;
(routing_component_rulebased_t) rc;
int are_processing_units=0;
- xbt_dynar_t rule_list = NULL;
+ xbt_dynar_t rule_list;
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
- 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;
break;
default:
- 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);
- xbt_assert1(FALSE,
+ xbt_die(bprintf(
"Option '%s' badly formated. Should be of the form 'name:value'",
- name);
+ name));
}
*(val++) = '\0';
i = strtol(val, &val, 0);
if (val == NULL) {
free(optionlist_cpy);
- xbt_assert1(FALSE,
+ xbt_die(bprintf(
"Value of option %s not valid. Should be an integer",
- name);
+ name));
}
xbt_cfg_set_int(cfg, name, i); /* throws */
d = strtod(val, &val);
if (val == NULL) {
free(optionlist_cpy);
- xbt_assert1(FALSE,
+ xbt_die(bprintf(
"Value of option %s not valid. Should be a double",
- name);
+ name));
}
xbt_cfg_set_double(cfg, name, d); /* throws */
val = strchr(val, ':');
if (!val) {
free(optionlist_cpy);
- xbt_assert1(FALSE,
+ xbt_die(bprintf(
"Value of option %s not valid. Should be an peer (machine:port)",
- name);
+ name));
}
*(val++) = '\0';
i = strtol(val, &val, 0);
if (val == NULL) {
free(optionlist_cpy);
- xbt_assert1(FALSE,
+ xbt_die(bprintf(
"Value of option %s not valid. Should be an peer (machine:port)",
- name);
+ name));
}
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_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 */
a - x, lmm_variable_getvalue(R_1_2_3) - (a - x));
}
} else {
- xbt_assert0(0, "Invalid method");
+ xbt_die( "Invalid method");
}
PRINT_VAR(R_1_2_3);
} else if (method == LAGRANGE_RENO) {
lagrange_solve(Sys);
} else {
- xbt_assert0(0, "Invalid method");
+ xbt_die("Invalid method");
}
PRINT_VAR(T1);
} else if (method == LAGRANGE_RENO) {
lagrange_solve(Sys);
} else {
- xbt_assert0(0, "Invalid method");
+ xbt_die("Invalid method");
}
for (j = 0; j < 16; j++) {
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));
surf_parse_close();
}