camsas / firmament

The Firmament cluster scheduling platform
Apache License 2.0
415 stars 79 forks source link

Circular dependency between scheduler unit tests and cost models #15

Closed ms705 closed 9 years ago

ms705 commented 9 years ago

We still have a circular dependency in the build system, unfortunately: the cost_models target depends on scheduling, but scheduling contains some unit tests that require libfirmament_cost_models.a.

To reproduce, do a make clean and build:

[...]
  TESTLNK /home/malte/Projects/firmament/build/tests/scheduling/dimacs_exporter_test
  TESTLNK /home/malte/Projects/firmament/build/tests/scheduling/flow_graph_test
clang: error: no such file or directory: '/home/malte/Projects/firmament/build/scheduling/cost_models/libfirmament_cost_models.a'
clang: error: no such file or directory: '/home/malte/Projects/firmament/build/scheduling/cost_models/libfirmament_cost_models.a'
[...]

Possible solutions:

ms705 commented 9 years ago

Having looked at this a bit more, I think the dependency issue is as follows:

scheduling builds the flow graph components, which the cost model interface depends on (via FlowGraphNode and similar types), but the scheduling unit tests (DIMACSExporterTest and FlowGraphTest) in turn depend on the trivial cost model.

The right answer to me seems to be to break out the flow graph stuff into its own module (and possibly the flow scheduler more generally), merge this module with the cost models and move the offending tests in there (since they're both related to the flow scheduler).

Thoughts? This is obviously a fairly invasive change to the tree, so we may want to background it until outstanding merges have happened.

ms705 commented 9 years ago

(This is on hold until #17 is merged, as it will otherwise trigger lots of tree conflicts.)

ms705 commented 9 years ago

This is fixed in #22. Sent to @ICGog for review: https://review.gerrithub.io/#/c/234885/.

ms705 commented 9 years ago

Resolved in #22 (merged).