Skip to content
Snippets Groups Projects
Commit f9e2b0a4 authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Add overcommit flag to job_step_create_request_msg_t structure

parent 5405ace5
No related branches found
No related tags found
No related merge requests found
...@@ -489,6 +489,8 @@ typedef struct job_step_specs { ...@@ -489,6 +489,8 @@ typedef struct job_step_specs {
char *node_list; /* list of required nodes */ char *node_list; /* list of required nodes */
char *network; /* network use spec */ char *network; /* network use spec */
char *name; /* name of the job step, default "" */ char *name; /* name of the job step, default "" */
uint8_t overcommit; /* flag, 1 to allow overcommit of processors,
0 to disallow overcommit. */
} job_step_create_request_msg_t; } job_step_create_request_msg_t;
typedef struct slurm_step_layout { typedef struct slurm_step_layout {
......
...@@ -1437,6 +1437,7 @@ unpack_error: ...@@ -1437,6 +1437,7 @@ unpack_error:
*msg = NULL; *msg = NULL;
return SLURM_ERROR; return SLURM_ERROR;
} }
static void static void
_pack_job_step_create_request_msg(job_step_create_request_msg_t _pack_job_step_create_request_msg(job_step_create_request_msg_t
* msg, Buf buffer) * msg, Buf buffer)
...@@ -1456,6 +1457,7 @@ _pack_job_step_create_request_msg(job_step_create_request_msg_t ...@@ -1456,6 +1457,7 @@ _pack_job_step_create_request_msg(job_step_create_request_msg_t
packstr(msg->name, buffer); packstr(msg->name, buffer);
packstr(msg->network, buffer); packstr(msg->network, buffer);
packstr(msg->node_list, buffer); packstr(msg->node_list, buffer);
pack8((uint8_t)msg->overcommit, buffer);
} }
static int static int
...@@ -1483,6 +1485,7 @@ _unpack_job_step_create_request_msg(job_step_create_request_msg_t ** msg, ...@@ -1483,6 +1485,7 @@ _unpack_job_step_create_request_msg(job_step_create_request_msg_t ** msg,
safe_unpackstr_xmalloc(&(tmp_ptr->name), &uint16_tmp, buffer); safe_unpackstr_xmalloc(&(tmp_ptr->name), &uint16_tmp, buffer);
safe_unpackstr_xmalloc(&(tmp_ptr->network), &uint16_tmp, buffer); safe_unpackstr_xmalloc(&(tmp_ptr->network), &uint16_tmp, buffer);
safe_unpackstr_xmalloc(&(tmp_ptr->node_list), &uint16_tmp, buffer); safe_unpackstr_xmalloc(&(tmp_ptr->node_list), &uint16_tmp, buffer);
safe_unpack8(&(tmp_ptr->overcommit), buffer);
return SLURM_SUCCESS; return SLURM_SUCCESS;
......
...@@ -157,6 +157,7 @@ int slaunch(int argc, char **argv) ...@@ -157,6 +157,7 @@ int slaunch(int argc, char **argv)
step_req.cpu_count = 0; /* FIXME */ step_req.cpu_count = 0; /* FIXME */
step_req.relative = opt.relative; step_req.relative = opt.relative;
step_req.task_dist = opt.distribution; step_req.task_dist = opt.distribution;
step_req.overcommit = opt.overcommit ? 1 : 0;
step_req.port = 0; /* historical, used by srun */ step_req.port = 0; /* historical, used by srun */
step_req.host = NULL; /* historical, used by srun */ step_req.host = NULL; /* historical, used by srun */
......
...@@ -561,6 +561,7 @@ _step_req_create(srun_job_t *j) ...@@ -561,6 +561,7 @@ _step_req_create(srun_job_t *j)
r->network = xstrdup(opt.network); r->network = xstrdup(opt.network);
r->name = xstrdup(opt.job_name); r->name = xstrdup(opt.job_name);
r->relative = (uint16_t)opt.relative; r->relative = (uint16_t)opt.relative;
r->overcommit = opt.overcommit ? 1 : 0;
debug("requesting job %d, user %d, nodes %d (%s)", debug("requesting job %d, user %d, nodes %d (%s)",
r->job_id, r->user_id, r->node_count, r->node_list); r->job_id, r->user_id, r->node_count, r->node_list);
debug("cpus %d, tasks %d, name %s, relative %d", debug("cpus %d, tasks %d, name %s, relative %d",
......
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