From: Martin Quinson Date: Tue, 1 Mar 2016 23:54:16 +0000 (+0100) Subject: Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid X-Git-Tag: v3_13~592 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/564a883b3d816d2c5d227f5311d248ef799b5190?hp=be5b1909ae03fa305b6aff11ef16e19de82966b5 Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid --- diff --git a/src/include/mc/mc.h b/src/include/mc/mc.h index 00d6eb8527..e0eb414f1e 100644 --- a/src/include/mc/mc.h +++ b/src/include/mc/mc.h @@ -21,17 +21,13 @@ /* Maximum size of the application heap. * - * The model-checker heap is placed at this offset from the - * beginning of the application heap. + * The model-checker heap is placed at this offset from the beginning of the application heap. * - * In the current implementation, if the application uses more - * than this for the application heap the application heap will - * smash the beginning of the model-checker heap and bad things - * will happen. + * In the current implementation, if the application uses more than this for the application heap the application heap + * will smash the beginning of the model-checker heap and bad things will happen. * - * For 64 bits systems, we have a lot of virtual memory available - * so we wan use a much bigger value in order to avoid bad things - * from happening. + * For 64 bits systems, we have a lot of virtual memory available so we wan use a much bigger value in order to avoid + * bad things from happening. * */ #define STD_HEAP_SIZE (sizeof(void*)<=4 ? (100*1024*1024) : (1ll*1024*1024*1024*1024)) @@ -39,7 +35,6 @@ SG_BEGIN_DECL() /********************************** Configuration of MC **************************************/ - extern XBT_PUBLIC(int) _sg_do_model_check; extern XBT_PRIVATE int _sg_do_model_check_record; extern XBT_PRIVATE int _sg_mc_checkpoint; @@ -60,7 +55,6 @@ extern XBT_PRIVATE int _sg_mc_snapshot_fds; extern XBT_PRIVATE int _sg_mc_termination; /********************************* Global *************************************/ - XBT_PRIVATE void _mc_cfg_cb_reduce(const char *name, int pos); XBT_PRIVATE void _mc_cfg_cb_checkpoint(const char *name, int pos); XBT_PRIVATE void _mc_cfg_cb_sparse_checkpoint(const char *name, int pos); diff --git a/src/include/simgrid/sg_config.h b/src/include/simgrid/sg_config.h index 7d8410e3c4..4f305ce87c 100644 --- a/src/include/simgrid/sg_config.h +++ b/src/include/simgrid/sg_config.h @@ -6,10 +6,7 @@ #include "xbt/config.h" -/*******************************************/ -/*** Config Globals **************************/ -/*******************************************/ - +/** Config Globals */ SG_BEGIN_DECL() XBT_PUBLIC_DATA(xbt_cfg_t) _sg_cfg_set; diff --git a/src/include/smpi/smpi_interface.h b/src/include/smpi/smpi_interface.h index d139ada9df..e2ea5c52bb 100644 --- a/src/include/smpi/smpi_interface.h +++ b/src/include/smpi/smpi_interface.h @@ -10,8 +10,7 @@ SG_BEGIN_DECL() -/** \brief MPI collective description - */ +/** \brief MPI collective description */ typedef struct mpi_coll_description { const char *name; @@ -19,105 +18,79 @@ typedef struct mpi_coll_description { void *coll; } s_mpi_coll_description_t, *mpi_coll_description_t; - /** \ingroup MPI gather * \brief The list of all available allgather collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_gather_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun) - (void *, int, MPI_Datatype, void *, int, MPI_Datatype, - int, MPI_Comm)); +XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm)); /** \ingroup MPI allgather * \brief The list of all available allgather collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun) - (void *, int, MPI_Datatype, void *, int, MPI_Datatype, - MPI_Comm)); +XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun) (void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm)); /** \ingroup MPI allgather * \brief The list of all available allgather collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgatherv_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun) - (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype, - MPI_Comm)); - +XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun) (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype, MPI_Comm)); /** \ingroup MPI allreduce * \brief The list of all available allgather collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun) - (void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, - MPI_Op op, MPI_Comm comm)); - +XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)(void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,MPI_Op op, + MPI_Comm comm)); /** \ingroup MPI alltoall * \brief The list of all available alltoall collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun) - (void *, int, MPI_Datatype, void *, int, MPI_Datatype, - MPI_Comm)); +XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm)); /** \ingroup MPI alltoallv * \brief The list of all available alltoallv collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun) - (void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype, - MPI_Comm)); - +XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)(void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype, + MPI_Comm)); /** \ingroup MPI bcast * \brief The list of all available bcast collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun) - (void *buf, int count, MPI_Datatype datatype, int root, - MPI_Comm com)); - +XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm com)); /** \ingroup MPI reduce * \brief The list of all available reduce collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun) - (void *buf, void *rbuf, int count, MPI_Datatype datatype, - MPI_Op op, int root, MPI_Comm comm)); +XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)(void *buf, void *rbuf, int count, MPI_Datatype datatype, + MPI_Op op, int root, MPI_Comm comm)); /** \ingroup MPI reduce_scatter * \brief The list of all available allgather collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_scatter_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun) - (void *sbuf, void *rbuf, int *rcounts, +XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun) (void *sbuf, void *rbuf, int *rcounts, MPI_Datatype dtype, MPI_Op op,MPI_Comm comm)); /** \ingroup MPI scatter * \brief The list of all available allgather collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_scatter_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun) - (void *sendbuf, int sendcount, MPI_Datatype sendtype, - void *recvbuf, int recvcount, MPI_Datatype recvtype, - int root, MPI_Comm comm)); +XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)(void *sendbuf, int sendcount, MPI_Datatype sendtype, + void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)); /** \ingroup MPI barrier * \brief The list of all available allgather collectives */ XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[]; -XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun) - (MPI_Comm comm)); - - -XBT_PUBLIC(void) coll_help(const char *category, - s_mpi_coll_description_t * table); -XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, - char *name, const char *desc); +XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)(MPI_Comm comm)); +XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table); +XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, char *name, const char *desc); extern XBT_PRIVATE double smpi_wtime_sleep; extern XBT_PRIVATE double smpi_iprobe_sleep; diff --git a/src/include/surf/datatypes.h b/src/include/surf/datatypes.h index 7a6542b9d6..a027f238c9 100644 --- a/src/include/surf/datatypes.h +++ b/src/include/surf/datatypes.h @@ -18,5 +18,4 @@ typedef struct lmm_system *lmm_system_t; typedef struct tmgr_trace_iterator *tmgr_trace_iterator_t; - #endif /* MAXMIN_DATATYPES_H */ diff --git a/src/include/surf/maxmin.h b/src/include/surf/maxmin.h index 6a614a9f30..297683fa4e 100644 --- a/src/include/surf/maxmin.h +++ b/src/include/surf/maxmin.h @@ -13,42 +13,31 @@ #include "surf/datatypes.h" #include - /** @addtogroup SURF_lmm * @details * A linear maxmin solver to resolve inequations systems. * - * Most SimGrid model rely on a "fluid/steady-state" modeling that - * simulate the sharing of resources between actions at relatively - * coarse-grain. Such sharing is generally done by solving a set of - * linear inequations. Let's take an example and assume we have the - * variables \f$x_1\f$, \f$x_2\f$, \f$x_3\f$, and \f$x_4\f$ . Let's - * say that \f$x_1\f$ and \f$x_2\f$ correspond to activities running - * and the same CPU \f$A\f$ whose capacity is \f$C_A\f$. In such a + * Most SimGrid model rely on a "fluid/steady-state" modeling that simulate the sharing of resources between actions at + * relatively coarse-grain. Such sharing is generally done by solving a set of linear inequations. Let's take an + * example and assume we have the variables \f$x_1\f$, \f$x_2\f$, \f$x_3\f$, and \f$x_4\f$ . Let's say that \f$x_1\f$ + * and \f$x_2\f$ correspond to activities running and the same CPU \f$A\f$ whose capacity is \f$C_A\f$. In such a * case, we need to enforce: * * \f[ x_1 + x_2 \leq C_A \f] * - * Likewise, if \f$x_3\f$ (resp. \f$x_4\f$) corresponds to a network - * flow \f$F_3\f$ (resp. \f$F_4\f$) that goes through a set of links - * \f$L_1\f$ and \f$L_2\f$ (resp. \f$L_2\f$ and \f$L_3\f$), then we - * need to enforce: + * Likewise, if \f$x_3\f$ (resp. \f$x_4\f$) corresponds to a network flow \f$F_3\f$ (resp. \f$F_4\f$) that goes through + * a set of links \f$L_1\f$ and \f$L_2\f$ (resp. \f$L_2\f$ and \f$L_3\f$), then we need to enforce: * * \f[ x_3 \leq C_{L_1} \f] * \f[ x_3 + x_4 \leq C_{L_2} \f] * \f[ x_4 \leq C_{L_3} \f] - * - * One could set every variable to 0 to make sure the constraints are - * satisfied but this would obviously not be very realistic. A - * possible objective is to try to maximize the minimum of the - * \f$x_i\f$ . This ensures that all the \f$x_i\f$ are positive and "as - * large as possible". * - * This is called *max-min fairness* and is the most commonly used - * objective in SimGrid. Another possibility is to maximize - * \f$\sum_if(x_i)\f$, where \f$f\f$ is a strictly increasing concave - * function. + * One could set every variable to 0 to make sure the constraints are satisfied but this would obviously not be very + * realistic. A possible objective is to try to maximize the minimum of the \f$x_i\f$ . This ensures that all the + * \f$x_i\f$ are positive and "as large as possible". * + * This is called *max-min fairness* and is the most commonly used objective in SimGrid. Another possibility is to + * maximize \f$\sum_if(x_i)\f$, where \f$f\f$ is a strictly increasing concave function. * * Constraint: * - bound (set) @@ -88,32 +77,38 @@ * max( var1.weight * var1.value * elem5.value , var3.weight * var3.value * elem6.value ) <= cons3.bound * * This is usefull for the sharing of resources for various models. - * For instance, for the network model, each link is associated - * to a constraint and each communication to a variable. - * + * For instance, for the network model, each link is associated to a constraint and each communication to a variable. * * Implementation details * - * For implementation reasons, we are interested in distinguishing variables that actually participate to the computation of constraints, and those who are part of the equations but are stuck to zero. - * We call enabled variables, those which var.weight is strictly positive. Zero-weight variables are called disabled variables. + * For implementation reasons, we are interested in distinguishing variables that actually participate to the + * computation of constraints, and those who are part of the equations but are stuck to zero. + * We call enabled variables, those which var.weight is strictly positive. Zero-weight variables are called disabled + * variables. * Unfortunately this concept of enabled/disabled variables intersects with active/inactive variable. - * Semantically, the intent is similar, but the conditions under which a variable is active is slightly more strict than the conditions for it to be enabled. + * Semantically, the intent is similar, but the conditions under which a variable is active is slightly more strict + * than the conditions for it to be enabled. * A variable is active only if its var.value is non-zero (and, by construction, its var.weight is non-zero). - * In general, variables remain disabled after their creation, which often models an initialization phase (e.g. first packet propagating in the network). Then, it is enabled by the corresponding model. Afterwards, the max-min solver (lmm_solve()) activates it when appropriate. It is possible that the variable is again disabled, e.g. to model the pausing of an action. - * + * In general, variables remain disabled after their creation, which often models an initialization phase (e.g. first + * packet propagating in the network). Then, it is enabled by the corresponding model. Afterwards, the max-min solver + * (lmm_solve()) activates it when appropriate. It is possible that the variable is again disabled, e.g. to model the + * pausing of an action. * * Concurrency limit and maximum * * We call concurrency, the number of variables that can be enabled at any time for each constraint. - * From a model perspective, this "concurrency" often represents the number of actions that actually compete for one constraint. + * From a model perspective, this "concurrency" often represents the number of actions that actually compete for one + * constraint. * The LMM solver is able to limit the concurrency for each constraint, and to monitor its maximum value. * * One may want to limit the concurrency of constraints for essentially three reasons: - * - Keep LMM system in a size that can be solved (it does not react very well with tens of thousands of variables per constraint) + * - Keep LMM system in a size that can be solved (it does not react very well with tens of thousands of variables per + * constraint) * - Stay within parameters where the fluid model is accurate enough. * - Model serialization effects * - * The concurrency limit can also be set to a negative value to disable concurrency limit. This can improve performance slightly. + * The concurrency limit can also be set to a negative value to disable concurrency limit. This can improve performance + * slightly. * * Overall, each constraint contains three fields related to concurrency: * - concurrency_limit which is the limit enforced by the solver @@ -123,7 +118,8 @@ * Variables also have one field related to concurrency: concurrency_share. * In effect, in some cases, one variable is involved multiple times (i.e. two elements) in a constraint. * For example, cross-traffic is modeled using 2 elements per constraint. - * concurrency_share formally corresponds to the maximum number of elements that associate the variable and any given constraint. + * concurrency_share formally corresponds to the maximum number of elements that associate the variable and any given + * constraint. */ XBT_PUBLIC_DATA(double) sg_maxmin_precision; @@ -133,7 +129,8 @@ static XBT_INLINE void double_update(double *variable, double value, double prec { //printf("Updating %g -= %g +- %g\n",*variable,value,precision); //xbt_assert(value==0 || value>precision); - //Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may happen, and the precision mechanism is not active... + //Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may happen, + //and the precision mechanism is not active... //xbt_assert(*variable< (2<= 64KiB). + * This model is proposed by Pierre-Nicolas Clauss and Martin Quinson and Stéphane Génaud based on the model 'LV08' and + * different correction factors depending on the communication size (< 1KiB, < 64KiB, >= 64KiB). * See comments in the code for more information. * * \see surf_host_model_init_SMPI() @@ -576,9 +566,8 @@ XBT_PUBLIC(void) surf_network_model_init_IB(void); /** \ingroup SURF_models * \brief Initializes the platform with the network model 'LegrandVelho' * - * This model is proposed by Arnaud Legrand and Pedro Velho based on - * the results obtained with the GTNets simulator for onelink and - * dogbone sharing scenarios. See comments in the code for more information. + * This model is proposed by Arnaud Legrand and Pedro Velho based on the results obtained with the GTNets simulator for + * onelink and dogbone sharing scenarios. See comments in the code for more information. * * \see surf_host_model_init_LegrandVelho() */ @@ -587,11 +576,9 @@ XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(void); /** \ingroup SURF_models * \brief Initializes the platform with the network model 'Constant' * - * In this model, the communication time between two network cards is - * constant, hence no need for a routing table. This is particularly - * usefull when simulating huge distributed algorithms where - * scalability is really an issue. This function is called in - * conjunction with surf_host_model_init_compound. + * In this model, the communication time between two network cards is constant, hence no need for a routing table. + * This is particularly useful when simulating huge distributed algorithms where scalability is really an issue. This + * function is called in conjunction with surf_host_model_init_compound. * * \see surf_host_model_init_compound() */ @@ -600,8 +587,7 @@ XBT_PUBLIC(void) surf_network_model_init_Constant(void); /** \ingroup SURF_models * \brief Initializes the platform with the network model CM02 * - * You sould call this function by yourself only if you plan using - * surf_host_model_init_compound. + * You sould call this function by yourself only if you plan using surf_host_model_init_compound. * See comments in the code for more information. */ XBT_PUBLIC(void) surf_network_model_init_CM02(void); @@ -610,8 +596,8 @@ XBT_PUBLIC(void) surf_network_model_init_CM02(void); /** \ingroup SURF_models * \brief Initializes the platform with the network model NS3 * - * This function is called by surf_host_model_init_NS3 - * or by yourself only if you plan using surf_host_model_init_compound + * This function is called by surf_host_model_init_NS3 or by yourself only if you plan using + * surf_host_model_init_compound * * \see surf_host_model_init_NS3() */ @@ -628,7 +614,6 @@ XBT_PUBLIC(void) surf_network_model_init_NS3(void); * IEEE/ACM Transaction on Networking, 11(4):525-536, 2003. * * Call this function only if you plan using surf_host_model_init_compound. - * */ XBT_PUBLIC(void) surf_network_model_init_Reno(void); @@ -642,30 +627,26 @@ XBT_PUBLIC(void) surf_network_model_init_Reno(void); * IEEE/ACM Transaction on Networking, 11(4):525-536, 2003. * * Call this function only if you plan using surf_host_model_init_compound. - * */ XBT_PUBLIC(void) surf_network_model_init_Reno2(void); /** \ingroup SURF_models * \brief Initializes the platform with the network model Vegas * - * This problem is related to max( sum( a * Df * ln(xi) ) ) which is equivalent - * to the proportional fairness. + * This problem is related to max( sum( a * Df * ln(xi) ) ) which is equivalent to the proportional fairness. * * Reference: * [LOW03] S. H. Low. A duality model of TCP and queue management algorithms. * IEEE/ACM Transaction on Networking, 11(4):525-536, 2003. * * Call this function only if you plan using surf_host_model_init_compound. - * */ XBT_PUBLIC(void) surf_network_model_init_Vegas(void); /** \ingroup SURF_models * \brief The list of all available network model models */ -XBT_PUBLIC_DATA(s_surf_model_description_t) - surf_network_model_description[]; +XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[]; /** \ingroup SURF_models * \brief The storage model @@ -683,29 +664,23 @@ XBT_PUBLIC_DATA(surf_storage_model_t) surf_storage_model; /** \ingroup SURF_models * \brief The host model * - * Note that when you create an API on top of SURF, - * the host model should be the only one you use - * because depending on the platform model, the network model and the CPU model - * may not exist. + * Note that when you create an API on top of SURF, the host model should be the only one you use + * because depending on the platform model, the network model and the CPU model may not exist. */ XBT_PUBLIC_DATA(surf_host_model_t) surf_host_model; /** \ingroup SURF_models * \brief The vm model * - * Note that when you create an API on top of SURF, - * the vm model should be the only one you use - * because depending on the platform model, the network model and the CPU model - * may not exist. + * Note that when you create an API on top of SURF,the vm model should be the only one you use + * because depending on the platform model, the network model and the CPU model may not exist. */ XBT_PUBLIC_DATA(surf_vm_model_t) surf_vm_model; /** \ingroup SURF_models * \brief Initializes the platform with a compound host model * - * This function should be called after a cpu_model and a - * network_model have been set up. - * + * This function should be called after a cpu_model and a network_model have been set up. */ XBT_PUBLIC(void) surf_host_model_init_compound(void); @@ -713,49 +688,39 @@ XBT_PUBLIC(void) surf_host_model_init_compound(void); * \brief Initializes the platform with the current best network and cpu models at hand * * This platform model separates the host model and the network model. - * The host model will be initialized with the model compound, the network - * model with the model LV08 (with cross traffic support) and the CPU model with - * the model Cas01. + * The host model will be initialized with the model compound, the network model with the model LV08 (with cross + * traffic support) and the CPU model with the model Cas01. * Such model is subject to modification with warning in the ChangeLog so monitor it! - * */ XBT_PUBLIC(void) surf_host_model_init_current_default(void); /** \ingroup SURF_models * \brief Initializes the platform with the model L07 * - * With this model, only parallel tasks can be used. Resource sharing - * is done by identifying bottlenecks and giving an equal share of - * the model to each action. - * + * With this model, only parallel tasks can be used. Resource sharing is done by identifying bottlenecks and giving an + * equal share of the model to each action. */ XBT_PUBLIC(void) surf_host_model_init_ptask_L07(void); /** \ingroup SURF_models * \brief The list of all available host model models */ -XBT_PUBLIC_DATA(s_surf_model_description_t) - surf_host_model_description[]; +XBT_PUBLIC_DATA(s_surf_model_description_t) surf_host_model_description[]; /** \ingroup SURF_models * \brief Initializes the platform with the current best network and cpu models at hand * * This platform model seperates the host model and the network model. - * The host model will be initialized with the model compound, the network - * model with the model LV08 (with cross traffic support) and the CPU model with - * the model Cas01. + * The host model will be initialized with the model compound, the network model with the model LV08 (with cross + * traffic support) and the CPU model with the model Cas01. * Such model is subject to modification with warning in the ChangeLog so monitor it! - * */ XBT_PUBLIC(void) surf_vm_model_init_HL13(void); /** \ingroup SURF_models * \brief The list of all available vm model models */ -XBT_PUBLIC_DATA(s_surf_model_description_t) - surf_vm_model_description[]; - -/*******************************************/ +XBT_PUBLIC_DATA(s_surf_model_description_t) surf_vm_model_description[]; /** \ingroup SURF_models * \brief List of initialized models @@ -772,19 +737,15 @@ XBT_PUBLIC_DATA(xbt_dynar_t) host_that_restart; */ XBT_PUBLIC_DATA(xbt_dict_t) watched_hosts_lib; -/*******************************************/ /*** SURF Globals **************************/ -/*******************************************/ /** \ingroup SURF_simulation * \brief Initialize SURF * \param argc argument number * \param argv arguments * - * This function has to be called to initialize the common - * structures. Then you will have to create the environment by - * calling - * e.g. surf_host_model_init_CM02() + * This function has to be called to initialize the common structures. Then you will have to create the environment by + * calling e.g. surf_host_model_init_CM02() * * \see surf_host_model_init_CM02(), surf_host_model_init_compound(), surf_exit() */ @@ -802,10 +763,9 @@ XBT_PUBLIC(void) surf_presolve(void); * \param max_date Maximum date to update the simulation to, or -1 * \return the elapsed time, or -1.0 if no event could be executed * - * This function execute all possible events, update the action states - * and returns the time elapsed. - * When you call execute or communicate on a model, the corresponding actions - * are not executed immediately but only when you call surf_solve. + * This function execute all possible events, update the action states and returns the time elapsed. + * When you call execute or communicate on a model, the corresponding actions are not executed immediately but only + * when you call surf_solve. * Note that the returned elapsed time can be zero. */ XBT_PUBLIC(double) surf_solve(double max_date); @@ -827,8 +787,7 @@ XBT_PUBLIC(double) surf_get_clock(void); XBT_PUBLIC(void) surf_exit(void); /* Prototypes of the functions that handle the properties */ -XBT_PUBLIC_DATA(xbt_dict_t) current_property_set; /* the prop set for the currently parsed element (also used in SIMIX) */ - +XBT_PUBLIC_DATA(xbt_dict_t) current_property_set;// the prop set for the currently parsed element (also used in SIMIX) /* The same for model_prop set*/ XBT_PUBLIC_DATA(xbt_dict_t) current_model_property_set; @@ -841,10 +800,8 @@ XBT_PUBLIC_DATA(xbt_dict_t) traces_set_list; XBT_PUBLIC(xbt_dict_t) get_as_router_properties(const char* name); /* - * Returns the initial path. On Windows the initial path is - * the current directory for the current process in the other - * case the function returns "./" that represents the current - * directory on Unix/Linux platforms. + * Returns the initial path. On Windows the initial path is the current directory for the current process in the other + * case the function returns "./" that represents the current directory on Unix/Linux platforms. */ const char *__surf_get_initial_path(void); @@ -864,6 +821,5 @@ int instr_platform_traced (void); xbt_graph_t instr_routing_platform_graph (void); void instr_routing_platform_graph_export_graphviz (xbt_graph_t g, const char *filename); - SG_END_DECL() #endif /* _SURF_SURF_H */ diff --git a/teshsuite/bug-17132/CMakeLists.txt b/teshsuite/bug-17132/CMakeLists.txt index 510f29702d..55551b6d7e 100644 --- a/teshsuite/bug-17132/CMakeLists.txt +++ b/teshsuite/bug-17132/CMakeLists.txt @@ -8,19 +8,11 @@ if(enable_smpi) add_executable (bug-17132 bug-17132.c) target_link_libraries(bug-17132 simgrid) + + ADD_TESH_FACTORIES(tesh-smpi-bug-17132 "thread" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132 --cd ${CMAKE_BINARY_DIR}/teshsuite/bug-17132 ${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132/bug-17132.tesh) endif(enable_smpi) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/bug-17132.tesh - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/bug-17132.c - PARENT_SCOPE) -set(txt_files - ${txt_files} - ${CMAKE_CURRENT_SOURCE_DIR}/hostfile.txt - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/bug-17132.tesh PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/bug-17132.c PARENT_SCOPE) +set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/hostfile.txt PARENT_SCOPE) -ADD_TESH_FACTORIES(tesh-smpi-bug-17132 "thread" --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR} --cd ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/bug-17132.tesh) diff --git a/teshsuite/msg/get_sender/CMakeLists.txt b/teshsuite/msg/get_sender/CMakeLists.txt index d4cef67338..87fa87338e 100644 --- a/teshsuite/msg/get_sender/CMakeLists.txt +++ b/teshsuite/msg/get_sender/CMakeLists.txt @@ -1,15 +1,8 @@ add_executable (get_sender get_sender.c) target_link_libraries(get_sender simgrid) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/get_sender.tesh - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/get_sender_d.xml - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/get_sender.c - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/get_sender.tesh PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/get_sender.c PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/get_sender_d.xml PARENT_SCOPE) + +ADD_TESH_FACTORIES(tesh-msg-get-sender "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender/get_sender.tesh) diff --git a/teshsuite/msg/host_on_off/CMakeLists.txt b/teshsuite/msg/host_on_off/CMakeLists.txt index 2f60d1ea39..65ebe4f51c 100644 --- a/teshsuite/msg/host_on_off/CMakeLists.txt +++ b/teshsuite/msg/host_on_off/CMakeLists.txt @@ -1,21 +1,13 @@ foreach(x host_on_off host_on_off_wait host_on_off_recv) add_executable (${x} ${x}.c) target_link_libraries(${x} simgrid) + + set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.tesh) + set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c) + + ADD_TESH_FACTORIES(tesh-msg-${x} "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off/${x}.tesh) endforeach() -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.tesh - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_wait.tesh - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_recv.tesh - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.c - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_wait.c - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_recv.c - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_d.xml - PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_d.xml PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} PARENT_SCOPE) +set(tesh_files ${tesh_files} PARENT_SCOPE) \ No newline at end of file diff --git a/teshsuite/msg/host_on_off_processes/CMakeLists.txt b/teshsuite/msg/host_on_off_processes/CMakeLists.txt index 91946d3671..1077205679 100644 --- a/teshsuite/msg/host_on_off_processes/CMakeLists.txt +++ b/teshsuite/msg/host_on_off_processes/CMakeLists.txt @@ -1,15 +1,8 @@ add_executable (host_on_off_processes host_on_off_processes.c) target_link_libraries(host_on_off_processes simgrid) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_processes.tesh - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_processes_d.xml - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_processes.c - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_processes.tesh PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_processes_d.xml PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_processes.c PARENT_SCOPE) + +ADD_TESH_FACTORIES(tesh-msg-host-on-off-processes "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off_processes --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off_processes ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh) diff --git a/teshsuite/msg/listen_async/CMakeLists.txt b/teshsuite/msg/listen_async/CMakeLists.txt index 8749c404ed..ebb9a728a1 100644 --- a/teshsuite/msg/listen_async/CMakeLists.txt +++ b/teshsuite/msg/listen_async/CMakeLists.txt @@ -4,4 +4,4 @@ target_link_libraries(listen_async simgrid) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/listen_async.tesh PARENT_SCOPE) set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/listen_async.c PARENT_SCOPE) -ADD_TESH_FACTORIES(tesh-msg-listen-async "thread;ucontext;raw" --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR} --cd ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/listen_async.tesh) +ADD_TESH_FACTORIES(tesh-msg-listen-async "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/listen_async --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/listen_async/ ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/listen_async/listen_async.tesh) diff --git a/teshsuite/msg/pid/CMakeLists.txt b/teshsuite/msg/pid/CMakeLists.txt index 988789a58f..1f5477ae3d 100644 --- a/teshsuite/msg/pid/CMakeLists.txt +++ b/teshsuite/msg/pid/CMakeLists.txt @@ -1,15 +1,8 @@ add_executable (pid pid.c) target_link_libraries(pid simgrid) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/pid.tesh - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/pid_d.xml - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/pid.c - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/pid.tesh PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/pid_d.xml PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/pid.c PARENT_SCOPE) + +ADD_TESH_FACTORIES(tesh-msg-pid "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/pid --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/pid ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/pid/pid.tesh) diff --git a/teshsuite/msg/process/CMakeLists.txt b/teshsuite/msg/process/CMakeLists.txt index 903406549e..530bb37350 100644 --- a/teshsuite/msg/process/CMakeLists.txt +++ b/teshsuite/msg/process/CMakeLists.txt @@ -1,15 +1,8 @@ add_executable (process process.c) target_link_libraries(process simgrid) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/process.tesh - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/process_d.xml - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/process.c - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/process.tesh PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/process.c PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/process_d.xml PARENT_SCOPE) + +ADD_TESH_FACTORIES(tesh-msg-process "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/process ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process/process.tesh) diff --git a/teshsuite/msg/process_join/CMakeLists.txt b/teshsuite/msg/process_join/CMakeLists.txt index adb7caccaf..17b581f0d8 100644 --- a/teshsuite/msg/process_join/CMakeLists.txt +++ b/teshsuite/msg/process_join/CMakeLists.txt @@ -1,15 +1,8 @@ add_executable (process_join process_join.c) target_link_libraries(process_join simgrid) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/process_join.tesh - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/process_join_d.xml - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/process_join.c - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/process_join.tesh PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/process_join.c PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/process_join_d.xml PARENT_SCOPE) + +ADD_TESH_FACTORIES(tesh-msg-process-join "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process_join --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/process_join ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process_join/process_join.tesh) diff --git a/teshsuite/msg/storage/CMakeLists.txt b/teshsuite/msg/storage/CMakeLists.txt index 68bc0d895c..b756abf448 100644 --- a/teshsuite/msg/storage/CMakeLists.txt +++ b/teshsuite/msg/storage/CMakeLists.txt @@ -1,18 +1,14 @@ -add_executable (storage_basic storage_basic.c) -target_link_libraries(storage_basic simgrid) -add_executable (concurrent_rw concurrent_rw.c) -target_link_libraries(concurrent_rw simgrid) +foreach(x storage_basic concurrent_rw) + add_executable (${x} ${x}.c) + target_link_libraries(${x} simgrid) + + set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.tesh) + set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c) + + ADD_TESH_FACTORIES(tesh-msg-${x} "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/storage --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/storage ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/storage/${x}.tesh) +endforeach() + +set(tesh_files ${tesh_files} PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml PARENT_SCOPE) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/storage_basic.tesh - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/storage_basic.c - ${CMAKE_CURRENT_SOURCE_DIR}/concurrent_rw.c - PARENT_SCOPE) diff --git a/teshsuite/msg/storage/concurrent_rw.c b/teshsuite/msg/storage/concurrent_rw.c index df57ce86ec..2024745368 100644 --- a/teshsuite/msg/storage/concurrent_rw.c +++ b/teshsuite/msg/storage/concurrent_rw.c @@ -7,88 +7,37 @@ #include "simgrid/msg.h" #include -#define FILENAME1 "/sd1/doc/simgrid/examples/cxx/autoDestination/Main.cxx" +#define FILENAME1 "/home/doc/simgrid/examples/platforms/g5k.xml" XBT_LOG_NEW_DEFAULT_CATEGORY(storage,"Messages specific for this simulation"); -static void display_storage_properties(msg_storage_t storage){ - xbt_dict_cursor_t cursor = NULL; - char *key, *data; - xbt_dict_t props = MSG_storage_get_properties(storage); - if (xbt_dict_length(props) > 0){ - XBT_INFO("\tProperties of mounted storage: %s", MSG_storage_get_name(storage)); - xbt_dict_foreach(props, cursor, key, data) - XBT_INFO("\t\t'%s' -> '%s'", key, data); - } else { - XBT_INFO("\tNo property attached."); - } -} - -static void display_storage_content(msg_storage_t storage){ - XBT_INFO("Print the content of the storage element: %s",MSG_storage_get_name(storage)); - xbt_dict_cursor_t cursor = NULL; - char *file; - sg_size_t *psize; - xbt_dict_t content = MSG_storage_get_content(storage); - if (content){ - xbt_dict_foreach(content, cursor, file, psize) - XBT_INFO("\t%s size: %llu bytes", file, *psize); - } else { - XBT_INFO("\tNo content."); - } - xbt_dict_free(&content); -} - -static void dump_storage_by_name(char *name){ - XBT_INFO("*** Dump a storage element ***"); - msg_storage_t storage = MSG_storage_get_by_name(name); - - if(storage){ - display_storage_content(storage); - } else{ - XBT_INFO("Unable to retrieve storage element by its name: %s.", name); - } -} -static void storage_info(msg_host_t host) -{ - const char* host_name = MSG_host_get_name(host); - XBT_INFO("*** Storage info on %s ***", host_name); - - xbt_dict_cursor_t cursor = NULL; - char* mount_name; - char* storage_name; - msg_storage_t storage; - - xbt_dict_t storage_list = MSG_host_get_mounted_storage_list(host); - - xbt_dict_foreach(storage_list,cursor,mount_name,storage_name){ - XBT_INFO("\tStorage name: %s, mount name: %s", storage_name, mount_name); - storage = MSG_storage_get_by_name(storage_name); - - sg_size_t free_size = MSG_storage_get_free_size(storage); - sg_size_t used_size = MSG_storage_get_used_size(storage); - - XBT_INFO("\t\tFree size: %llu bytes", free_size); - XBT_INFO("\t\tUsed size: %llu bytes", used_size); - - display_storage_properties(storage); - dump_storage_by_name(storage_name); - } - xbt_dict_free(&storage_list); -} - static int host(int argc, char *argv[]) { char name[2048]; - sprintf(name,"%s%i", FILENAME1,MSG_process_self_PID()); + int id = MSG_process_self_PID(); + sprintf(name,"%s%i", FILENAME1, id); msg_file_t file = MSG_file_open(name, NULL); - //MSG_file_read(file, MSG_file_get_size(file)); - MSG_file_write(file, 500000); - - XBT_INFO("Size of %s: %llu", MSG_file_get_name(file), MSG_file_get_size(file)); + XBT_INFO("process %d is writing!", id); + MSG_file_write(file, 3000000); + XBT_INFO("process %d goes to sleep for %d seconds", id, id); + MSG_process_sleep(id); + XBT_INFO("process %d is writing again!", id); + MSG_file_write(file, 3000000); + XBT_INFO("process %d goes to sleep for %d seconds", id, 6 - id); + MSG_process_sleep(6-id); + XBT_INFO("process %d is reading!", id); + MSG_file_seek(file, 0, SEEK_SET); + MSG_file_read(file, 3000000); + XBT_INFO("process %d goes to sleep for %d seconds", id, id); + MSG_process_sleep(id); + XBT_INFO("process %d is reading again!", id); + MSG_file_seek(file, 0, SEEK_SET); + MSG_file_read(file, 3000000); + + XBT_INFO("process %d => Size of %s: %llu", id, MSG_file_get_name(file), MSG_file_get_size(file)); MSG_file_close(file); - return 1; + return 0; } int main(int argc, char **argv) @@ -97,13 +46,11 @@ int main(int argc, char **argv) MSG_create_environment(argv[1]); MSG_function_register("host", host); - storage_info(MSG_host_by_name(xbt_strdup("host"))); - for(int i = 0 ; i<10; i++){ - MSG_process_create(xbt_strdup("host"), host, NULL, MSG_host_by_name(xbt_strdup("host"))); + for(int i = 0 ; i < 5; i++){ + MSG_process_create("bob", host, NULL, MSG_host_by_name(xbt_strdup("bob"))); } int res = MSG_main(); - storage_info(MSG_host_by_name(xbt_strdup("host"))); XBT_INFO("Simulation time %g", MSG_get_clock()); return res != MSG_OK; diff --git a/teshsuite/msg/storage/concurrent_rw.tesh b/teshsuite/msg/storage/concurrent_rw.tesh new file mode 100644 index 0000000000..2d837c54dc --- /dev/null +++ b/teshsuite/msg/storage/concurrent_rw.tesh @@ -0,0 +1,42 @@ +$ ./concurrent_rw$EXEEXT ${srcdir:=.}/../../../examples/platforms/storage/storage.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +> [ 0.000000] (1:bob@bob) process 1 is writing! +> [ 0.000000] (2:bob@bob) process 2 is writing! +> [ 0.000000] (3:bob@bob) process 3 is writing! +> [ 0.000000] (4:bob@bob) process 4 is writing! +> [ 0.000000] (5:bob@bob) process 5 is writing! +> [ 0.500000] (1:bob@bob) process 1 goes to sleep for 1 seconds +> [ 0.500000] (2:bob@bob) process 2 goes to sleep for 2 seconds +> [ 0.500000] (3:bob@bob) process 3 goes to sleep for 3 seconds +> [ 0.500000] (4:bob@bob) process 4 goes to sleep for 4 seconds +> [ 0.500000] (5:bob@bob) process 5 goes to sleep for 5 seconds +> [ 1.500000] (1:bob@bob) process 1 is writing again! +> [ 1.600000] (1:bob@bob) process 1 goes to sleep for 5 seconds +> [ 2.500000] (2:bob@bob) process 2 is writing again! +> [ 2.600000] (2:bob@bob) process 2 goes to sleep for 4 seconds +> [ 3.500000] (3:bob@bob) process 3 is writing again! +> [ 3.600000] (3:bob@bob) process 3 goes to sleep for 3 seconds +> [ 4.500000] (4:bob@bob) process 4 is writing again! +> [ 4.600000] (4:bob@bob) process 4 goes to sleep for 2 seconds +> [ 5.500000] (5:bob@bob) process 5 is writing again! +> [ 5.600000] (5:bob@bob) process 5 goes to sleep for 1 seconds +> [ 6.600000] (4:bob@bob) process 4 is reading! +> [ 6.600000] (5:bob@bob) process 5 is reading! +> [ 6.600000] (1:bob@bob) process 1 is reading! +> [ 6.600000] (2:bob@bob) process 2 is reading! +> [ 6.600000] (3:bob@bob) process 3 is reading! +> [ 6.750000] (4:bob@bob) process 4 goes to sleep for 4 seconds +> [ 6.750000] (5:bob@bob) process 5 goes to sleep for 5 seconds +> [ 6.750000] (1:bob@bob) process 1 goes to sleep for 1 seconds +> [ 6.750000] (2:bob@bob) process 2 goes to sleep for 2 seconds +> [ 6.750000] (3:bob@bob) process 3 goes to sleep for 3 seconds +> [ 7.750000] (1:bob@bob) process 1 is reading again! +> [ 7.780000] (1:bob@bob) process 1 => Size of /home/doc/simgrid/examples/platforms/g5k.xml1: 6000000 +> [ 8.750000] (2:bob@bob) process 2 is reading again! +> [ 8.780000] (2:bob@bob) process 2 => Size of /home/doc/simgrid/examples/platforms/g5k.xml2: 6000000 +> [ 9.750000] (3:bob@bob) process 3 is reading again! +> [ 9.780000] (3:bob@bob) process 3 => Size of /home/doc/simgrid/examples/platforms/g5k.xml3: 6000000 +> [ 10.750000] (4:bob@bob) process 4 is reading again! +> [ 10.780000] (4:bob@bob) process 4 => Size of /home/doc/simgrid/examples/platforms/g5k.xml4: 6000000 +> [ 11.750000] (5:bob@bob) process 5 is reading again! +> [ 11.780000] (5:bob@bob) process 5 => Size of /home/doc/simgrid/examples/platforms/g5k.xml5: 6000000 +> [ 11.780000] (0:maestro@) Simulation time 11.78 diff --git a/teshsuite/msg/task_destroy_cancel/CMakeLists.txt b/teshsuite/msg/task_destroy_cancel/CMakeLists.txt index bfcd350dcb..645bb7f57e 100644 --- a/teshsuite/msg/task_destroy_cancel/CMakeLists.txt +++ b/teshsuite/msg/task_destroy_cancel/CMakeLists.txt @@ -1,15 +1,8 @@ add_executable (task_destroy_cancel task_destroy_cancel.c) target_link_libraries(task_destroy_cancel simgrid) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.tesh - PARENT_SCOPE) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel_d.xml - PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.c - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.tesh PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel.c PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/task_destroy_cancel_d.xml PARENT_SCOPE) + +ADD_TESH_FACTORIES(tesh-msg-task-destroy-cancel "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/task_destroy_cancel ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh) diff --git a/teshsuite/msg/trace/CMakeLists.txt b/teshsuite/msg/trace/CMakeLists.txt index f7c52b26ed..b9413eba73 100644 --- a/teshsuite/msg/trace/CMakeLists.txt +++ b/teshsuite/msg/trace/CMakeLists.txt @@ -1,10 +1,8 @@ add_executable (test_trace_integration test_trace_integration.c) target_link_libraries(test_trace_integration simgrid) -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/trace.tesh - PARENT_SCOPE) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/trace.tesh PARENT_SCOPE) +set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/test_trace_integration.c PARENT_SCOPE) set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/test-hbp1.0-hbp1.0-hbp1.0.xml @@ -20,7 +18,5 @@ set(xml_files ${CMAKE_CURRENT_SOURCE_DIR}/test-hbp1-c1s1-c3s2.xml ${CMAKE_CURRENT_SOURCE_DIR}/test-hbp2.5-hbp1.5.xml PARENT_SCOPE) -set(teshsuite_src - ${teshsuite_src} - ${CMAKE_CURRENT_SOURCE_DIR}/test_trace_integration.c - PARENT_SCOPE) + +ADD_TESH_FACTORIES(tesh-msg-trace "thread;ucontext;raw" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/trace --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/trace ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/trace/trace.tesh) diff --git a/tools/cmake/Tests.cmake b/tools/cmake/Tests.cmake index 6288648351..0607a422c6 100644 --- a/tools/cmake/Tests.cmake +++ b/tools/cmake/Tests.cmake @@ -191,18 +191,6 @@ IF(NOT enable_memcheck) ## INTERFACES ## ### MSG ### # BEGIN TESH TESTS - ADD_TESH_FACTORIES(tesh-msg-get-sender "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/get_sender ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/get_sender/get_sender.tesh) - ADD_TESH_FACTORIES(tesh-msg-host-on-off "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off/host_on_off.tesh) - ADD_TESH_FACTORIES(tesh-msg-host-on-off-wait "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off/host_on_off_wait.tesh) - ADD_TESH_FACTORIES(tesh-msg-host-on-off-recv "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off/host_on_off_recv.tesh) - ADD_TESH_FACTORIES(tesh-msg-host-on-off-processes "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off_processes --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/host_on_off_processes ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/host_on_off_processes/host_on_off_processes.tesh) - ADD_TESH_FACTORIES(tesh-msg-pid "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/pid --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/pid ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/pid/pid.tesh) - ADD_TESH_FACTORIES(tesh-msg-process "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/process ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process/process.tesh) - ADD_TESH_FACTORIES(tesh-msg-process-join "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process_join --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/process_join ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/process_join/process_join.tesh) - ADD_TESH_FACTORIES(tesh-msg-storage-basic "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/storage --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/storage ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/storage/storage_basic.tesh) - ADD_TESH_FACTORIES(tesh-msg-task-destroy-cancel "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/task_destroy_cancel ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.tesh) - ADD_TESH_FACTORIES(tesh-msg-trace "thread;ucontext;raw" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/msg/trace --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/trace ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/trace/trace.tesh) - ADD_TESH(msg-file --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/ --cd ${CMAKE_HOME_DIRECTORY}/examples/ ${CMAKE_HOME_DIRECTORY}/examples/msg/io/io.tesh) ADD_TESH(msg-storage --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/ --cd ${CMAKE_HOME_DIRECTORY}/examples/ ${CMAKE_HOME_DIRECTORY}/examples/msg/io/storage.tesh) ADD_TESH(msg-remote-io --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/ --setenv srcdir=${CMAKE_HOME_DIRECTORY}/ --cd ${CMAKE_HOME_DIRECTORY}/examples/ ${CMAKE_HOME_DIRECTORY}/examples/msg/io/remote.tesh)