From 7faae23fe6ad0ab61b70b8f42c25feeb8649f8be Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Thu, 23 May 2013 07:57:18 -0700
Subject: [PATCH] switch/nrt - Correct network_id use logic.

---
 NEWS                         |  2 ++
 src/plugins/switch/nrt/nrt.c | 10 +++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index 7b550ce06da..bfd83bf8b0d 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,8 @@ documents those changes that are of interest to users and admins.
  -- CRAY - Support CLE 4.2.0
  -- RebootNode logic - Defers (rather than forgets) reboot request with job
     running on the node within a reservation.
+ -- switch/nrt - Correct network_id use logic. Correct support for user sn_all
+    and sn_single options.
 
 * Changes in Slurm 2.5.6
 ========================
diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c
index ee4742b8304..5bd751de0ff 100644
--- a/src/plugins/switch/nrt/nrt.c
+++ b/src/plugins/switch/nrt/nrt.c
@@ -1150,9 +1150,9 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname,
 			if ((adapter_type != NRT_MAX_ADAPTER_TYPES) &&
 			    (adapter->adapter_type != adapter_type))
 				continue;
-			if ((network_id >= 0) &&
-			    (adapter->network_id != network_id))
-				continue;
+//			if ((network_id >= 0) &&
+//			    (adapter->network_id != network_id))
+//				continue;
 			if (user_space &&
 			    (adapter->adapter_type == NRT_IPONLY))
 				continue;
@@ -1332,8 +1332,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp,
 			}
 			continue;
 		}
-		if ((network_id >= 0) && (adapter->network_id != network_id))
-			continue;
+//		if ((network_id >= 0) && (adapter->network_id != network_id))
+//			continue;
 		if ((adapter_type != NRT_MAX_ADAPTER_TYPES) &&
 		    (adapter->adapter_type == adapter_type)) {
 			adapter = &node->adapter_list[i];
-- 
GitLab