From: degomme Date: Fri, 16 May 2014 16:20:52 +0000 (+0200) Subject: Fix compil without tracing, which was broken multiple times ... X-Git-Tag: v3_11~71 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0445b0862c323d8285fba620d5137a0891527914 Fix compil without tracing, which was broken multiple times ... Warning : some tests are broken when tracing is disabled --- diff --git a/include/msg/datatypes.h b/include/msg/datatypes.h index 760a2d89e4..e036fc45cf 100644 --- a/include/msg/datatypes.h +++ b/include/msg/datatypes.h @@ -73,8 +73,8 @@ typedef struct msg_task { char *name; /**< @brief task name if any */ simdata_task_t simdata; /**< @brief simulator data */ void *data; /**< @brief user data */ -#ifdef HAVE_TRACING long long int counter; /* task unique identifier for instrumentation */ +#ifdef HAVE_TRACING char *category; /* task category for instrumentation */ #endif } s_msg_task_t; diff --git a/src/simdag/sd_workstation.c b/src/simdag/sd_workstation.c index 911d596f2d..428c71a2ea 100644 --- a/src/simdag/sd_workstation.c +++ b/src/simdag/sd_workstation.c @@ -11,6 +11,7 @@ #include "xbt/sysdep.h" #include "surf/surf.h" #include "surf/surf_resource.h" +#include "msg/msg.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_workstation, sd, "Logging specific to SimDag (workstation)"); diff --git a/src/smpi/private.h b/src/smpi/private.h index 24f56708ca..d8b00f08bb 100644 --- a/src/smpi/private.h +++ b/src/smpi/private.h @@ -593,6 +593,8 @@ void mpi_comm_spawn_multiple_ ( int* count, char *array_of_commands, char** arra int* comm, int*intercomm, int* array_of_errcodes, int* ierr); void mpi_comm_get_parent_ ( int*parent, int* ierr); + +#ifdef HAVE_TRACING /********** Tracing **********/ /* from smpi_instr.c */ void TRACE_internal_smpi_set_category (const char *category); @@ -615,7 +617,7 @@ void TRACE_smpi_send(int rank, int src, int dst, int size); void TRACE_smpi_recv(int rank, int src, int dst); void TRACE_smpi_init(int rank); void TRACE_smpi_finalize(int rank); - +#endif const char* encode_datatype(MPI_Datatype datatype); diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index b654419962..46cd1a4b98 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -3,7 +3,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ - +#include "xbt/fifo.h" #include "surf_interface.hpp" #include "surf_routing.hpp" diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index c43e99bac7..61cc24ecb4 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -520,9 +520,11 @@ void surf_action_set_priority(surf_action_t action, double priority){ action->setPriority(priority); } +#ifdef HAVE_TRACING void surf_action_set_category(surf_action_t action, const char *category){ action->setCategory(category); } +#endif void *surf_action_get_data(surf_action_t action){ return action->getData(); diff --git a/src/surf/workstation_interface.cpp b/src/surf/workstation_interface.cpp index ac263219be..00ecfdf261 100644 --- a/src/surf/workstation_interface.cpp +++ b/src/surf/workstation_interface.cpp @@ -4,6 +4,7 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ +#include "simix/smx_private.h" #include "workstation_interface.hpp" #include "vm_workstation_interface.hpp" #include "cpu_cas01.hpp"