From 30aca4d4af004d1ec899d12f0a9fe3997e9be15e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 17 Dec 2016 17:37:42 +0100 Subject: [PATCH] remove surf_routing.hpp --- src/kernel/routing/ClusterZone.cpp | 1 + src/kernel/routing/DijkstraZone.cpp | 3 ++- src/kernel/routing/FloydZone.cpp | 4 +++- src/kernel/routing/NetCard.cpp | 2 +- src/kernel/routing/RoutedZone.cpp | 4 ++-- src/kernel/routing/RoutedZone.hpp | 5 +++++ src/s4u/s4u_engine.cpp | 1 - src/s4u/s4u_netzone.cpp | 1 - src/simgrid/host.cpp | 1 - src/surf/network_ib.cpp | 8 ++++---- src/surf/network_ib.hpp | 5 +++-- src/surf/network_interface.hpp | 1 - src/surf/ptask_L07.cpp | 1 - src/surf/storage_interface.cpp | 6 +++++- src/surf/surf_routing.cpp | 6 ------ src/surf/surf_routing.hpp | 23 ----------------------- src/surf/xml/surfxml_parseplatf.cpp | 2 +- teshsuite/simdag/is-router/is-router.cpp | 2 +- tools/cmake/DefinePackages.cmake | 1 - 19 files changed, 28 insertions(+), 49 deletions(-) delete mode 100644 src/surf/surf_routing.hpp diff --git a/src/kernel/routing/ClusterZone.cpp b/src/kernel/routing/ClusterZone.cpp index 9a0335b27f..f4715b7b59 100644 --- a/src/kernel/routing/ClusterZone.cpp +++ b/src/kernel/routing/ClusterZone.cpp @@ -5,6 +5,7 @@ #include "src/kernel/routing/ClusterZone.hpp" #include "src/kernel/routing/NetCard.hpp" +#include "src/kernel/routing/RoutedZone.hpp" #include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf"); diff --git a/src/kernel/routing/DijkstraZone.cpp b/src/kernel/routing/DijkstraZone.cpp index eb8c653011..db3525bdc8 100644 --- a/src/kernel/routing/DijkstraZone.cpp +++ b/src/kernel/routing/DijkstraZone.cpp @@ -5,9 +5,10 @@ #include "src/kernel/routing/DijkstraZone.hpp" #include "src/kernel/routing/NetCard.hpp" - #include "src/surf/network_interface.hpp" +#include + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic"); /* Free functions */ diff --git a/src/kernel/routing/FloydZone.cpp b/src/kernel/routing/FloydZone.cpp index 378119e3df..21780d27f6 100644 --- a/src/kernel/routing/FloydZone.cpp +++ b/src/kernel/routing/FloydZone.cpp @@ -3,13 +3,15 @@ /* 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 #include "src/kernel/routing/FloydZone.hpp" #include "src/kernel/routing/NetCard.hpp" #include "src/surf/network_interface.hpp" #include "xbt/log.h" +#include +#include + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf"); #define TO_FLOYD_COST(i, j) (costTable_)[(i) + (j)*table_size] diff --git a/src/kernel/routing/NetCard.cpp b/src/kernel/routing/NetCard.cpp index 42c1e0524e..3b9652b471 100644 --- a/src/kernel/routing/NetCard.cpp +++ b/src/kernel/routing/NetCard.cpp @@ -5,7 +5,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/kernel/routing/NetCard.hpp" -#include "src/surf/surf_routing.hpp" +#include "surf/surf_routing.h" #include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf"); diff --git a/src/kernel/routing/RoutedZone.cpp b/src/kernel/routing/RoutedZone.cpp index e6019f1c20..eab11d972e 100644 --- a/src/kernel/routing/RoutedZone.cpp +++ b/src/kernel/routing/RoutedZone.cpp @@ -23,8 +23,8 @@ void routing_route_free(sg_platf_route_cbarg_t route) } } -/* ************************************************************************** */ -/* *********************** GENERIC BUSINESS METHODS ************************* */ +/* ***************************************************************** */ +/* *********************** GENERIC METHODS ************************* */ static const char* instr_node_name(xbt_node_t node) { diff --git a/src/kernel/routing/RoutedZone.hpp b/src/kernel/routing/RoutedZone.hpp index 8db82e1f02..918856ff89 100644 --- a/src/kernel/routing/RoutedZone.hpp +++ b/src/kernel/routing/RoutedZone.hpp @@ -28,4 +28,9 @@ protected: } } // namespace +SG_BEGIN_DECL() +XBT_PRIVATE xbt_node_t new_xbt_graph_node(xbt_graph_t graph, const char* name, xbt_dict_t nodes); +XBT_PRIVATE xbt_edge_t new_xbt_graph_edge(xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges); +SG_END_DECL() + #endif /* SIMGRID_ROUTING_GENERIC_HPP_ */ diff --git a/src/s4u/s4u_engine.cpp b/src/s4u/s4u_engine.cpp index 682932fa0b..0f8798d95e 100644 --- a/src/s4u/s4u_engine.cpp +++ b/src/s4u/s4u_engine.cpp @@ -17,7 +17,6 @@ #include "src/kernel/routing/NetZoneImpl.hpp" #include "src/surf/network_interface.hpp" -#include "src/surf/surf_routing.hpp" // routing_platf. FIXME:KILLME. SOON #include "surf/surf.h" // routing_platf. FIXME:KILLME. SOON XBT_LOG_NEW_CATEGORY(s4u,"Log channels of the S4U (Simgrid for you) interface"); diff --git a/src/s4u/s4u_netzone.cpp b/src/s4u/s4u_netzone.cpp index 9567d59676..3d9e085a6f 100644 --- a/src/s4u/s4u_netzone.cpp +++ b/src/s4u/s4u_netzone.cpp @@ -10,7 +10,6 @@ #include "simgrid/simix.hpp" #include "src/kernel/routing/NetCard.hpp" #include "src/surf/network_interface.hpp" // Link FIXME: move to proper header -#include "src/surf/surf_routing.hpp" XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_netzone, "S4U Networking Zones"); diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 0da2044a6f..e655063fde 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -101,7 +101,6 @@ xbt_dynar_t sg_hosts_as_dynar() // ========= Layering madness ==============* #include "src/surf/cpu_interface.hpp" -#include "src/surf/surf_routing.hpp" // ========== User data Layer ========== void *sg_host_user(sg_host_t host) { diff --git a/src/surf/network_ib.cpp b/src/surf/network_ib.cpp index 30d8f4ab3c..d00e88cda4 100644 --- a/src/surf/network_ib.cpp +++ b/src/surf/network_ib.cpp @@ -6,11 +6,11 @@ #include -#include "network_ib.hpp" - -#include "src/surf/HostImpl.hpp" #include "simgrid/sg_config.h" -#include "maxmin_private.hpp" +#include "src/surf/HostImpl.hpp" +#include "src/surf/maxmin_private.hpp" +#include "src/surf/network_ib.hpp" +#include "src/surf/xml/platf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network); diff --git a/src/surf/network_ib.hpp b/src/surf/network_ib.hpp index 8d1103e6c0..ac9b8a8da5 100644 --- a/src/surf/network_ib.hpp +++ b/src/surf/network_ib.hpp @@ -7,9 +7,10 @@ #ifndef SURF_NETWORK_IB_HPP_ #define SURF_NETWORK_IB_HPP_ -#include +#include "src/surf/network_smpi.hpp" +#include "xbt/base.h" -#include "network_smpi.hpp" +#include namespace simgrid { namespace surf { diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index c5522a8dcc..a16404c7eb 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -14,7 +14,6 @@ #include "xbt/fifo.h" #include "xbt/dict.h" #include "surf_interface.hpp" -#include "surf_routing.hpp" #include "src/surf/PropertyHolder.hpp" #include "simgrid/link.h" diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index ebbd2cfa78..f2ae71e1f6 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -12,7 +12,6 @@ #include "ptask_L07.hpp" #include "cpu_interface.hpp" -#include "surf_routing.hpp" #include "xbt/lib.h" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host); diff --git a/src/surf/storage_interface.cpp b/src/surf/storage_interface.cpp index ff31c4ca92..dbbb601a02 100644 --- a/src/surf/storage_interface.cpp +++ b/src/surf/storage_interface.cpp @@ -11,8 +11,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf, "Logging specific to the SURF storage module"); xbt_lib_t file_lib; +int MSG_FILE_LEVEL = -1; // Msg file level + xbt_lib_t storage_lib; -int ROUTING_STORAGE_LEVEL = -1; //Routing for storagelevel +int SIMIX_STORAGE_LEVEL = -1; // Simix storage level +int MSG_STORAGE_LEVEL = -1; // Msg storage level +int ROUTING_STORAGE_LEVEL = -1; // Routing for storage level int ROUTING_STORAGE_HOST_LEVEL = -1; int SURF_STORAGE_LEVEL = -1; xbt_lib_t storage_type_lib; diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index b5f8acb5ff..6cb01aa8d1 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -3,13 +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 "src/surf/surf_routing.hpp" #include "simgrid/msg.h" -int MSG_FILE_LEVEL = -1; //Msg file level - -int SIMIX_STORAGE_LEVEL = -1; //Simix storage level -int MSG_STORAGE_LEVEL = -1; //Msg storage level - xbt_lib_t as_router_lib; int ROUTING_ASR_LEVEL = -1; //Routing level diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp deleted file mode 100644 index 64b1b709ce..0000000000 --- a/src/surf/surf_routing.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2013-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 NETWORK_ROUTING_HPP_ -#define NETWORK_ROUTING_HPP_ - -#include -#include - -#include "src/kernel/routing/NetZoneImpl.hpp" -#include "surf_interface.hpp" - -#include -#include - -SG_BEGIN_DECL() -XBT_PRIVATE xbt_node_t new_xbt_graph_node (xbt_graph_t graph, const char *name, xbt_dict_t nodes); -XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges); -SG_END_DECL() - -#endif /* NETWORK_ROUTING_HPP_ */ diff --git a/src/surf/xml/surfxml_parseplatf.cpp b/src/surf/xml/surfxml_parseplatf.cpp index 2194009bd3..9527602256 100644 --- a/src/surf/xml/surfxml_parseplatf.cpp +++ b/src/surf/xml/surfxml_parseplatf.cpp @@ -12,7 +12,7 @@ #include "src/surf/network_interface.hpp" #include "src/instr/instr_private.h" // TRACE_start(). FIXME: remove by subscribing tracing to the surf signals -#include "src/surf/xml/platf.hpp" +#include "src/surf/xml/platf_private.hpp" #if HAVE_LUA extern "C" { diff --git a/teshsuite/simdag/is-router/is-router.cpp b/teshsuite/simdag/is-router/is-router.cpp index 012e683474..77d1bdcc1e 100644 --- a/teshsuite/simdag/is-router/is-router.cpp +++ b/teshsuite/simdag/is-router/is-router.cpp @@ -6,7 +6,7 @@ #include "simgrid/s4u/host.hpp" #include "simgrid/simdag.h" #include "src/kernel/routing/NetCard.hpp" -#include "src/surf/surf_routing.hpp" +#include "surf/surf_routing.h" #include int main(int argc, char **argv) diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 1a1d89d5b8..871545281f 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -67,7 +67,6 @@ set(EXTRA_DIST src/surf/storage_n11.hpp src/surf/surf_interface.hpp src/surf/surf_private.h - src/surf/surf_routing.hpp src/surf/PropertyHolder.hpp src/surf/host_clm03.hpp src/surf/HostImpl.hpp -- 2.20.1