Skip to content
Snippets Groups Projects
Commit bf96f33a authored by Moe Jette's avatar Moe Jette
Browse files

improve logic to support front_end systems by always setting host index in

job step credential to 0.
parent ebed516f
No related branches found
No related tags found
No related merge requests found
...@@ -1204,11 +1204,16 @@ void format_core_allocs(slurm_cred_t *cred, char *node_name, ...@@ -1204,11 +1204,16 @@ void format_core_allocs(slurm_cred_t *cred, char *node_name,
cred->job_hostlist); cred->job_hostlist);
return; return;
} }
#ifdef HAVE_FRONT_END
host_index = 0;
#else
host_index = hostset_find(hset, node_name); host_index = hostset_find(hset, node_name);
#endif
if ((host_index < 0) || (host_index >= cred->job_nhosts)) { if ((host_index < 0) || (host_index >= cred->job_nhosts)) {
error("Invalid host_index %d for job %u", error("Invalid host_index %d for job %u",
host_index, cred->jobid); host_index, cred->jobid);
error("Host %s not in hostlist %s",
node_name, cred->job_hostlist);
hostset_destroy(hset); hostset_destroy(hset);
return; return;
} }
...@@ -1301,11 +1306,16 @@ extern void get_cred_gres(slurm_cred_t *cred, char *node_name, ...@@ -1301,11 +1306,16 @@ extern void get_cred_gres(slurm_cred_t *cred, char *node_name,
cred->job_hostlist); cred->job_hostlist);
return; return;
} }
#ifdef HAVE_FRONT_END
host_index = 0;
#else
host_index = hostset_find(hset, node_name); host_index = hostset_find(hset, node_name);
#endif
if ((host_index < 0) || (host_index >= cred->job_nhosts)) { if ((host_index < 0) || (host_index >= cred->job_nhosts)) {
error("Invalid host_index %d for job %u", error("Invalid host_index %d for job %u",
host_index, cred->jobid); host_index, cred->jobid);
error("Host %s not in hostlist %s",
node_name, cred->job_hostlist);
hostset_destroy(hset); hostset_destroy(hset);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment