This commit is contained in:
Rongsong Shen 2026-07-23 12:35:10 +08:00
commit ff1be48001
38 changed files with 2292 additions and 35 deletions

View file

@ -59,6 +59,10 @@ static int parjob_prepare_allocation(void* arg, xce_sched_ctx_t* ctx)
if (obj->tag == XCE_RESREQ_PRIMARY) {
xce_primary_resreq_t* primary = obj->u.primary->resreq;
if (primary == NULL) {
return 0;
}
if (primary->maxTasks == 1) {
/* do not care sequence job */

View file

@ -174,7 +174,13 @@ xce_sched_job_t* make_sched_job(void* arg, xce_job_t* j)
return NULL;
}
rc = parse_resreq(job->resreq, j->submit->resreq, sched->resmgr, &errmsg);
{
char* resreq_str = j->submit->resreq;
if (NULLSTR(resreq_str)) {
resreq_str = "type == any";
}
rc = parse_resreq(job->resreq, resreq_str, sched->resmgr, &errmsg);
}
if (rc < 0) {
ERROR("%s parse_resreq failed, %s", __func__, errmsg);
FREEUP(errmsg);

View file

@ -109,6 +109,10 @@ static int sched_make_primary_allocation(xce_scheduler_t* sched,
xce_sched_ctx_t ctx;
int rc = 0;
if (primary == NULL) {
return -EINVAL;
}
sched_ctx_init(&ctx, sched, obj);
sched_ctx_set_primary(&ctx, primary);
rc = sched_make_primary_alloc_(sched, &ctx);