-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
e_smx_state_t comp_state;
msg_error_t status = MSG_OK;
-#ifdef HAVE_TRACING
TRACE_msg_task_execute_start(task);
-#endif
xbt_assert((!simdata->compute) && (task->simdata->isused == 0),
"This task is executed somewhere else. Go fix your code! %d",
XBT_DEBUG("Computing on %s", MSG_process_get_name(MSG_process_self()));
- if (simdata->computation_amount == 0 && !simdata->host_nb) {
-#ifdef HAVE_TRACING
+ if (simdata->flops_amount == 0 && !simdata->host_nb) {
TRACE_msg_task_execute_end(task);
-#endif
return MSG_OK;
}
simdata->isused = (void*)1;
if (simdata->host_nb > 0) {
- simdata->compute = simcall_host_parallel_execute(task->name,
+ simdata->compute = simcall_process_parallel_execute(task->name,
simdata->host_nb,
simdata->host_list,
- simdata->comp_amount,
- simdata->comm_amount,
+ simdata->flops_parallel_amount,
+ simdata->bytes_parallel_amount,
1.0, -1.0);
XBT_DEBUG("Parallel execution action created: %p", simdata->compute);
} else {
- unsigned long affinity_mask = (unsigned long) xbt_dict_get_or_null_ext(simdata->affinity_mask_db, (char *) p_simdata->m_host, sizeof(msg_host_t));
+ unsigned long affinity_mask = (unsigned long)(uintptr_t) xbt_dict_get_or_null_ext(simdata->affinity_mask_db, (char *) p_simdata->m_host, sizeof(msg_host_t));
XBT_DEBUG("execute %s@%s with affinity(0x%04lx)", MSG_task_get_name(task), MSG_host_get_name(p_simdata->m_host), affinity_mask);
- simdata->compute = simcall_host_execute(task->name,
- p_simdata->m_host,
- simdata->computation_amount,
+ simdata->compute = simcall_process_execute(task->name,
+ simdata->flops_amount,
simdata->priority,
simdata->bound,
affinity_mask
);
}
-#ifdef HAVE_TRACING
simcall_set_category(simdata->compute, task->category);
-#endif
p_simdata->waiting_action = simdata->compute;
- comp_state = simcall_host_execution_wait(simdata->compute);
+ comp_state = simcall_process_execution_wait(simdata->compute);
p_simdata->waiting_action = NULL;
}
/* action ended, set comm and compute = NULL, the actions is already destroyed
* in the main function */
- simdata->computation_amount = 0.0;
+ simdata->flops_amount = 0.0;
simdata->comm = NULL;
simdata->compute = NULL;
-#ifdef HAVE_TRACING
TRACE_msg_task_execute_end(task);
-#endif
MSG_RETURN(status);
}
msg_error_t status = MSG_OK;
/*msg_process_t proc = MSG_process_self();*/
-#ifdef HAVE_TRACING
TRACE_msg_process_sleep_in(MSG_process_self());
-#endif
-
- /* create action to sleep */
-
- /*proc->simdata->waiting_action = act_sleep;
-
- FIXME: check if not setting the waiting_action breaks something on msg
-
- proc->simdata->waiting_action = NULL;*/
TRY {
simcall_process_sleep(nb_sec);
xbt_ex_free(e);
}
- #ifdef HAVE_TRACING
- TRACE_msg_process_sleep_out(MSG_process_self());
- #endif
+ TRACE_msg_process_sleep_out(MSG_process_self());
MSG_RETURN(status);
}
simdata_task_t t_simdata = NULL;
msg_process_t process = MSG_process_self();
msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias);
-
-#ifdef HAVE_TRACING
int call_end = TRACE_msg_task_put_start(task);
-#endif
/* Prepare the task to send */
t_simdata = task->simdata;
msg_global->sent_msg++;
/* Send it by calling SIMIX network layer */
- smx_synchro_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->message_size,
+ smx_synchro_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->bytes_amount,
t_simdata->rate, task, sizeof(void *),
match_fun, cleanup, NULL, match_data,detached);
t_simdata->comm = act; /* FIXME: is the field t_simdata->comm still useful? */
comm->s_comm = act;
}
-#ifdef HAVE_TRACING
- if (TRACE_is_enabled()) {
+ if (TRACE_is_enabled())
simcall_set_category(act, task->category);
- }
-
if (call_end)
TRACE_msg_task_put_end();
-#endif
return comm;
}
* \param match_fun boolean function which parameters are:
* - match_data_provided_here
* - match_data_provided_by_other_side_if_any
- * - the_smx_action_describing_the_other_side
+ * - the_smx_synchro_describing_the_other_side
* \param match_data user provided data passed to match_fun
* \return the msg_comm_t communication created
*/
comm->task_sent = NULL;
comm->task_received = task;
comm->status = MSG_OK;
- comm->s_comm = simcall_comm_irecv(rdv, task, NULL, NULL, NULL, NULL, rate);
+ comm->s_comm = simcall_comm_irecv(MSG_process_self(), rdv, task, NULL, NULL, NULL, NULL, rate);
return comm;
}
*/
void MSG_task_set_category (msg_task_t task, const char *category)
{
-#ifdef HAVE_TRACING
TRACE_msg_set_task_category (task, category);
-#endif
}
/** \ingroup msg_task_usage
*/
const char *MSG_task_get_category (msg_task_t task)
{
-#ifdef HAVE_TRACING
return task->category;
-#else
- return NULL;
-#endif
}
/**