From 5ce1f5d36d4a4251bc5cb32afcdfc1d2d09fc4cc Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Fri, 11 Nov 2005 17:58:53 +0000
Subject: [PATCH] edit to tell if we have a front end system or not.

---
 testsuite/expect/globals.example | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/testsuite/expect/globals.example b/testsuite/expect/globals.example
index ba32bebb24d..3bb0cc82d52 100755
--- a/testsuite/expect/globals.example
+++ b/testsuite/expect/globals.example
@@ -351,18 +351,28 @@ proc wait_for_job { job_id state } {
 # Purpose: Determine if the execution host is one in which the
 # slurmd daemon executes on a front-end node rather than the 
 # compute hosts (e.g. Blue Gene systems). This is based upon 
-# our ability to locate a specific Blue Gene library file.
+# the value of SelectType in the slurm.conf.
 #
 # Returns 1 if the system uses a front-end, 0 otherwise
 #
 ################################################################
 
 proc test_front_end { } {
-	if [file exists "/bgl/BlueLight/ppcfloor/bglsys/bin/mpirun"] {
-		return 1
-	}
+	global scontrol bin_bash bin_grep
 
-	return 0
+	set bluegene 0
+	spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SelectType"
+	expect {
+		"select/bluegene" {
+			set bluegene 1
+			exp_continue
+		}
+		eof {
+			wait
+		}
+	}	
+	
+	return $bluegene
 }
 
 ################################################################
-- 
GitLab