X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2c69087d11c54eee924f6870373883d6aa9ff228..2145c35adaa6d63728ab13e26566044a8eb6dc9b:/src/msg/msg_gos.c diff --git a/src/msg/msg_gos.c b/src/msg/msg_gos.c index 1cb79889a5..fcafb21976 100644 --- a/src/msg/msg_gos.c +++ b/src/msg/msg_gos.c @@ -52,9 +52,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) 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", @@ -63,9 +61,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) XBT_DEBUG("Computing on %s", MSG_process_get_name(MSG_process_self())); if (simdata->flops_amount == 0 && !simdata->host_nb) { -#ifdef HAVE_TRACING TRACE_msg_task_execute_end(task); -#endif return MSG_OK; } @@ -77,7 +73,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) 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->flops_parallel_amount, @@ -85,11 +81,10 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) 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->compute = simcall_process_execute(task->name, simdata->flops_amount, simdata->priority, simdata->bound, @@ -97,11 +92,9 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) ); } -#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; @@ -130,9 +123,7 @@ msg_error_t MSG_parallel_task_execute(msg_task_t task) simdata->flops_amount = 0.0; simdata->comm = NULL; simdata->compute = NULL; -#ifdef HAVE_TRACING TRACE_msg_task_execute_end(task); -#endif MSG_RETURN(status); } @@ -151,17 +142,7 @@ msg_error_t MSG_process_sleep(double nb_sec) 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); @@ -184,9 +165,7 @@ msg_error_t MSG_process_sleep(double 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); } @@ -406,10 +385,7 @@ msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias, 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; @@ -452,14 +428,10 @@ msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias, 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; } @@ -614,7 +586,7 @@ msg_comm_t MSG_task_irecv_bounded(msg_task_t *task, const char *name, 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; } @@ -1043,9 +1015,7 @@ int MSG_task_listen_from(const char *alias) */ 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 @@ -1060,11 +1030,7 @@ void MSG_task_set_category (msg_task_t task, const char *category) */ const char *MSG_task_get_category (msg_task_t task) { -#ifdef HAVE_TRACING return task->category; -#else - return NULL; -#endif } /**