-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Planner comparison and update #1061
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1229af0
scheduled_point_rb_node_t: add ==, != operators
milroy ba74958
mt_resource_rb_node_t: add ==, != operators
milroy e194dd5
planner: add == and != operators for scheduled_point_t
milroy 8b93e51
planner: replace scheduled_points_equal with ==
milroy ac39401
planner: add span_t == op
milroy 7edf250
planner: add != operator
milroy ab9e97a
planner_multi: add != operator
milroy 84a5ad4
planner_multi: use boost multi_index, update c interface
milroy ccf5abc
planner: add update functionality
milroy f9e78b3
planner_multi: substitute map to track request counts
milroy bcceb1f
planner_multi: add update functionality
milroy a475d5e
testsuite: add unit tests for planner update
milroy 7ca4649
testsuite: add unit tests for planner_multi update
milroy 0638380
testsuite: enable valgrind tests and test planner and schema
milroy e0b1912
testsuite: fix memory leaks in planner tests
milroy 9bad4b3
testsuite: fix variable declaration for planner_multi unit tests
milroy 6f16387
testsuite: fix variable declarations for planner unit tests
milroy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Look for Valgrind headers and binary. | ||
# | ||
# Variables defined by this module: | ||
# Valgrind_FOUND System has valgrind | ||
# Valgrind_INCLUDE_DIR where to find valgrind/memcheck.h, etc. | ||
# Valgrind_EXECUTABLE the valgrind executable. | ||
# This module appends to config.h so t5000-valgrind.t succeeds. | ||
# We may need to change this behavior once remaining autotools | ||
# files are removed. | ||
|
||
find_path(Valgrind_INCLUDE_DIR valgrind HINTS ${Valgrind_INCLUDE_PATH}) | ||
find_program(Valgrind_EXECUTABLE NAMES valgrind PATH ${Valgrind_BINARY_PATH}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Valgrind DEFAULT_MSG Valgrind_INCLUDE_DIR Valgrind_EXECUTABLE) | ||
|
||
if(Valgrind_FOUND) | ||
file(APPEND config.h "#define HAVE_VALGRIND 1\n") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/*****************************************************************************\ | ||
* Copyright 2024 Lawrence Livermore National Security, LLC | ||
* (c.f. AUTHORS, NOTICE.LLNS, LICENSE) | ||
* | ||
* This file is part of the Flux resource manager framework. | ||
* For details, see https://github.com/flux-framework. | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0 | ||
\*****************************************************************************/ | ||
|
||
extern "C" { | ||
#if HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
} | ||
|
||
#include "planner_internal_tree.hpp" | ||
|
||
bool scheduled_point_t::operator== (const scheduled_point_t &o) const | ||
{ | ||
if (point_rb != o.point_rb) | ||
return false; | ||
if (resource_rb != o.resource_rb) | ||
return false; | ||
if (at != o.at) | ||
return false; | ||
if (in_mt_resource_tree != o.in_mt_resource_tree) | ||
return false; | ||
if (new_point != o.new_point) | ||
return false; | ||
if (ref_count != o.ref_count) | ||
return false; | ||
if (remaining != o.remaining) | ||
return false; | ||
if (scheduled != o.scheduled) | ||
return false; | ||
|
||
return true; | ||
} | ||
|
||
bool scheduled_point_t::operator!= (const scheduled_point_t &o) const | ||
{ | ||
return !operator == (o); | ||
} | ||
|
||
|
||
/* | ||
* vi: ts=4 sw=4 expandtab | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is m_total_resources guaranteed to be smaller than resource_total?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The case where
resource_total
>m_total_resources
is when the graph is being grown, andresource_total
<m_total_resources
means the graph is being shrunk. There aren't any guarantees on the value ofresource_total
except that it's nonnegative.@jameshcorbett asked a form of this question, too, and my reasoning has been that negative values for
point->remaining
(e.g., when(point->remaining + delta) < 0
) shouldn't cause problems because they should only happen for reservations (which will be cleared at the next schedule loop). I was thinking that adding a check for negative remaining wasn't worth the performance penalty.That said, I don't expect
update_total
to be called often, and adding a guard check may prevent complicated problems with removing spans if that process isn't carefully performed upstream (i.e., inplanner_c_interface
).