Skip to content

Commit

Permalink
[scheduling] [sim] Address code review comments.
Browse files Browse the repository at this point in the history
Issue: #15
Change-Id: Iab17f81d609ca9e367e08bb8ec92ad55b529390b
  • Loading branch information
ms705 committed Jun 1, 2015
1 parent fd32290 commit 8cd39f4
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/scheduling/Makefile
Expand Up @@ -7,7 +7,7 @@ LIBS += -lboost_system

LIB = libfirmament_scheduling.a
OBJS = event_driven_scheduler.o common.o \
knowledge_base.o knowledge_base_simulator.o
knowledge_base.o

PBS = scheduling_delta.pb.o
TESTS =
Expand Down
24 changes: 12 additions & 12 deletions src/scheduling/flow/Makefile
Expand Up @@ -9,25 +9,25 @@ LIB = libfirmament_scheduling_flow.a

OBJS = coco_cost_model.o dimacs_add_node.o dimacs_change_arc.o \
dimacs_change_stats.o dimacs_exporter.o dimacs_new_arc.o \
dimacs_remove_node.o flow_graph.o flow_graph_arc.o \
flow_graph_node.o flow_scheduler.o octopus_cost_model.o \
dimacs_remove_node.o flow_graph.o flow_graph_arc.o \
flow_graph_node.o flow_scheduler.o octopus_cost_model.o \
quincy_cost_model.o simulated_quincy_cost_model.o \
sjf_cost_model.o solver_dispatcher.o trivial_cost_model.o \
random_cost_model.o void_cost_model.o wharemap_cost_model.o
sjf_cost_model.o solver_dispatcher.o trivial_cost_model.o \
random_cost_model.o void_cost_model.o wharemap_cost_model.o
PBS = scheduling_parameters.pb.o
TESTS = dimacs_exporter_test flow_graph_test
TESTS_DEPS = $(BUILD_DIR)/base/libfirmament_base.a
TESTS_dimacs_exporter_DEPS = $(BUILD_DIR)/scheduling/common.o \
$(BUILD_DIR)/scheduling/knowledge_base.o \
$(BUILD_DIR)/misc/libfirmament_misc.a \
$(BUILD_DIR)/base/libfirmament_base.a \
$(BUILD_DIR)/scheduling/flow/libfirmament_scheduling_flow.a
$(BUILD_DIR)/scheduling/knowledge_base.o \
$(BUILD_DIR)/misc/libfirmament_misc.a \
$(BUILD_DIR)/base/libfirmament_base.a \
$(BUILD_DIR)/scheduling/flow/libfirmament_scheduling_flow.a

TESTS_flow_graph_DEPS = $(BUILD_DIR)/scheduling/common.o \
$(BUILD_DIR)/scheduling/knowledge_base.o \
$(BUILD_DIR)/misc/libfirmament_misc.a \
$(BUILD_DIR)/base/libfirmament_base.a \
$(BUILD_DIR)/scheduling/flow/libfirmament_scheduling_flow.a
$(BUILD_DIR)/scheduling/knowledge_base.o \
$(BUILD_DIR)/misc/libfirmament_misc.a \
$(BUILD_DIR)/base/libfirmament_base.a \
$(BUILD_DIR)/scheduling/flow/libfirmament_scheduling_flow.a

OBJ_LIB = $(addprefix $(OBJ_DIR)/, $(LIB))

Expand Down
6 changes: 3 additions & 3 deletions src/scheduling/flow/cost_models.h
Expand Up @@ -3,8 +3,8 @@
//
// Handy convenience header that includes all known cost models.

#ifndef FIRMAMENT_SCHEDULING_COST_MODELS_H
#define FIRMAMENT_SCHEDULING_COST_MODELS_H
#ifndef FIRMAMENT_SCHEDULING_FLOW_COST_MODELS_H
#define FIRMAMENT_SCHEDULING_FLOW_COST_MODELS_H

// Cost model interface
#include "scheduling/flow/cost_model_interface.h"
Expand All @@ -19,4 +19,4 @@
#include "scheduling/flow/void_cost_model.h"
#include "scheduling/flow/wharemap_cost_model.h"

#endif
#endif // FIRMAMENT_SCHEDULING_FLOW_COST_MODELS_H
2 changes: 1 addition & 1 deletion src/scheduling/flow/flow_graph_node.h
Expand Up @@ -24,7 +24,7 @@ enum FlowNodeType {
UNSCHEDULED_TASK = 2,
GLOBAL_AGGREGATOR = 3,
JOB_AGGREGATOR = 4,
RACK = 5,
RACK_AGGREGATOR = 5, // currently unused
MACHINE = 6,
PU = 7,
SINK = 8,
Expand Down
1 change: 0 additions & 1 deletion src/scheduling/flow/wharemap_cost_model.h
Expand Up @@ -6,7 +6,6 @@
#ifndef FIRMAMENT_SCHEDULING_WHAREMAP_COST_MODEL_H
#define FIRMAMENT_SCHEDULING_WHAREMAP_COST_MODEL_H


#include <map>
#include <set>
#include <string>
Expand Down
3 changes: 2 additions & 1 deletion src/sim/Makefile
Expand Up @@ -6,7 +6,8 @@ include $(ROOT_DIR)/include/Makefile.config
BINS =
LIB = libfirmament_sim.a
OBJS = event_queue.o google_runtime_distribution.o \
simple_dtg_generator.o simulation_driver.o
simple_dtg_generator.o simulation_driver.o \
knowledge_base_simulator.o
PBS = simulation_event.pb.o
TESTS =
TESTS_DEPS =
Expand Down
Expand Up @@ -5,7 +5,7 @@

#include "base/common.h"
#include "misc/map-util.h"
#include "scheduling/knowledge_base_simulator.h"
#include "sim/knowledge_base_simulator.h"

namespace firmament {

Expand Down
@@ -1,8 +1,8 @@
// The Firmament project
// Copyright (c) 2015 Ionel Gog <ionel.gog@cl.cam.ac.uk>

#ifndef FIRMAMENT_SCHEDULING_KNOWLEDGE_BASE_SIMULATOR_H
#define FIRMAMENT_SCHEDULING_KNOWLEDGE_BASE_SIMULATOR_H
#ifndef FIRMAMENT_SIM_KNOWLEDGE_BASE_SIMULATOR_H
#define FIRMAMENT_SIM_KNOWLEDGE_BASE_SIMULATOR_H

#include "scheduling/knowledge_base.h"

Expand Down Expand Up @@ -56,4 +56,4 @@ class KnowledgeBaseSimulator : public KnowledgeBase {

} // namespace firmament

#endif // FIRMAMENT_SCHEDULING_KNOWLEDGE_BASE_SIMULATOR_H
#endif // FIRMAMENT_SIM_KNOWLEDGE_BASE_SIMULATOR_H
4 changes: 2 additions & 2 deletions src/sim/trace-extract/Makefile
Expand Up @@ -42,7 +42,7 @@ $(OBJ_DIR)/google_trace_simulator: $(addprefix $(OBJ_DIR)/, $(SIMULATOR_OBJS)) \
$(OPTFLAGS) $(DEFINES) \
$(BUILD_DIR)/sim/trace-extract/google_trace_simulator.o \
$(BUILD_DIR)/sim/trace-extract/event_desc.pb.o \
$(BUILD_DIR)/scheduling/knowledge_base_simulator.o \
$(BUILD_DIR)/sim/knowledge_base_simulator.o \
$(BUILD_DIR)/scheduling/common.o \
$(BUILD_DIR)/scheduling/flow/libfirmament_scheduling_flow.a \
$(BUILD_DIR)/scheduling/libfirmament_scheduling.a \
Expand Down Expand Up @@ -85,7 +85,7 @@ $(OBJ_DIR)/google_trace_simulator_test: $(addprefix $(OBJ_DIR)/, google_trace_si
$(GTEST_LIB) $(OPTFLAGS) $(DEFINES) \
$(BUILD_DIR)/sim/trace-extract/google_trace_simulator.o \
$(BUILD_DIR)/sim/trace-extract/event_desc.pb.o \
$(BUILD_DIR)/scheduling/knowledge_base_simulator.o \
$(BUILD_DIR)/sim/knowledge_base_simulator.o \
$(BUILD_DIR)/scheduling/common.o \
$(BUILD_DIR)/scheduling/flow/libfirmament_scheduling_flow.a \
$(BUILD_DIR)/scheduling/libfirmament_scheduling.a \
Expand Down
2 changes: 1 addition & 1 deletion src/sim/trace-extract/google_trace_simulator.h
Expand Up @@ -16,11 +16,11 @@
#include "base/resource_topology_node_desc.pb.h"
#include "misc/utils.h"
#include "misc/map-util.h"
#include "scheduling/knowledge_base_simulator.h"
#include "scheduling/flow/cost_models.h"
#include "scheduling/flow/dimacs_change_stats.h"
#include "scheduling/flow/flow_graph.h"
#include "scheduling/flow/solver_dispatcher.h"
#include "sim/knowledge_base_simulator.h"
#include "sim/trace-extract/event_desc.pb.h"

DECLARE_string(flow_scheduling_solver);
Expand Down

0 comments on commit 8cd39f4

Please sign in to comment.