From 594ec30894f3f52c58f2736db61d4d123e3946b2 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Wed, 23 May 2012 13:33:25 -0700
Subject: [PATCH] BGQ - make things work with taskid 0

---
 src/srun/opt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/srun/opt.c b/src/srun/opt.c
index cab6ff9d61b..50e7eb9154f 100644
--- a/src/srun/opt.c
+++ b/src/srun/opt.c
@@ -1722,7 +1722,7 @@ static void _opt_args(int argc, char **argv)
 	}
 
 #if defined HAVE_BG_FILES
-	uint32_t taskid = 0;
+	uint32_t taskid = NO_VAL;
 	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
@@ -1812,7 +1812,7 @@ static void _opt_args(int argc, char **argv)
 			opt.argv[i++]  = xstrdup_printf("%d", _verbose);
 		}
 
-		if (taskid) {
+		if (taskid != NO_VAL) {
 			opt.argv[i++]  = xstrdup("--stdinrank");
 			opt.argv[i++]  = xstrdup_printf("%u", taskid);
 		}
-- 
GitLab