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

Add alloc_sid and alloc_node to job submit/allocate descriptor.

Initialize/free/set alloc_sid and alloc_node in API functions.
Pack/unpack/free new elements in job descriptor RPCs.
Load/dump/pack new elements into job table records.
Remove defunct BATCH_LAUNCH_RESPONSE message.
parent c3f0e5c5
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,6 @@ static int _unblock_all_signals(void); ...@@ -74,7 +74,6 @@ static int _unblock_all_signals(void);
static int _block_most_signals(void); static int _block_most_signals(void);
static int _send_exit_msg(int rc, task_info_t *t); static int _send_exit_msg(int rc, task_info_t *t);
static int _complete_job(slurmd_job_t *job, int rc, int status); static int _complete_job(slurmd_job_t *job, int rc, int status);
static void _send_batch_launch_resp(slurmd_job_t *job);
static void _send_launch_resp(slurmd_job_t *job, int rc); static void _send_launch_resp(slurmd_job_t *job, int rc);
static void _wait_for_all_tasks(slurmd_job_t *job); static void _wait_for_all_tasks(slurmd_job_t *job);
static void _slurmd_job_log_init(slurmd_job_t *job); static void _slurmd_job_log_init(slurmd_job_t *job);
...@@ -351,9 +350,7 @@ _run_job(slurmd_job_t *job) ...@@ -351,9 +350,7 @@ _run_job(slurmd_job_t *job)
} }
rc = _exec_all_tasks(job); rc = _exec_all_tasks(job);
if (job->batch) if (!job->batch)
_send_batch_launch_resp(job);
else
_send_launch_resp(job, rc); _send_launch_resp(job, rc);
_wait_for_all_tasks(job); _wait_for_all_tasks(job);
...@@ -765,37 +762,6 @@ _block_most_signals(void) ...@@ -765,37 +762,6 @@ _block_most_signals(void)
return SLURM_SUCCESS; return SLURM_SUCCESS;
} }
static void
_send_batch_launch_resp(slurmd_job_t *job)
{
slurm_msg_t resp_msg;
batch_launch_response_msg_t resp;
List steps = shm_get_steps();
ListIterator i = list_iterator_create(steps);
job_step_t *s = NULL;
bool found = false;
while ((s = list_next(i))) {
if (s->jobid == job->jobid) {
resp.sid = s->sid;
found = true;
break;
}
}
list_destroy(steps);
if (!found)
error("failed to find jobid %u in shared memory", job->jobid);
else {
debug("Sending batch launch resp");
resp_msg.data = &resp;
resp_msg.msg_type = RESPONSE_BATCH_JOB_LAUNCH;
/* resp.sid = s->sid; set above */
resp.job_id = job->jobid;
slurm_send_only_controller_msg(&resp_msg);
}
}
static void static void
_send_launch_resp(slurmd_job_t *job, int rc) _send_launch_resp(slurmd_job_t *job, int rc)
{ {
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include "src/common/fd.h"
#include "src/common/log.h" #include "src/common/log.h"
#include "src/common/slurm_protocol_api.h" #include "src/common/slurm_protocol_api.h"
#include "src/common/xmalloc.h" #include "src/common/xmalloc.h"
......
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