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

Fix to support a single stdin reader

parent 3a13c5b3
No related branches found
No related tags found
No related merge requests found
...@@ -305,6 +305,8 @@ _client_read(eio_obj_t *obj, List objs) ...@@ -305,6 +305,8 @@ _client_read(eio_obj_t *obj, List objs)
} else { } else {
for (i = 0; i < client->job->ntasks; i++) { for (i = 0; i < client->job->ntasks; i++) {
task = client->job->task[i]; task = client->job->task[i];
if (task->in == NULL)
continue;
io = (struct task_in_info *)task->in->arg; io = (struct task_in_info *)task->in->arg;
if (task->gtid != in->header.gtaskid) if (task->gtid != in->header.gtaskid)
continue; continue;
......
...@@ -33,6 +33,7 @@ fname_create(srun_job_t *job, char *format) ...@@ -33,6 +33,7 @@ fname_create(srun_job_t *job, char *format)
fname = xmalloc(sizeof(*fname)); fname = xmalloc(sizeof(*fname));
fname->type = IO_ALL; fname->type = IO_ALL;
fname->name = NULL; fname->name = NULL;
fname->taskid = -1;
/* Handle special cases /* Handle special cases
*/ */
......
...@@ -691,15 +691,14 @@ again: ...@@ -691,15 +691,14 @@ again:
list_enqueue(server->msg_queue, msg); list_enqueue(server->msg_queue, msg);
} }
} else if (header.type == SLURM_IO_STDIN) { } else if (header.type == SLURM_IO_STDIN) {
fatal("Not yet implemented"); debug("SLURM_IO_STDIN");
#if 0
int nodeid; int nodeid;
struct server_io_info *server; struct server_io_info *server;
msg->ref_count = 1; msg->ref_count = 1;
nodeid = info->job->taskid_to_nodeid[header.gtaskid]; nodeid = info->job->hostid[header.gtaskid];
debug3(" taskid %d maps to nodeid %d", header.gtaskid, nodeid);
server = info->job->ioserver[nodeid]->arg; server = info->job->ioserver[nodeid]->arg;
list_enqueue(server->msg_queue, msg); list_enqueue(server->msg_queue, msg);
#endif
} else { } else {
fatal("Unsupported header.type"); fatal("Unsupported header.type");
} }
......
...@@ -421,6 +421,9 @@ _is_local_file (io_filename_t *fname) ...@@ -421,6 +421,9 @@ _is_local_file (io_filename_t *fname)
{ {
if (fname->name == NULL) if (fname->name == NULL)
return 1; return 1;
if (fname->taskid != -1)
return 1;
return ((fname->type != IO_PER_TASK) && (fname->type != IO_ONE)); return ((fname->type != IO_PER_TASK) && (fname->type != IO_ONE));
} }
...@@ -441,7 +444,7 @@ _init_stdio_eio_objs(srun_job_t *job) ...@@ -441,7 +444,7 @@ _init_stdio_eio_objs(srun_job_t *job)
*/ */
if (_is_local_file(inname)) { if (_is_local_file(inname)) {
uint16_t type, destid; uint16_t type, destid;
if (inname->name == NULL) { if (inname->name == NULL || inname->taskid != -1) {
infd = STDIN_FILENO; infd = STDIN_FILENO;
} else { } else {
infd = open(inname->name, O_RDONLY); infd = open(inname->name, O_RDONLY);
......
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