From e47900c5182c4b1c34a1670babcce033748cc473 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 30 Mar 2012 13:07:03 +0200 Subject: [PATCH] Take tracing API changes into account. --- communicator.cpp | 6 +++--- process.cpp | 2 +- simgrid_features.h | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/communicator.cpp b/communicator.cpp index 2ddea5d..e841116 100644 --- a/communicator.cpp +++ b/communicator.cpp @@ -54,9 +54,9 @@ msg_comm_t communicator::real_send(const char* dest, message* msg) { XBT_DEBUG("send %s to %s", msg->to_string().c_str(), dest); m_task_t task = MSG_task_create("message", 0.0, msg->get_size(), msg); - TRACE_msg_set_task_category(task, - msg->get_type() == message::DATA ? - TRACE_CAT_DATA : TRACE_CAT_CTRL); + MSG_task_set_category(task, + msg->get_type() == message::DATA ? + TRACE_CAT_DATA : TRACE_CAT_CTRL); return MSG_task_isend(task, dest); } diff --git a/process.cpp b/process.cpp index b5531b0..722013f 100644 --- a/process.cpp +++ b/process.cpp @@ -257,7 +257,7 @@ void process::compute_loop() ++comp_iter; double flops = opt::comp_cost(real_load); m_task_t task = MSG_task_create("computation", flops, 0.0, NULL); - TRACE_msg_set_task_category(task, TRACE_CAT_COMP); + MSG_task_set_category(task, TRACE_CAT_COMP); XBT_DEBUG("compute %g flop%s", flops, ESSE(flops)); MSG_task_execute(task); add_comp_amount(flops); diff --git a/simgrid_features.h b/simgrid_features.h index 5780d0a..f407ffd 100644 --- a/simgrid_features.h +++ b/simgrid_features.h @@ -7,6 +7,12 @@ # error "Unsupported SimGrid version. Need version > 3.5" #endif // ============================================================= // +#if SIMGRID_VERSION < MAKE_SIMGRID_VERSION(3, 7, 0) + +#define MSG_task_set_category(task, cat) TRACE_msg_set_task_category(task, cat) + +#endif + #endif // !SIMGRID_FEATURES_H // Local variables: -- 2.39.5