Skip to content
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

Rebase rq2 and add multi match + find #4

Open
wants to merge 74 commits into
base: rq-api-client
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
fede2cf
testsuite: fix coverage method for queue exception
garlick Sep 30, 2022
409de4e
Merge pull request #978 from garlick/queue_test_fix
mergify[bot] Sep 30, 2022
ecd5373
config: update types and define production max duration
milroy Oct 1, 2022
350ae8b
store: add resource graph duration and setter to metadata
milroy Sep 10, 2022
88a98a2
resource_match: compute duration and set graph duration
milroy Sep 15, 2022
5550e16
traverser: add checks for duration and handle invalid values
milroy Sep 16, 2022
e828b14
testsuite: check for duration inheritance
jameshcorbett Sep 29, 2022
23ad79e
testsuite: checks for invalid jobspec duration
jameshcorbett Sep 30, 2022
28706af
testsuite: add checks for job durations
jameshcorbett Sep 30, 2022
69f99fb
Merge pull request #969 from milroy/graph-duration
trws Oct 2, 2022
adfc5a4
qmanager: support RFC33 TOML queue config
jameshcorbett Oct 4, 2022
bcaa7d6
Merge pull request #980 from jameshcorbett/rfc-33-queue-config
mergify[bot] Oct 4, 2022
ed9942d
NEWS: add release notes for 0.25.0
garlick Oct 4, 2022
52ec95a
Merge pull request #981 from garlick/rel25
mergify[bot] Oct 5, 2022
72e4643
reapi: Rename resource/hlapi to resource/reapi
tpatki Oct 4, 2022
8caa0c6
Merge pull request #983 from tpatki/rename_hlapi_to_reapi
mergify[bot] Oct 7, 2022
0d01542
doc: fix invalid yaml in resource utilities README
vsoch Oct 4, 2022
01ba6d7
Merge pull request #982 from flux-framework/fix/invalid-resource-yaml
grondo Oct 20, 2022
62b053c
testsuite: update flux-tree-helper.py for new OutputFormat
grondo Oct 22, 2022
b084b9b
Merge pull request #985 from grondo/outputfmt-update
mergify[bot] Oct 25, 2022
883f941
github: change ubuntu version for python ci
chu11 Dec 8, 2022
dd3a26d
Merge pull request #993 from chu11/python_lint
mergify[bot] Dec 8, 2022
d29c093
testsuite: start/stop all queues with --all option
chu11 Dec 8, 2022
93ebe75
Merge pull request #992 from chu11/flux_core_pr4776
mergify[bot] Dec 21, 2022
38c6d1c
testsuite: do not assume queues started by default
chu11 Jan 10, 2023
ecf20b3
Merge pull request #996 from chu11/flux_core_pr4857
mergify[bot] Jan 11, 2023
d43ab1b
modules: report Fluxion version on module load
grondo Jan 26, 2023
b7a6d35
Merge pull request #998 from grondo/report-version
mergify[bot] Jan 26, 2023
c38e0ed
testsuite: drop recovery-none test
garlick Jan 28, 2023
c93fa44
testsuite: drop unnecessary cleanup
garlick Jan 28, 2023
5d00092
testsuite: cover rv1_nosched reload
garlick Jan 28, 2023
0f46a1d
Merge pull request #1000 from garlick/issue#991
mergify[bot] Jan 28, 2023
e917934
schema: add Flux::resource_model::resource_t base class
grondo Jan 26, 2023
78473cc
libjobspec: move parse_error definition to its own header
grondo Jan 24, 2023
25702b1
libjobspec: add RFC 31 constraint class
grondo Jan 24, 2023
ff7fc5d
libjobspec/test: add unit tests for class Constraint
grondo Jan 24, 2023
b6e25de
traverser: update property matching to use Constraint class
grondo Jan 24, 2023
b6407f4
jobspec: add hostlist constraint implementation
grondo Jan 26, 2023
fb6308c
jobspec/tests: test hostlist constraints
grondo Jan 26, 2023
f2df720
jobspec: support job constraints by rank
grondo Jan 26, 2023
c5cda3d
jobspec/tests: test ranks constraints
grondo Jan 26, 2023
c36ba70
utilities/test: fix resource-query benchmark yaml
grondo Jan 26, 2023
5838d7c
testsuite: add complex rfc 31 constraint yaml for testing
grondo Jan 27, 2023
f261261
testsuite: expand constraint testing for RFC 31 constraints
grondo Jan 31, 2023
e510ff1
Merge pull request #997 from grondo/rfc31-constraints
mergify[bot] Feb 3, 2023
26620b0
resource: improve errors fro jobpsec parsing
grondo Feb 6, 2023
8aedeaa
testsuite: remove jobspec validator plugin in constraint tests
grondo Feb 6, 2023
3b33a36
Merge pull request #1003 from grondo/issue#1002
mergify[bot] Feb 7, 2023
5c78595
libjobspec/constraints: preserve errno in hostlist match()
grondo Feb 7, 2023
eb58736
libjobspec/test: ensure errno is preserved by match()
grondo Feb 7, 2023
5648d03
testsuite: enhance tests for unsatisfiable constrainted jobs
grondo Feb 7, 2023
b92989a
Merge pull request #1005 from grondo/issue#1004
mergify[bot] Feb 7, 2023
d9dd4b5
NEWS.md: add release notes for flux-sched v0.26.0
grondo Feb 7, 2023
f7bdcb5
Merge pull request #1006 from grondo/news-0.26
mergify[bot] Feb 8, 2023
cefca8d
evaluators: add inline hint to improve performance
milroy Feb 8, 2023
b21c605
policies: replace O(n) accumulate operation
milroy Feb 10, 2023
35d3c96
Merge pull request #1007 from milroy/perf-fix
mergify[bot] Feb 16, 2023
b6f9982
add workflow dispatch
vsoch Mar 2, 2023
035e83e
Merge pull request #1012 from researchapps/add/workflow-dispatch
vsoch Mar 2, 2023
fde7785
resource: add missing <stdint.h> header
jwakely Mar 1, 2023
4e42c73
resource: fix typos appending to error message
jwakely Mar 1, 2023
a9c1bd5
Merge pull request #1011 from jwakely/gcc-13-fixes
mergify[bot] Mar 2, 2023
10db895
rq2: update autotools makefile to make rq2
milroy Aug 3, 2022
fedf2ec
rq2: adding skeleton initialization of resource-query replacement
milroy Aug 3, 2022
fe7f238
add working match function
milroy Sep 10, 2022
7d3be3f
rq2: add info (not yet working)
milroy Sep 15, 2022
2410e0a
util: added arg parsing to rq2
zekemorton Oct 6, 2022
c3def7e
implemented rgraph read from load file
zekemorton Oct 17, 2022
6b0c8e1
rq2: added control loop
zekemorton Oct 19, 2022
9696715
rq2: print rgraph after match
zekemorton Nov 3, 2022
9e3c1d2
implemented cancel
zekemorton Dec 13, 2022
4ebbd3f
remove redundant function
zekemorton Jan 23, 2023
e106777
added multi-mactch
zekemorton Mar 23, 2023
6bcc93f
rq2: add find
zekemorton Mar 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [ pull_request, push ]
on: [ pull_request, push, workflow_dispatch ]
name: ci
jobs:
check-pr:
Expand All @@ -15,7 +15,7 @@ jobs:

python-format:
name: python format
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v1
with:
Expand All @@ -31,7 +31,7 @@ jobs:

python-lint:
name: python lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v1
with:
Expand Down
52 changes: 52 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
flux-sched version 0.26.0 - 2023-02-07
--------------------------------------

### New Features

* support for RFC 31 Job Constraints (#997)
* report Fluxion version when broker modules are loaded (#998)

### Fixes

* reapi: Rename resource/hlapi to resource/reapi (#983)
* resource: improve error messages for jobspec parse errors (#1003)
* resource: fix 'Internal match error' when hostlist constraint is provided
(#1005)

### Testsuite

* testsuite: adjust expectations of recovery in `rv1_nosched` mode (#1000)
* testsuite: do not assume queues started by default (#996)
* testsuite: start/stop all queues with --all option (#992)
* github: change ubuntu version for python ci (#993)
* testsuite: update flux-tree-helper.py for new OutputFormat constructor
(#985)

flux-sched version 0.25.0 - 2022-10-04
--------------------------------------

Note: the flux-sched test suite requires flux-core 0.44.0 or newer.

### New Features

* qmanager: support RFC33 TOML queue config (#980, #971)

### Fixes
* Resource graph duration and job expiration to conform to RFC 14 (#969)
* Fix REAPI C++ bindings (#974)
* add an exception note to fatal queue exceptions (#957)

### Cleanup

* rc: combine fluxion rc scripts (#958)
* move flux-tree to the test suite (#956)
* build: drop unnecessary preqreqs, update README (#954)

### Testsuite

* testsuite: fix coverage method for queue exception (#978)
* testsuite: cover queues with non-overlapping resource constraints (#976)
* testsuite: fix integer overflow (#968)
* testsuite: use explicit duration units (#966)
* minor cleanup (#973, #959)

flux-sched version 0.24.0 - 2022-08-03
--------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ AC_CONFIG_FILES([Makefile
resource/utilities/Makefile
resource/utilities/test/Makefile
resource/modules/Makefile
resource/hlapi/Makefile
resource/hlapi/bindings/Makefile
resource/hlapi/bindings/c/Makefile
resource/reapi/Makefile
resource/reapi/bindings/Makefile
resource/reapi/bindings/c/Makefile
resource/policies/Makefile
resource/policies/base/Makefile
resource/policies/base/test/Makefile
Expand Down
6 changes: 3 additions & 3 deletions qmanager/modules/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ sched_fluxion_qmanager_la_SOURCES = \
$(top_srcdir)/src/common/liboptmgr/optmgr.hpp \
$(top_srcdir)/src/common/liboptmgr/optmgr_impl.hpp \
$(top_srcdir)/resource/libjobspec/jobspec.hpp \
$(top_srcdir)/resource/hlapi/bindings/c++/reapi.hpp \
$(top_srcdir)/resource/hlapi/bindings/c++/reapi_module.hpp \
$(top_srcdir)/resource/hlapi/bindings/c++/reapi_module_impl.hpp \
$(top_srcdir)/resource/reapi/bindings/c++/reapi.hpp \
$(top_srcdir)/resource/reapi/bindings/c++/reapi_module.hpp \
$(top_srcdir)/resource/reapi/bindings/c++/reapi_module_impl.hpp \
$(top_srcdir)/qmanager/config/queue_system_defaults.hpp \
$(top_srcdir)/qmanager/policies/base/queue_policy_base.hpp \
$(top_srcdir)/qmanager/policies/base/queue_policy_base_impl.hpp \
Expand Down
31 changes: 27 additions & 4 deletions qmanager/modules/qmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ static int subtable_dumps (json_t *o, std::string &value)
static int process_config_file (std::shared_ptr<qmanager_ctx_t> &ctx)
{
int rc = 0;
json_t *conf = NULL;
json_t *qmanager_conf = NULL, *queues_conf = NULL;

if ( (rc = flux_conf_unpack (flux_get_conf (ctx->h), NULL,
"{ s?:o }",
"{ s?:o , s?:o }",
"sched-fluxion-qmanager",
&conf)) < 0) {
&qmanager_conf,
"queues",
&queues_conf)) < 0) {
flux_log_error (ctx->h, "%s: flux_conf_unpack", __FUNCTION__);
return rc;
}
Expand All @@ -142,8 +144,25 @@ static int process_config_file (std::shared_ptr<qmanager_ctx_t> &ctx)
json_t *v = NULL;
optmgr_kv_t<qmanager_opts_t> opts_store;
std::string info_str = "";
json_object_foreach (conf, k, v) {
if (queues_conf){
// workaround to satisfy RFC 33
std::ostringstream queues;
json_object_foreach (queues_conf, k, v) {
queues << std::string(k) << " ";
}
if ( (rc = opts_store.put ("queues", queues.str()) ) < 0) {
flux_log_error (ctx->h, "%s: optmgr_kv_t::put ('queues', %s)",
__FUNCTION__, queues.str().c_str());
return rc;
}
}
json_object_foreach (qmanager_conf, k, v) {
std::string value;
if (k == std::string("queues")) {
flux_log_error (ctx->h, "%s: 'queues' key not supported, "
"use RFC33 format instead", __FUNCTION__);
return -1;
}
if (json_is_object (v)) {
if (subtable_dumps (v, value) < 0) {
flux_log_error (ctx->h, "%s: sub_table_dumps on key=%s",
Expand Down Expand Up @@ -599,6 +618,7 @@ int mod_start (flux_t *h, int argc, char **argv)
flux_log_error (h, "%s: qmanager_new", __FUNCTION__);
return rc;
}

// Because mod_main is always active, the following is safe.
flux_aux_set (h, "sched-fluxion-qmanager", &ctx, nullptr);

Expand Down Expand Up @@ -645,6 +665,9 @@ int mod_start (flux_t *h, int argc, char **argv)
extern "C" int mod_main (flux_t *h, int argc, char **argv)
{
eh_wrapper_t exception_safe_main;

flux_log (h, LOG_INFO, "version %s", PACKAGE_VERSION);

int rc = exception_safe_main (mod_start, h, argc, argv);
if (exception_safe_main.bad ())
flux_log_error (h, "%s: %s", __FUNCTION__,
Expand Down
2 changes: 1 addition & 1 deletion qmanager/policies/base/queue_policy_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {
#include <memory>
#include <cstdint>

#include "resource/hlapi/bindings/c++/reapi.hpp"
#include "resource/reapi/bindings/c++/reapi.hpp"
#include "qmanager/config/queue_system_defaults.hpp"

namespace Flux {
Expand Down
6 changes: 3 additions & 3 deletions qmanager/policies/queue_policy_factory_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#ifndef QUEUE_POLICY_FACTORY_IMPL_HPP
#define QUEUE_POLICY_FACTORY_IMPL_HPP

#include "resource/hlapi/bindings/c++/reapi.hpp"
#include "resource/hlapi/bindings/c++/reapi_module.hpp"
#include "resource/hlapi/bindings/c++/reapi_module_impl.hpp"
#include "resource/reapi/bindings/c++/reapi.hpp"
#include "resource/reapi/bindings/c++/reapi_module.hpp"
#include "resource/reapi/bindings/c++/reapi_module_impl.hpp"
#include "qmanager/policies/base/queue_policy_base.hpp"
#include "qmanager/policies/base/queue_policy_base_impl.hpp"
#include "qmanager/policies/queue_policy_fcfs.hpp"
Expand Down
3 changes: 2 additions & 1 deletion resource/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
AM_CPPFLAGS = -I$(top_srcdir) $(CZMQ_CFLAGS) $(FLUX_CORE_CFLAGS) \
$(BOOST_CPPFLAGS)

SUBDIRS = libjobspec planner . utilities modules hlapi evaluators policies
SUBDIRS = libjobspec planner . utilities modules reapi evaluators policies

noinst_LTLIBRARIES = libresource.la

Expand Down Expand Up @@ -56,6 +56,7 @@ libresource_la_SOURCES = \
schema/data_std.hpp \
schema/infra_data.hpp \
schema/sched_data.hpp \
schema/resource_base.hpp \
schema/resource_data.hpp \
schema/color.hpp \
schema/ephemeral.hpp \
Expand Down
4 changes: 2 additions & 2 deletions resource/config/system_defaults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace Flux {
namespace resource_model {
namespace detail {
const uint64_t SYSTEM_DEFAULT_DURATION = 43200; // 12 hours
const uint64_t SYSTEM_MAX_DURATION = 604800; // 7 days
const int64_t SYSTEM_DEFAULT_DURATION = 43200; // 12 hours
const int64_t SYSTEM_MAX_DURATION = 3153600000; // 100 years
} // namespace detail
} // namespace resource_model
} // namespace Flux
Expand Down
12 changes: 6 additions & 6 deletions resource/evaluators/fold.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,38 @@ namespace resource_model {

namespace fold {
struct greater {
bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
inline bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
{
return a.score > b.score;
}
};

struct less {
bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
inline bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
{
return a.score < b.score;
}
};

struct interval_greater {
bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
inline bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
{
return *(ivset.find (a.score)) > *(ivset.find (b.score));
}
boost::icl::interval_set<int64_t> ivset;
};

struct interval_less {
bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
inline bool operator() (const eval_egroup_t &a, const eval_egroup_t &b) const
{
return *(ivset.find (a.score)) < *(ivset.find (b.score));
}
boost::icl::interval_set<int64_t> ivset;
};

struct plus {
const int64_t operator() (const int64_t result,
const eval_egroup_t &a) const
inline const int64_t operator() (const int64_t &result,
const eval_egroup_t &a) const
{
return result + a.score;
}
Expand Down
1 change: 1 addition & 0 deletions resource/jobinfo/jobinfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define JOBINFO_HPP

#include <string>
#include <stdint.h>

namespace Flux {
namespace resource_model {
Expand Down
45 changes: 42 additions & 3 deletions resource/libjobspec/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
AM_CPPFLAGS = \
-I$(top_srcdir)

noinst_PROGRAMS = flux-jobspec-validate
noinst_LTLIBRARIES = libjobspec_conv.la

Expand All @@ -9,7 +12,43 @@ flux_jobspec_validate_LDADD = \
libjobspec_conv_la_CXXFLAGS = \
$(WARNING_CXXFLAGS) \
$(CODE_COVERAGE_CXXFLAGS) \
$(YAMLCPP_CFLAGS)
libjobspec_conv_la_LIBADD = $(CODE_COVERAGE_LIBS) $(YAMLCPP_LIBS)
libjobspec_conv_la_SOURCES = jobspec.cpp jobspec.hpp
$(YAMLCPP_CFLAGS) \
$(FLUX_HOSTLIST_CFLAGS) \
$(FLUX_IDSET_CFLAGS)

libjobspec_conv_la_LIBADD = \
$(CODE_COVERAGE_LIBS) \
$(YAMLCPP_LIBS) \
$(FLUX_HOSTLIST_LIBS) \
$(FLUX_IDSET_LIBS)

libjobspec_conv_la_SOURCES = \
jobspec.cpp \
jobspec.hpp \
parse_error.hpp \
constraint.hpp \
constraint.cpp \
hostlist_constraint.hpp \
hostlist_constraint.cpp \
rank_constraint.hpp \
rank_constraint.cpp

TESTS = \
test_constraint.t

check_PROGRAMS = \
$(TESTS)

test_constraint_t_SOURCES = \
test/constraint.cpp
test_constraint_t_CXXFLAGS = \
$(WARNING_CXXFLAGS) \
$(CODE_COVERAGE_CXXFLAGS) \
$(YAMLCPP_CFLAGS)
test_constraint_t_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(YAMLCPP_LIBS) \
libjobspec_conv.la \
$(top_builddir)/src/common/libtap/libtap.la
test_constraint_t_LDFLAGS = \
-no-install
Loading