From 0c36b544ab9fda40a84fd5b1a41a280b30b6c08b Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Wed, 17 Aug 2011 15:21:40 -0700
Subject: [PATCH] BLUEGENE - if resolving, don't get the unneeded node info.

---
 src/smap/smap.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/smap/smap.c b/src/smap/smap.c
index 5539452b350..43295d0c5d6 100644
--- a/src/smap/smap.c
+++ b/src/smap/smap.c
@@ -103,16 +103,21 @@ int main(int argc, char *argv[])
 	} else if (params.cluster_dims == 3)
 		min_screen_width = 92;
 
-	while (slurm_load_node((time_t) NULL, &new_node_ptr, SHOW_ALL)) {
-		error_code = slurm_get_errno();
-		printf("slurm_load_node: %s\n", slurm_strerror(error_code));
-		if (params.display == COMMANDS) {
-			new_node_ptr = NULL;
-			break;		/* just continue */
+	/* no need for this if you are resolving */
+	if (!params.resolve) {
+		while (slurm_load_node((time_t) NULL,
+				       &new_node_ptr, SHOW_ALL)) {
+			error_code = slurm_get_errno();
+			printf("slurm_load_node: %s\n",
+			       slurm_strerror(error_code));
+			if (params.display == COMMANDS) {
+				new_node_ptr = NULL;
+				break;		/* just continue */
+			}
+			if (params.iterate == 0)
+				_smap_exit(1);	/* Calls exit(), no return */
+			sleep(10);	/* keep trying to reconnect */
 		}
-		if (params.iterate == 0)
-			_smap_exit(1);	/* Calls exit(), no return */
-		sleep(10);	/* keep trying to reconnect */
 	}
 
 #ifdef HAVE_BG
-- 
GitLab