forked from lei.chen/myxce
use fmt_jobid() in scheduler
This commit is contained in:
parent
6429ef0bff
commit
064717959d
3 changed files with 12 additions and 5 deletions
|
|
@ -207,6 +207,7 @@ static void* fcfs_elect_job(xce_sched_plugin_t* plugin)
|
||||||
ordq_item_t* it = NULL;
|
ordq_item_t* it = NULL;
|
||||||
int go = 0;
|
int go = 0;
|
||||||
uint64_t jobid = 0;
|
uint64_t jobid = 0;
|
||||||
|
char jobidString[64];
|
||||||
|
|
||||||
pthread_testcancel();
|
pthread_testcancel();
|
||||||
|
|
||||||
|
|
@ -233,7 +234,8 @@ static void* fcfs_elect_job(xce_sched_plugin_t* plugin)
|
||||||
if (sched_job_is_ready(j->job)) {
|
if (sched_job_is_ready(j->job)) {
|
||||||
jobid = j->job->jobid;
|
jobid = j->job->jobid;
|
||||||
|
|
||||||
TRACE("%s jobid %ld", __func__, jobid);
|
fmt_jobid(jobidString, sizeof(jobidString), jobid);
|
||||||
|
TRACE("%s jobid %s", __func__, jobidString);
|
||||||
cbuf_put(&(sched->jbuf), &jobid);
|
cbuf_put(&(sched->jbuf), &jobid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -226,9 +226,11 @@ static int limit_job_election(void* arg, xce_sched_job_t* job)
|
||||||
xce_sched_obj_t* obj = job->schedobj;
|
xce_sched_obj_t* obj = job->schedobj;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
iterator_t it;
|
iterator_t it;
|
||||||
xce_sched_ctx_t ctx = { 0 };
|
xce_sched_ctx_t ctx = { 0 };
|
||||||
|
char jobidString[64];
|
||||||
|
|
||||||
TRACE("%s job %lu plugin %s", __func__, job->jobid, plugin->name);
|
fmt_jobid(jobidString, sizeof(jobidString), job->jobid);
|
||||||
|
TRACE("%s job %s plugin %s", __func__, jobidString, plugin->name);
|
||||||
|
|
||||||
if (obj->configver >= sched->configver) {
|
if (obj->configver >= sched->configver) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@ static void* sched_allocator(void* arg)
|
||||||
xce_use(sched);
|
xce_use(sched);
|
||||||
while (1) {
|
while (1) {
|
||||||
uint64_t jobid;
|
uint64_t jobid;
|
||||||
|
char jobidString[64];
|
||||||
xce_decision_t* decision = NULL;
|
xce_decision_t* decision = NULL;
|
||||||
xce_sched_job_t* job = NULL;
|
xce_sched_job_t* job = NULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
@ -240,7 +241,8 @@ static void* sched_allocator(void* arg)
|
||||||
|
|
||||||
job = sched_get_job(sched, jobid);
|
job = sched_get_job(sched, jobid);
|
||||||
if (job == NULL) {
|
if (job == NULL) {
|
||||||
TRACE("%s job %lu can not be found", __func__, jobid);
|
fmt_jobid(jobidString, sizeof(jobidString), jobid);
|
||||||
|
TRACE("%s job %s can not be found", __func__, jobidString);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -255,7 +257,8 @@ static void* sched_allocator(void* arg)
|
||||||
/* job is pend */
|
/* job is pend */
|
||||||
xce_pendreason_t* reason = job->schedobj->reason;
|
xce_pendreason_t* reason = job->schedobj->reason;
|
||||||
|
|
||||||
WARN("job %ld is pending but pend reason is NULL", jobid);
|
fmt_jobid(jobidString, sizeof(jobidString), jobid);
|
||||||
|
WARN("job %s is pending but pend reason is NULL", jobidString);
|
||||||
|
|
||||||
if (reason != NULL) {
|
if (reason != NULL) {
|
||||||
reason->jobid = job->jobid;
|
reason->jobid = job->jobid;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue