diff --git a/src/slurmd/io.c b/src/slurmd/io.c index f22ad1d18f129f337d4d57081d0f9f09116259a0..dc8f160518f523aedcd3f02e9526774d50b875b7 100644 --- a/src/slurmd/io.c +++ b/src/slurmd/io.c @@ -305,6 +305,8 @@ _client_read(eio_obj_t *obj, List objs) } else { for (i = 0; i < client->job->ntasks; i++) { task = client->job->task[i]; + if (task->in == NULL) + continue; io = (struct task_in_info *)task->in->arg; if (task->gtid != in->header.gtaskid) continue; diff --git a/src/srun/fname.c b/src/srun/fname.c index df8e0ad85ee81c417600f58720ed4a073a9843bf..ac02edf804a2d581f4e70d318f97d3e6201cb6c5 100644 --- a/src/srun/fname.c +++ b/src/srun/fname.c @@ -33,6 +33,7 @@ fname_create(srun_job_t *job, char *format) fname = xmalloc(sizeof(*fname)); fname->type = IO_ALL; fname->name = NULL; + fname->taskid = -1; /* Handle special cases */ diff --git a/src/srun/io.c b/src/srun/io.c index 547c7c385a2b3f9f443ed4ccbe86280745f19e1e..c46936d5658a8dcd4b295e4c01be2b74669b8c3f 100644 --- a/src/srun/io.c +++ b/src/srun/io.c @@ -691,15 +691,14 @@ again: list_enqueue(server->msg_queue, msg); } } else if (header.type == SLURM_IO_STDIN) { - fatal("Not yet implemented"); -#if 0 + debug("SLURM_IO_STDIN"); int nodeid; struct server_io_info *server; 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; list_enqueue(server->msg_queue, msg); -#endif } else { fatal("Unsupported header.type"); } diff --git a/src/srun/srun_job.c b/src/srun/srun_job.c index cf6758894d5b43bfb88d870174581f452cebb548..c2f64b4ac22e5a7d7f9e09414818e0d0d722f0a4 100644 --- a/src/srun/srun_job.c +++ b/src/srun/srun_job.c @@ -421,6 +421,9 @@ _is_local_file (io_filename_t *fname) { if (fname->name == NULL) return 1; + + if (fname->taskid != -1) + return 1; return ((fname->type != IO_PER_TASK) && (fname->type != IO_ONE)); } @@ -441,7 +444,7 @@ _init_stdio_eio_objs(srun_job_t *job) */ if (_is_local_file(inname)) { uint16_t type, destid; - if (inname->name == NULL) { + if (inname->name == NULL || inname->taskid != -1) { infd = STDIN_FILENO; } else { infd = open(inname->name, O_RDONLY);