The ultimate goal is to make them useless, then deprecated, then gone.
### Maintainer mode
src/simdag/dax_dtd.l
-src/surf/simgrid_dtd.l
+src/surf/xml/simgrid_dtd.l
src/xbt/graphxml.l
### Jedule
examples/simdag/scheduling/simgrid.jed
#define _SURF_SURF_ROUTING_H
#include "xbt/lib.h"
-#include "simgrid/platf.h"
SG_BEGIN_DECL()
/* SimGrid Lua bindings */
#include "lua_private.h"
-#include "simgrid/platf_interface.h"
-#include "surf/surfxml_parse.h"
+#include "src/surf/xml/platf.hpp"
#include "surf/surf_routing.h"
#include <string.h>
#include <ctype.h>
return 0;
}
-#include "surf/surfxml_parse.h" /* to override surf_parse and bypass the parser */
-
int console_add_route(lua_State *L) {
XBT_DEBUG("Adding route");
s_sg_platf_route_cbarg_t route;
#include "lua_private.h"
#include "lua_utils.h"
-#include "xbt.h"
-#include "simgrid/msg.h"
-#include "simgrid/simdag.h"
-#include "surf/surfxml_parse.h"
+#include "src/surf/xml/platf.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua, bindings, "Lua Bindings");
+++ /dev/null
-/* platf_interface.h - Internal interface to the SimGrid platforms */
-
-/* Copyright (c) 2004-2007, 2009-2015. The SimGrid Team.
- * All rights reserved. */
-
-/* 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. */
-
-#ifndef SG_PLATF_INTERFACE_H
-#define SG_PLATF_INTERFACE_H
-
-#include <xbt/dict.h>
-
-#include "simgrid/platf.h" /* public interface */
-#include "xbt/RngStream.h"
-
-#include <simgrid/forward.h>
-
-SG_BEGIN_DECL()
-
-/* Module management functions */
-XBT_PUBLIC(void) sg_platf_init(void);
-XBT_PUBLIC(void) sg_platf_exit(void);
-
-/** \brief Pick the right models for CPU, net and host, and call their model_init_preparse
- *
- * Must be called within parsing/creating the environment (after the <config>s, if any, and before <AS> or friends such as <cluster>)
- */
-XBT_PUBLIC(void) surf_config_models_setup(void);
-
-SG_END_DECL()
-
-#endif /* SG_PLATF_INTERFACE_H */
#include "surf/datatypes.h"
#include "xbt/lib.h"
#include "surf/surf_routing.h"
-#include "simgrid/platf_interface.h"
#include "simgrid/datatypes.h"
#include "simgrid/forward.h"
xbt_graph_t instr_routing_platform_graph (void);
void instr_routing_platform_graph_export_graphviz (xbt_graph_t g, const char *filename);
-/********** Routing **********/
-void routing_AS_begin(sg_platf_AS_cbarg_t AS);
-void routing_AS_end(void);
-void routing_cluster_add_backbone(Link* bb);
-surf_As* routing_get_current();
SG_END_DECL()
#endif /* _SURF_SURF_H */
#include "xbt/graph.h"
#include "xbt/dict.h"
-#include "simgrid/platf.h"
typedef enum {
PAJE_DefineContainerType,
#include "xbt/replay.h"
#include "simgrid/sg_config.h" /* Configuration mechanism of SimGrid */
#include "src/surf/callbacks.h"
-#include "src/surf/platform.hpp"
+#include "src/surf/xml/platf_private.hpp" // FIXME: KILLME by removing MSG_post_create_environment()
XBT_LOG_NEW_CATEGORY(msg, "All MSG categories");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_kernel, msg,
#include "msg_private.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
-#include "simgrid/platf.h"
#include "simgrid/host.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_vm, msg,
_sg_cfg_init_status = 0;
}
-/* Pick the right models for CPU, net and host, and call their model_init_preparse */
-void surf_config_models_setup()
-{
- const char *host_model_name;
- const char *vm_model_name;
- int host_id = -1;
- int vm_id = -1;
- char *network_model_name = NULL;
- char *cpu_model_name = NULL;
- int storage_id = -1;
- char *storage_model_name = NULL;
-
- host_model_name = xbt_cfg_get_string(_sg_cfg_set, "host/model");
- vm_model_name = xbt_cfg_get_string(_sg_cfg_set, "vm/model");
- network_model_name = xbt_cfg_get_string(_sg_cfg_set, "network/model");
- cpu_model_name = xbt_cfg_get_string(_sg_cfg_set, "cpu/model");
- storage_model_name = xbt_cfg_get_string(_sg_cfg_set, "storage/model");
-
- /* Check whether we use a net/cpu model differing from the default ones, in which case
- * we should switch to the "compound" host model to correctly dispatch stuff to
- * the right net/cpu models.
- */
-
- if ((!xbt_cfg_is_default_value(_sg_cfg_set, "network/model") ||
- !xbt_cfg_is_default_value(_sg_cfg_set, "cpu/model")) &&
- xbt_cfg_is_default_value(_sg_cfg_set, "host/model")) {
- host_model_name = "compound";
- xbt_cfg_set_string(_sg_cfg_set, "host/model", host_model_name);
- }
-
- XBT_DEBUG("host model: %s", host_model_name);
- host_id = find_model_description(surf_host_model_description, host_model_name);
- if (!strcmp(host_model_name, "compound")) {
- int network_id = -1;
- int cpu_id = -1;
-
- xbt_assert(cpu_model_name,
- "Set a cpu model to use with the 'compound' host model");
-
- xbt_assert(network_model_name,
- "Set a network model to use with the 'compound' host model");
-
- if(surf_cpu_model_init_preparse){
- surf_cpu_model_init_preparse();
- } else {
- cpu_id =
- find_model_description(surf_cpu_model_description, cpu_model_name);
- surf_cpu_model_description[cpu_id].model_init_preparse();
- }
-
- network_id =
- find_model_description(surf_network_model_description,
- network_model_name);
- surf_network_model_description[network_id].model_init_preparse();
- }
-
- XBT_DEBUG("Call host_model_init");
- surf_host_model_description[host_id].model_init_preparse();
-
- XBT_DEBUG("Call vm_model_init");
- vm_id = find_model_description(surf_vm_model_description, vm_model_name);
- surf_vm_model_description[vm_id].model_init_preparse();
-
- XBT_DEBUG("Call storage_model_init");
- storage_id = find_model_description(surf_storage_model_description, storage_model_name);
- surf_storage_model_description[storage_id].model_init_preparse();
-
-}
-
int sg_cfg_is_default_value(const char *name)
{
return xbt_cfg_is_default_value(_sg_cfg_set, name);
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/dict.h"
-#include "surf/surfxml_parse.h"
+#include "src/surf/xml/platf_private.hpp" // FIXME: KILLME. There must be a better way than mimicking XML here
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_deployment, simix,
"Logging specific to SIMIX (deployment)");
#include "xbt/log.h"
#include "xbt/xbt_os_time.h"
#include "xbt/config.h"
-#include "surf/surfxml_parse.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix,
"Logging specific to SIMIX (environment)");
#endif
#include "src/mc/mc_record.h"
-#include "src/surf/platform.hpp"
#ifdef HAVE_SMPI
#include "src/smpi/private.h"
#include "cpu_ti.hpp"
#include "maxmin_private.hpp"
#include "simgrid/sg_config.h"
-#include "src/surf/platform.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_cas, surf_cpu,
"Logging specific to the SURF CPU IMPROVED module");
#include "cpu_ti.hpp"
#include "xbt/heap.h"
#include "src/surf/trace_mgr.hpp"
-#include "src/surf/platform.hpp"
#ifndef SURF_MODEL_CPUTI_H_
#define SURF_MODEL_CPUTI_H_
#include "src/surf/surf_private.h"
#include "xbt/graph.h"
-#include "src/surf/platform.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_routing, instr, "Tracing platform hierarchy");
#include "network_cm02.hpp"
#include "maxmin_private.hpp"
#include "simgrid/sg_config.h"
-#include "src/surf/platform.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
#include "network_constant.hpp"
-#include "host_interface.hpp"
-#include "src/surf/platform.hpp"
-
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
/*********
}
-#include <surf/surfxml_parse.h> // FIXME: move that back to the parsing area
+#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
namespace simgrid {
namespace surf {
#include "src/surf/surf_private.h"
#include "src/surf/host_interface.hpp"
#include "simgrid/sg_config.h"
-#include "src/surf/platform.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ns3);
xbt_lib_set(as_router_lib, as_id, NS3_ASR_LEVEL, ns3_add_AS(as_id) );
}
-#include <surf/surfxml_parse.h> // FIXME: move that back to the parsing area
+#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
static void parse_ns3_add_cluster(sg_platf_cluster_cbarg_t cluster)
{
const char *groups = NULL;
(((s_smpi_factor_t*)pa)->factor < ((s_smpi_factor_t*)pb)->factor) ? -1 : 0;
}
-#include <surf/surfxml_parse.h> // FIXME: move that back to the parsing area
+#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
static xbt_dynar_t parse_factor(const char *smpi_coef_string)
{
char *value = NULL;
+++ /dev/null
-/* Copyright (c) 2016. The SimGrid Team.
- * All rights reserved. */
-
-/* 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. */
-
-#ifndef SIMGRID_PLATFORM_HPP
-#define SIMGRID_PLATFORM_HPP
-
-#include <xbt/base.h>
-#include <xbt/signal.hpp>
-#include <simgrid/forward.h>
-
-namespace simgrid {
-namespace surf {
-
-extern XBT_PRIVATE simgrid::xbt::signal<void(sg_platf_link_cbarg_t)> on_link;
-extern XBT_PRIVATE simgrid::xbt::signal<void(sg_platf_cluster_cbarg_t)> on_cluster;
-extern XBT_PRIVATE simgrid::xbt::signal<void(void)> on_postparse;
-
-}
-}
-
-#endif
#include "cpu_interface.hpp"
#include "surf_routing.hpp"
#include "xbt/lib.h"
-#include "src/surf/platform.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg);
#include "xbt/dict.h"
#include "xbt/RngStream.h"
#include <xbt/signal.hpp>
-#include "simgrid/platf_interface.h"
#include "surf/surf.h"
#include "src/simix/smx_private.h"
-#include "src/surf/platform.hpp"
-#include "surf/surfxml_parse.h"// FIXME: brain dead public header
+#include "src/include/simgrid/sg_config.h"
+#include "src/surf/xml/platf_private.hpp"
-#include "src/surf/platform.hpp"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/host_interface.hpp"
#include "src/surf/network_interface.hpp"
simgrid::surf::on_postparse();
}
+/* Pick the right models for CPU, net and host, and call their model_init_preparse */
+static void surf_config_models_setup()
+{
+ const char *host_model_name;
+ const char *vm_model_name;
+ int host_id = -1;
+ int vm_id = -1;
+ char *network_model_name = NULL;
+ char *cpu_model_name = NULL;
+ int storage_id = -1;
+ char *storage_model_name = NULL;
+
+ host_model_name = xbt_cfg_get_string(_sg_cfg_set, "host/model");
+ vm_model_name = xbt_cfg_get_string(_sg_cfg_set, "vm/model");
+ network_model_name = xbt_cfg_get_string(_sg_cfg_set, "network/model");
+ cpu_model_name = xbt_cfg_get_string(_sg_cfg_set, "cpu/model");
+ storage_model_name = xbt_cfg_get_string(_sg_cfg_set, "storage/model");
+
+ /* Check whether we use a net/cpu model differing from the default ones, in which case
+ * we should switch to the "compound" host model to correctly dispatch stuff to
+ * the right net/cpu models.
+ */
+
+ if ((!xbt_cfg_is_default_value(_sg_cfg_set, "network/model") ||
+ !xbt_cfg_is_default_value(_sg_cfg_set, "cpu/model")) &&
+ xbt_cfg_is_default_value(_sg_cfg_set, "host/model")) {
+ host_model_name = "compound";
+ xbt_cfg_set_string(_sg_cfg_set, "host/model", host_model_name);
+ }
+
+ XBT_DEBUG("host model: %s", host_model_name);
+ host_id = find_model_description(surf_host_model_description, host_model_name);
+ if (!strcmp(host_model_name, "compound")) {
+ int network_id = -1;
+ int cpu_id = -1;
+
+ xbt_assert(cpu_model_name,
+ "Set a cpu model to use with the 'compound' host model");
+
+ xbt_assert(network_model_name,
+ "Set a network model to use with the 'compound' host model");
+
+ if(surf_cpu_model_init_preparse){
+ surf_cpu_model_init_preparse();
+ } else {
+ cpu_id =
+ find_model_description(surf_cpu_model_description, cpu_model_name);
+ surf_cpu_model_description[cpu_id].model_init_preparse();
+ }
+
+ network_id =
+ find_model_description(surf_network_model_description,
+ network_model_name);
+ surf_network_model_description[network_id].model_init_preparse();
+ }
+
+ XBT_DEBUG("Call host_model_init");
+ surf_host_model_description[host_id].model_init_preparse();
+
+ XBT_DEBUG("Call vm_model_init");
+ vm_id = find_model_description(surf_vm_model_description, vm_model_name);
+ surf_vm_model_description[vm_id].model_init_preparse();
+
+ XBT_DEBUG("Call storage_model_init");
+ storage_id = find_model_description(surf_storage_model_description, storage_model_name);
+ surf_storage_model_description[storage_id].model_init_preparse();
+
+}
+
void sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS)
{
if (!surf_parse_models_setup_already_called) {
storage_running_action_set_that_does_not_need_being_checked = NULL;
}
-#include <surf/surfxml_parse.h> // FIXME: move that back to the parsing area
+#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
Storage *StorageN11Model::createStorage(const char* id, const char* type_id,
const char* content_name, const char* content_type, xbt_dict_t properties,
const char* attach)
#include "xbt/lib.h"
#include "surf/surf_routing.h"
-#include "simgrid/platf_interface.h"
#include "surf/surf.h"
#include "src/surf/surf_private.h"
#include "src/internal_config.h"
#include "src/surf/trace_mgr.hpp"
#include "src/instr/instr_private.h"
#include "surf/surfxml_parse_values.h"
+#include "src/surf/xml/platf_private.hpp"
#define NO_MAX_DURATION -1.0
#include "surf_routing_private.hpp"
#include "surf_routing_cluster.hpp"
-#include "simgrid/platf_interface.h" // platform creation API internal interface
#include "simgrid/sg_config.h"
#include "storage_interface.hpp"
-#include "src/surf/platform.hpp"
#include "surf/surfxml_parse_values.h"
#include "src/surf/surf_routing_cluster_torus.hpp"
#include "src/surf/surf_routing_floyd.hpp"
#include "src/surf/surf_routing_full.hpp"
#include "src/surf/surf_routing_vivaldi.hpp"
-#include <surf/surfxml_parse.h> // FIXME: move that back to the parsing area
+#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
#include <vector>
#include <algorithm>
-#include <xbt/dict.h>
-#include <xbt/log.h>
-#include <xbt/sysdep.h>
-#include <xbt/dynar.h>
-#include <xbt/graph.h>
-
-#include "simgrid/platf_interface.h" // platform creation API internal interface
+#include "xbt/dict.h"
+#include "xbt/log.h"
+#include "xbt/sysdep.h"
+#include "xbt/dynar.h"
+#include "xbt/graph.h"
#include "surf_routing_private.hpp"
#include "network_interface.hpp"
#include <fstream>
#include <sstream>
-#include <surf/surfxml_parse.h> // FIXME: move that back to the parsing area
+#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_fat_tree, surf, "Routing for fat trees");
#include "src/surf/surf_routing_private.hpp"
#include "src/surf/surf_routing_cluster_torus.hpp"
-#include <surf/surfxml_parse.h> // FIXME: move that back to the parsing area
+#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_torus, surf_route_cluster, "Torus Routing part of surf");
#include "xbt/dynar.h"
#include "surf/maxmin.h"
#include "surf/datatypes.h"
-#include "simgrid/platf_interface.h"
#include "simgrid/forward.h"
SG_BEGIN_DECL()
int free_me;
} s_tmgr_trace_event_t;
-XBT_PRIVATE double tmgr_event_generator_next_value(probabilist_event_generator_t generator);
-
/* Creation functions */
XBT_PUBLIC(tmgr_trace_t) tmgr_empty_trace_new(void);
XBT_PUBLIC(void) tmgr_trace_free(tmgr_trace_t trace);
#ifndef _SURF_SURFXML_PARSE_H
#define _SURF_SURFXML_PARSE_H
-#include <stdio.h> /* to have FILE */
#include "xbt/misc.h"
#include "xbt/function_types.h"
#include "xbt/dict.h"
SG_BEGIN_DECL()
-#include "surf/simgrid_dtd.h"
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
+/* Module management functions */
+XBT_PUBLIC(void) sg_platf_init(void);
+XBT_PUBLIC(void) sg_platf_exit(void);
XBT_PUBLIC(void) surf_parse_open(const char *file);
XBT_PUBLIC(void) surf_parse_close(void);
XBT_PUBLIC(double) surf_parse_get_bandwidth(const char *string, const char *entity_kind, const char *name);
XBT_PUBLIC(double) surf_parse_get_speed(const char *string, const char *entity_kind, const char *name);
-/* Prototypes of the functions offered by flex */
-XBT_PUBLIC(int) surf_parse_lex(void);
-XBT_PUBLIC(int) surf_parse_get_lineno(void);
-XBT_PUBLIC(FILE *) surf_parse_get_in(void);
-XBT_PUBLIC(FILE *) surf_parse_get_out(void);
-XBT_PUBLIC(yy_size_t) surf_parse_get_leng(void);
-XBT_PUBLIC(char *) surf_parse_get_text(void);
-XBT_PUBLIC(void) surf_parse_set_lineno(int line_number);
-XBT_PUBLIC(void) surf_parse_set_in(FILE * in_str);
-XBT_PUBLIC(void) surf_parse_set_out(FILE * out_str);
-XBT_PUBLIC(int) surf_parse_get_debug(void);
-XBT_PUBLIC(void) surf_parse_set_debug(int bdebug);
-XBT_PUBLIC(int) surf_parse_lex_destroy(void);
-
/* What is needed to bypass the parser. */
XBT_PUBLIC_DATA(int_f_void_t) surf_parse; /* Entry-point to the parser. Set this to your function. */
-/* platf.h - Public interface to the SimGrid platforms */
+/* platf_private.h - Interface to the SimGrid platforms which visibility should be limited to this directory */
/* Copyright (c) 2004-2015. The SimGrid Team.
* All rights reserved. */
#ifndef SG_PLATF_H
#define SG_PLATF_H
-#include <xbt.h>
-#include <simgrid/host.h>
-#include "forward.h"
+#include "simgrid/host.h"
+#include "src/surf/xml/platf.hpp"
SG_BEGIN_DECL()
+#include "src/surf/xml/simgrid_dtd.h"
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
static inline char* sg_storage_name(sg_storage_t storage) {
return storage->key;
/** opaque structure defining a event generator for availability based on a probability distribution */
typedef struct probabilist_event_generator *probabilist_event_generator_t;
+/********** Routing **********/
+void routing_AS_begin(sg_platf_AS_cbarg_t AS);
+void routing_AS_end(void);
+void routing_cluster_add_backbone(Link* bb);
+surf_As* routing_get_current();
/*** END of the parsing cruft ***/
XBT_PUBLIC(void) sg_platf_begin(void); // Start a new platform
XBT_PUBLIC(void) sg_platf_new_process(sg_platf_process_cbarg_t process);
+/* Prototypes of the functions offered by flex */
+XBT_PUBLIC(int) surf_parse_lex(void);
+XBT_PUBLIC(int) surf_parse_get_lineno(void);
+XBT_PUBLIC(FILE *) surf_parse_get_in(void);
+XBT_PUBLIC(FILE *) surf_parse_get_out(void);
+XBT_PUBLIC(yy_size_t) surf_parse_get_leng(void);
+XBT_PUBLIC(char *) surf_parse_get_text(void);
+XBT_PUBLIC(void) surf_parse_set_lineno(int line_number);
+XBT_PUBLIC(void) surf_parse_set_in(FILE * in_str);
+XBT_PUBLIC(void) surf_parse_set_out(FILE * out_str);
+XBT_PUBLIC(int) surf_parse_get_debug(void);
+XBT_PUBLIC(void) surf_parse_set_debug(int bdebug);
+XBT_PUBLIC(int) surf_parse_lex_destroy(void);
+
+
SG_END_DECL()
+namespace simgrid {
+namespace surf {
+
+extern XBT_PRIVATE simgrid::xbt::signal<void(sg_platf_link_cbarg_t)> on_link;
+extern XBT_PRIVATE simgrid::xbt::signal<void(sg_platf_cluster_cbarg_t)> on_cluster;
+extern XBT_PRIVATE simgrid::xbt::signal<void(void)> on_postparse;
+
+}
+}
+
#endif /* SG_PLATF_H */
-#line 3 "src/surf/simgrid_dtd.c"
+#line 3 "src/surf/xml/simgrid_dtd.c"
#define YY_INT_ALIGNED short int
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *surf_parse_text;
-/* Validating XML processor for src/surf/simgrid.dtd.
+/* Validating XML processor for src/surf/xml/simgrid.dtd.
*
* This program was generated with the FleXML XML processor generator.
* FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
if (!AX_surfxml_ASroute_src) FAIL("Required attribute `src' not set for `ASroute' element.");
LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_AS_3: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
- case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break;
+ case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+ case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break;
}
}
YY_BREAK
ETag_surfxml_ASroute();
popbuffer(); /* attribute */
switch (YY_START) {
- case S_surfxml_AS_3: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
- case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_6: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break;
+ case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+ case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_7: case S_surfxml_AS_8: SET(S_surfxml_AS_8); break;
}
}
YY_BREAK
-/* XML processor/application API for src/surf/simgrid.dtd.
+/* XML processor/application API for src/surf/xml/simgrid.dtd.
*
* This program was generated with the FleXML XML processor generator.
* FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
#include "xbt/log.h"
#include "xbt/str.h"
#include "xbt/dict.h"
-#include "simgrid/platf.h"
#include "src/surf/cpu_interface.hpp"
#include "src/surf/network_interface.hpp"
-#include <surf/surfxml_parse.h>
+#include "src/surf/xml/platf.hpp"
#ifdef HAVE_LUA
extern "C" {
#include "src/surf/surf_private.h"
#include "simgrid/sg_config.h"
-#include <surf/surfxml_parse.h>
+#include "src/surf/xml/platf_private.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_parse, surf,
"Logging specific to the SURF parsing module");
/* 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 "simgrid/platf.h"
#include "simgrid/simix.h"
#include "xbt/log.h"
{
XBT_INFO("Launching our nice bugged recursive function...");
unsigned i = 1;
- do {
+ while (i <= 0x80000000u) {
i *= 2;
unsigned res = collatz(i, i);
XBT_VERB("collatz(%u, %u) returned %u", i, i, res);
- } while (i <= 0x80000000u);
+ }
return 0;
}
{
SIMIX_global_init(&argc, argv);
- if (argc != 3) {
- printf("Usage: %s platform.xml deployment.xml\n", argv[0]);
- exit(EXIT_FAILURE);
- }
+ xbt_assert(argc == 3, "Usage: %s platform.xml deployment.xml\n", argv[0]);
SIMIX_function_register("master", master);
SIMIX_create_environment(argv[1]);
#include <stdio.h>
#include "simgrid/sg_config.h"
#include "surf/surf.h"
-#include "surf/surfxml_parse.h" // for reset callback
#include "src/surf/surf_interface.hpp"
#include "src/surf/cpu_interface.hpp"
#include <stdio.h>
#include "simgrid/sg_config.h"
#include "surf/surf.h"
-#include "surf/surfxml_parse.h" // for reset callback
#include "src/surf/surf_interface.hpp"
#include "src/surf/cpu_interface.hpp"
src/mc/mc_mmu.h
src/mc/PageStore.hpp
src/mc/mc_record.h
- src/include/simgrid/platf_interface.h
src/include/simgrid/sg_config.h
src/include/smpi/smpi_interface.h
src/include/surf/datatypes.h
src/surf/ns3/ns3_interface.h
src/surf/ns3/ns3_simulator.h
src/surf/ns3/red-queue.h
- src/surf/platform.hpp
src/surf/plugins/energy.hpp
- src/surf/simgrid.dtd
- src/surf/simgrid_dtd.c
+ src/surf/xml/simgrid.dtd
+ src/surf/xml/simgrid_dtd.h
+ src/surf/xml/simgrid_dtd.c
+ src/surf/xml/surfxml_sax_cb.cpp
src/surf/storage_interface.hpp
src/surf/storage_n11.hpp
src/surf/surf_interface.hpp
src/surf/surf_routing_none.hpp
src/surf/surf_routing_private.hpp
src/surf/surf_routing_vivaldi.hpp
- src/surf/surfxml_parse.cpp
src/surf/vm_hl13.hpp
src/surf/PropertyHolder.hpp
src/surf/virtual_machine.hpp
src/surf/surf_routing_RoutedGraph.cpp
src/surf/surf_routing_none.cpp
src/surf/surf_routing_vivaldi.cpp
- src/surf/surfxml_parse.cpp
- src/surf/surfxml_parseplatf.cpp
+ src/surf/xml/platf.hpp
+ src/surf/xml/platf_private.hpp
+ src/surf/xml/surfxml_sax_cb.cpp
+ src/surf/xml/surfxml_parseplatf.cpp
src/surf/trace_mgr.hpp
src/surf/trace_mgr.cpp
src/surf/vm_hl13.cpp
include/simgrid/datatypes.h
include/simgrid/modelchecker.h
include/simgrid/forward.h
- include/simgrid/platf.h
include/simgrid/simix.h
include/simgrid/simix.hpp
include/simgrid/host.h
include/smpi/mpi.h
include/smpi/smpi.h
include/smpi/smpi_main.h
- include/surf/simgrid_dtd.h
include/surf/surf_routing.h
- include/surf/surfxml_parse.h
include/xbt.h
include/xbt/RngStream.h
include/xbt/asserts.h
COMMAND ${RSYNC_CMD} doc/html/simgrid_modules2.png doc/html/simgrid_modules.png doc/webcruft/simgrid_logo_2011.png
doc/webcruft/simgrid_logo_2011_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/
- COMMAND ${RSYNC_CMD} src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/
+ COMMAND ${RSYNC_CMD} src/surf/xml/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/
WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
)
set(string15 "'s/FAIL(\"Premature EOF/if(!ETag_surfxml_include_state()) FAIL(\"Premature EOF/'")
ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid_dtd.h
+ OUTPUT ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h
${CMAKE_HOME_DIRECTORY}/include/xbt/graphxml.h
${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h
- ${CMAKE_HOME_DIRECTORY}/src/surf/simgrid_dtd.c
+ ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.c
${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.c
- DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/simgrid.dtd
+ DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.dtd
${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd
- #${CMAKE_HOME_DIRECTORY}/src/surf/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/surf/simgrid.dtd
- COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -S src/surf/simgrid_dtd.l -L src/surf/simgrid.dtd
- COMMAND ${SED_EXE} -i ${string14} src/surf/simgrid_dtd.l
- COMMAND ${CMAKE_COMMAND} -E echo "src/surf/simgrid_dtd.l"
+ #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf/xml
+ COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd
+ COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.l
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.l"
#${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.l: ${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.dtd
COMMAND ${FLEXML_EXE} -b 1000000 -P graphxml --sysid=graphxml.dtd -S src/xbt/graphxml.l -L src/xbt/graphxml.dtd
COMMAND ${SED_EXE} -i ${string14} src/xbt/graphxml.l
- COMMAND ${CMAKE_COMMAND} -E echo "src/xbt/graphxml.l"
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/xbt/graphxml.l"
#${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd
COMMAND ${FLEXML_EXE} -b 1000000 --root-tags adag -P dax_ --sysid=dax.dtd -S src/simdag/dax_dtd.l -L src/simdag/dax.dtd
COMMAND ${SED_EXE} -i ${string5} src/simdag/dax_dtd.l
COMMAND ${SED_EXE} -i ${string14} src/simdag/dax_dtd.l
- COMMAND ${CMAKE_COMMAND} -E echo "src/simdag/dax_dtd.l"
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/simdag/dax_dtd.l"
- #${CMAKE_HOME_DIRECTORY}/include/surf/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/surf/simgrid.dtd
+ #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid.h
- COMMAND ${FLEXML_EXE} --root-tags platform -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -H include/surf/simgrid_dtd.h -L src/surf/simgrid.dtd
- COMMAND ${SED_EXE} -i ${string1} include/surf/simgrid_dtd.h
- COMMAND ${SED_EXE} -i ${string2} include/surf/simgrid_dtd.h
- COMMAND ${SED_EXE} -i ${string14} include/surf/simgrid_dtd.h
- COMMAND ${CMAKE_COMMAND} -E echo "include/surf/simgrid_dtd.h"
+ COMMAND ${FLEXML_EXE} --root-tags platform -P surfxml --sysid=http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd -H src/surf/xml/simgrid_dtd.h -L src/surf/xml/simgrid.dtd
+ COMMAND ${SED_EXE} -i ${string1} src/surf/xml/simgrid_dtd.h
+ COMMAND ${SED_EXE} -i ${string2} src/surf/xml/simgrid_dtd.h
+ COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.h
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.h"
#${CMAKE_HOME_DIRECTORY}/include/xbt/graphxml.h: ${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.dtd
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/include/xbt/graphxml.h
COMMAND ${SED_EXE} -i ${string1} include/xbt/graphxml.h
COMMAND ${SED_EXE} -i ${string2} include/xbt/graphxml.h
COMMAND ${SED_EXE} -i ${string14} include/xbt/graphxml.h
- COMMAND ${CMAKE_COMMAND} -E echo "include/xbt/graphxml.h"
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated include/xbt/graphxml.h"
#${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/simdag/dax.dtd
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h
COMMAND ${SED_EXE} -i ${string1} src/simdag/dax_dtd.h
COMMAND ${SED_EXE} -i ${string2} src/simdag/dax_dtd.h
COMMAND ${SED_EXE} -i ${string14} src/simdag/dax_dtd.h
- COMMAND ${CMAKE_COMMAND} -E echo "src/simdag/dax_dtd.h"
-
- #surf/simgrid_dtd.c: surf/simgrid_dtd.l
- COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/surf/simgrid_dtd.c
- COMMAND ${SED_EXE} -i ${string8} src/surf/simgrid_dtd.l
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf
- COMMAND ${FLEX_EXE} -o src/surf/simgrid_dtd.c -Psurf_parse_ --noline src/surf/simgrid_dtd.l
- COMMAND ${SED_EXE} -i ${string9} src/surf/simgrid_dtd.c
- COMMAND ${SED_EXE} -i ${string15} src/surf/simgrid_dtd.c
- COMMAND ${SED_EXE} -i 's/int yyl\;/unsigned int yyl\;/' src/surf/simgrid_dtd.c
- COMMAND ${SED_EXE} -i "s/register //" src/surf/simgrid_dtd.c
- COMMAND ${CMAKE_COMMAND} -E echo "surf/simgrid_dtd.c"
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/simdag/dax_dtd.h"
+
+ #surf/xml/simgrid_dtd.c: surf/xml/simgrid_dtd.l
+ COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
+ COMMAND ${SED_EXE} -i ${string8} src/surf/xml/simgrid_dtd.l
+ COMMAND ${FLEX_EXE} -o src/surf/xml/simgrid_dtd.c -Psurf_parse_ --noline src/surf/xml/simgrid_dtd.l
+ COMMAND ${SED_EXE} -i ${string9} src/surf/xml/simgrid_dtd.c
+ COMMAND ${SED_EXE} -i ${string15} src/surf/xml/simgrid_dtd.c
+ COMMAND ${SED_EXE} -i 's/int yyl\;/unsigned int yyl\;/' src/surf/xml/simgrid_dtd.c
+ COMMAND ${SED_EXE} -i "s/register //" src/surf/xml/simgrid_dtd.c
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated surf/xml/simgrid_dtd.c"
#xbt/graphxml.c: xbt/graphxml.l
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.c
COMMAND ${SED_EXE} -i ${string9} src/xbt/graphxml.c
COMMAND ${SED_EXE} -i 's/int yyl\;/unsigned int yyl\;/' src/xbt/graphxml.c
COMMAND ${SED_EXE} -i "s/register //" src/xbt/graphxml.c
- COMMAND ${CMAKE_COMMAND} -E echo "xbt/graphxml.c"
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated xbt/graphxml.c"
#simdag/dax_dtd.c: simdag/dax_dtd.l
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.c
COMMAND ${FLEX_EXE} -o src/simdag/dax_dtd.c -Pdax_ --noline src/simdag/dax_dtd.l
COMMAND ${SED_EXE} -i ${string9} src/simdag/dax_dtd.c
COMMAND ${SED_EXE} -i 's/int yyl\;/unsigned int yyl\;/' src/simdag/dax_dtd.c
- COMMAND ${CMAKE_COMMAND} -E echo "src/simdag/dax_dtd.c"
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/simdag/dax_dtd.c"
WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}
COMMENT "Generating files in maintainer mode..."
endif()
add_custom_target(maintainer_files
- DEPENDS ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid_dtd.h
- ${CMAKE_HOME_DIRECTORY}/include/xbt/graphxml.h
- ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h
- ${CMAKE_HOME_DIRECTORY}/src/surf/simgrid_dtd.c
- ${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.c
- ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.c
+ DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h
+ ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
+ ${CMAKE_HOME_DIRECTORY}/include/xbt/graphxml.h
+ ${CMAKE_HOME_DIRECTORY}/src/xbt/graphxml.c
+ ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.h
+ ${CMAKE_HOME_DIRECTORY}/src/simdag/dax_dtd.c
)