Init commit of jobs output/error message peek project.

This commit is contained in:
Lei Chen 2026-05-09 16:57:54 +08:00
parent c772d7e601
commit d2b47e3985
38 changed files with 2267 additions and 21 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

@ -168,7 +168,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

@ -111,6 +111,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);