Skip to content
Snippets Groups Projects
Commit f78a6a06 authored by Danny Auble's avatar Danny Auble
Browse files

BGQ - make it so srun -i<taskid> works correctly

parent 2b6b3061
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ documents those changes that are of interest to users and admins.
=============================
-- Cray - Improve support for zero compute note resource allocations.
Partition used can now be configured with no nodes nodes.
-- BGQ - make it so srun -i<taskid> works correctly
* Changes in SLURM 2.4.0.rc1
=============================
......
......@@ -1722,6 +1722,7 @@ static void _opt_args(int argc, char **argv)
}
#if defined HAVE_BG_FILES
uint32_t taskid = 0;
if (!opt.test_only) {
/* Since we need the opt.argc to allocate the opt.argv array
* we need to do this before actually messing with
......@@ -1743,6 +1744,13 @@ static void _opt_args(int argc, char **argv)
command_pos += 2;
if (_verbose)
command_pos += 2;
if (opt.ifname) {
char *p;
taskid = strtoul(opt.ifname, &p, 10);
if ((*p == '\0') && ((int) taskid < opt.ntasks)) {
command_pos += 2;
}
}
if (opt.runjob_opts) {
char *save_ptr = NULL, *tok;
char *tmp = xstrdup(opt.runjob_opts);
......@@ -1804,6 +1812,11 @@ static void _opt_args(int argc, char **argv)
opt.argv[i++] = xstrdup_printf("%d", _verbose);
}
if (taskid) {
opt.argv[i++] = xstrdup("--stdinrank");
opt.argv[i++] = xstrdup_printf("%u", taskid);
}
if (opt.runjob_opts) {
char *save_ptr = NULL, *tok;
char *tmp = xstrdup(opt.runjob_opts);
......
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