Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

This commit was manufactured by cvs2svn to create tag

'slurm-0-4-12-1'.
  • Loading branch information...
commit f04190ef7565df8f6d7bd7ce71f60f5343ef3bed 1 parent 5ab7088
authored March 21, 2005
4  META
@@ -9,8 +9,8 @@
9 9
   Name:		slurm
10 10
   Major:	0
11 11
   Minor:	4
12  
-  Micro:        6
13  
-  Version:	0.4.6
  12
+  Micro:        12
  13
+  Version:	0.4.12
14 14
   Release:	1
15 15
   API_CURRENT:	6	
16 16
   API_AGE:	4
27  NEWS
... ...
@@ -1,9 +1,34 @@
1 1
 This file describes changes in recent versions of SLURM. It primarily
2 2
 documents those changes that are of interest to users and admins. 
3 3
 
  4
+* Changes in SLURM 0.4.12
  5
+========================
  6
+ -- bug shot for new api calls.
  7
+ -- added BridgeAPILogFile as an option for bluegene.conf file
  8
+ 
  9
+* Changes in SLURM 0.4.11
  10
+========================
  11
+ -- changed as many rm_get_partition() to rm_get_partitions_info as we could 
  12
+    for time saving.
  13
+ 
  14
+* Changes in SLURM 0.4.10
  15
+========================
  16
+ -- redesign for BGL external wiring.
  17
+ -- smap display bug fix for smaller systems.
  18
+
  19
+* Changes in SLURM 0.4.9
  20
+========================
  21
+ -- setpnum works now, have to include this in bluegene.conf
  22
+
  23
+* Changes in SLURM 0.4.8
  24
+========================
  25
+ -- Changed the prolog and the epilog to use the env var MPIRUN_PARTITION
  26
+    instead of BGL_PARTITION_ID
  27
+
4 28
 * Changes in SLURM 0.4.7
5 29
 ========================
6  
- -- Remove some BGL specific headers that IBM now distributes.
  30
+ -- Remove some BGL specific headers that IBM now distributes, NOTE
  31
+    BGL driver 080 or greater required.
7 32
  -- Change autogen.sh to deal with problems running autoconf on one
8 33
     system and configure on another with different software versions.
9 34
 
2  auxdir/x_ac_bgl.m4
@@ -33,7 +33,7 @@ AC_DEFUN([X_AC_BGL],
33 33
          fi
34 34
 
35 35
          have_bgl_ar=yes
36  
-         bgl_ldflags="$bgl_ldflags -Wl,-rpath $bgl_dir/lib -Wl,-L$bgl_dir/lib -Wl,-whole-archive -Wl,-lbglbridge -Wl,-no-whole-archive $bgl_dir/lib/bglbootload.a $bgl_dir/lib/bglsp440supt.a -lbgldb -lbglmachine -ltableapi -lexpat -lbglsp"
  36
+         bgl_ldflags="$bgl_ldflags -Wl,-rpath $bgl_dir/lib -Wl,-L$bgl_dir/lib -Wl,-whole-archive -Wl,-lbglbridge -Wl,-no-whole-archive $bgl_dir/lib/bglbootload.a $bgl_dir/lib/bglsp440supt.a -lsaymessage -lbgldb -lbglmachine -ltableapi -lexpat -lbglsp"
37 37
       fi
38 38
 
39 39
       # Search for required DB2 library in the directory
6  doc/html/bluegene.html
@@ -99,7 +99,7 @@
99 99
 The script that you submit to SLURM can contain multiple invocations of mpirun as
100 100
 well as any desired commands for pre- and post-processing.
101 101
 The mpirun command will get its <i>bglblock</i> or BGL partition information from the
102  
-<i>BGL_PARTITION_ID</i> as set by SLURM. A sample script is shown below.
  102
+<i>MPIRUN_PARTITION</i> as set by SLURM. A sample script is shown below.
103 103
 <pre>
104 104
 #!/bin/bash
105 105
 # pre-processing
@@ -185,11 +185,11 @@
185 185
 and interfaces. 
186 186
 The value of <i>SchedulerType</i> should be set to "sched/builtin".
187 187
 The value of <i>Prolog</i> should be set to a program that will delay 
188  
-execution until the bglblock identified by the BGL_PARTITION_ID environment 
  188
+execution until the bglblock identified by the MPIRUN_PARTITION environment 
189 189
 variable is ready for use. It is recommended that you construct a script 
190 190
 that serves this function and calls the supplied program <i>slurm_prolog</i>.
191 191
 The value of <i>Epilog</i> should be set to a program that will wait
192  
-until the bglblock identified by the BGL_PARTITION_ID environment
  192
+until the bglblock identified by the MPIRUN_PARTITION environment
193 193
 variable has been freed. It is recommended that you construct a script
194 194
 that serves this function and calls the supplied program <i>slurm_epilog</i>.
195 195
 The prolog and epilog programs are used to insure proper synchronization 
4  etc/bluegene.conf.example
@@ -15,7 +15,9 @@ BlrtsImage=/bgl/BlueLight/ppcfloor/bglsys/bin/rts_hw.rts
15 15
 LinuxImage=/bgl/BlueLight/ppcfloor/bglsys/bin/zImage.elf
16 16
 MloaderImage=/bgl/BlueLight/ppcfloor/bglsys/bin/mmcs-mloader.rts
17 17
 RamDiskImage=/bgl/BlueLight/ppcfloor/bglsys/bin/ramdisk.elf
18  
-#ChangeNumpsets=/etc/slurm/change_numpsets
  18
+BridgeAPILogFile=/var/log/slurm/bridgeapi.log
  19
+Numpsets=8
  20
+BridgeAPIVerbose=0
19 21
 
20 22
 #
21 23
 # Define the static partitions (bglblocks)
2  src/partition_allocator/Makefile.am
@@ -16,7 +16,7 @@ INCLUDES = -I$(top_srcdir) $(BGL_INCLUDES)
16 16
 # 	$(top_builddir)/src/api/libslurm.la
17 17
 
18 18
 # partition_allocator_LDFLAGS = -export-dynamic -lm $(CMD_LDFLAGS) $(BGL_LDFLAGS)
19  
-# CPPFLAGS = -DBUILD_EXE
  19
+# CPPFLAGS = -DBUILD_EXE 
20 20
 
21 21
 # making a .la
22 22
 noinst_LTLIBRARIES = libpartition_allocator.la 
121  src/partition_allocator/partition_allocator.c
@@ -92,8 +92,7 @@ static void _switch_config(pa_node_t* source, pa_node_t* target, int dim,
92 92
 			int port_src, int port_tar);
93 93
 /* */
94 94
 static void _set_external_wires(int dim, int count, pa_node_t* source, 
95  
-			 pa_node_t* target_1, pa_node_t* target_2, 
96  
-			 pa_node_t* target_first, pa_node_t* target_second);
  95
+			 pa_node_t* target_1, pa_node_t* target_2);
97 96
 /* */
98 97
 static char *_set_internal_wires(List nodes, int size, int conn_type);
99 98
 
@@ -474,7 +473,7 @@ void pa_init(node_info_msg_t *node_info_ptr)
474 473
 	_create_pa_system();
475 474
 	
476 475
 	pa_system_ptr->fill_in_value = (pa_node_t *) 
477  
-		xmalloc(sizeof(pa_node_t) * pa_system_ptr->num_of_proc);
  476
+		xmalloc(sizeof(pa_node_t) * 128);
478 477
 	
479 478
 	init_grid(node_info_ptr);
480 479
 	
@@ -985,7 +984,7 @@ static int _create_config_even(pa_node_t *grid)
985 984
 
986 985
 #if HAVE_BGL
987 986
 	int y,z;
988  
-	pa_node_t *target_2, *target_first, *target_second;
  987
+	pa_node_t *target_2;
989 988
 	for(x=0;x<DIM_SIZE[X];x++) {
990 989
 		for(y=0;y<DIM_SIZE[Y];y++) {
991 990
 			for(z=0;z<DIM_SIZE[Z];z++) {
@@ -999,14 +998,8 @@ static int _create_config_even(pa_node_t *grid)
999 998
 					target_2 = &grid[x+2][y][z];
1000 999
 				else
1001 1000
 					target_2 = target_1;
1002  
-				target_first = &grid[0][y][z];
1003  
-				if (DIM_SIZE[X] > 1)
1004  
-					target_second = &grid[1][y][z];
1005  
-				else
1006  
-					target_second = target_first;
1007 1001
 				_set_external_wires(X, x, source, 
1008  
-						target_1, target_2, 
1009  
-						target_first, target_second);
  1002
+						target_1, target_2);
1010 1003
 				
1011 1004
 				if(y<(DIM_SIZE[Y]-1)) 
1012 1005
 					target_1 = &grid[x][y+1][z];
@@ -1014,16 +1007,14 @@ static int _create_config_even(pa_node_t *grid)
1014 1007
 					target_1 = &grid[x][0][z];
1015 1008
 				
1016 1009
 				_set_external_wires(Y, y, source, 
1017  
-						    target_1, NULL, 
1018  
-						    NULL, NULL);
  1010
+						    target_1, NULL);
1019 1011
 				if(z<(DIM_SIZE[Z]-1)) 
1020 1012
 					target_1 = &grid[x][y][z+1];
1021 1013
 				else 
1022 1014
 					target_1 = &grid[x][y][0];
1023 1015
 				
1024 1016
 				_set_external_wires(Z, z, source, 
1025  
-						    target_1, NULL, 
1026  
-						    NULL, NULL);
  1017
+						    target_1, NULL);
1027 1018
 			}
1028 1019
 		}
1029 1020
 	}
@@ -1051,8 +1042,7 @@ static int _create_config_even(pa_node_t *grid)
1051 1042
 		target_1 = &grid[x+1];
1052 1043
 		
1053 1044
 		_set_external_wires(X, x, source, 
1054  
-				    target_1, NULL, 
1055  
-				    NULL, NULL);
  1045
+				    target_1, NULL);
1056 1046
 	}
1057 1047
 #endif
1058 1048
 	return 1;
@@ -1434,8 +1424,7 @@ static void _switch_config(pa_node_t* source, pa_node_t* target, int dim,
1434 1424
 }
1435 1425
 
1436 1426
 static void _set_external_wires(int dim, int count, pa_node_t* source, 
1437  
-		pa_node_t* target_1, pa_node_t* target_2, 
1438  
-		pa_node_t* target_first, pa_node_t* target_second)
  1427
+		pa_node_t* target_1, pa_node_t* target_2)
1439 1428
 {
1440 1429
 	_switch_config(source, source, dim, 0, 0);
1441 1430
 	_switch_config(source, source, dim, 1, 1);
@@ -1445,47 +1434,46 @@ static void _set_external_wires(int dim, int count, pa_node_t* source,
1445 1434
 		_switch_config(source, source, dim, 4, 4);			
1446 1435
 		return;
1447 1436
 	}
  1437
+
1448 1438
 	if(count==0) {
1449  
-		/* First Node */
  1439
+		/* First Even Node */
1450 1440
 		/* 4->3 of next */
1451 1441
 		_switch_config(source, target_1, dim, 4, 3);
1452  
-		/* 2->5 of next */
1453  
-		_switch_config(source, target_1, dim, 2, 5);
1454  
-		/* 3->4 of next even */
1455  
-		_switch_config(source, target_2, dim, 3, 4);
1456  
-		if(DIM_SIZE[dim]<4) {
1457  
-			/* 5->2 of next even */
1458  
-			_switch_config(source, target_2, dim, 5, 2);
1459  
-			
1460  
-		}
1461  
-			
  1442
+		/* 5->2 of next */
  1443
+		_switch_config(source, target_1, dim, 5, 2);
  1444
+		/* 2->5 of next even */
  1445
+		_switch_config(source, target_2, dim, 2, 5);	
  1446
+
1462 1447
 	} else if(!(count%2)) {
1463 1448
 		if(count<DIM_SIZE[dim]-2) {
1464 1449
 			/* Not Last Even Node */
1465  
-			/* 3->4 of next even */
1466  
-			_switch_config(source, target_2, dim, 3, 4);
1467  
-			/* 2->5 of next */
1468  
-			_switch_config(source, target_1, dim, 2, 5);
1469  
-			/* 5->2 of next */
1470  
-			_switch_config(source, target_1, dim, 5, 2);
  1450
+			/* 3->4 of next */
  1451
+			_switch_config(source, target_1, dim, 3, 4);
  1452
+			/* 4->3 of next */
  1453
+			_switch_config(source, target_1, dim, 4, 3);
  1454
+			/* 2->5 of next even */
  1455
+			_switch_config(source, target_2, dim, 2, 5);
  1456
+			/* 5->2 of next even */
  1457
+			_switch_config(source, target_2, dim, 5, 2);
  1458
+			
1471 1459
 		} else {
1472 1460
 			/* Last Even Node */
1473 1461
 			/* 3->4 of next */
1474 1462
 			_switch_config(source, target_1, dim, 3, 4);
1475  
-			/* 5->2 of next */
1476  
-			_switch_config(source, target_1, dim, 5, 2);
1477  
-			/* 2->5 of first */
1478  
-			_switch_config(source, target_first, dim, 2, 5);
  1463
+			/* 2->5 of previous */
  1464
+			/********** fix me: on the full system this is needed ******/ 
  1465
+			//_switch_config(source, target_1, dim, 2, 5);	
  1466
+			/********** fix me: not this ******/ 
  1467
+			_switch_config(source, target_1, dim, 4, 3);
1479 1468
 		}
1480 1469
 	} else {
1481 1470
 		if(count<DIM_SIZE[dim]-2) {
1482 1471
 			/* Not Last Odd Node */
1483  
-			/* 4->3 of next odd */
1484  
-			_switch_config(source, target_2, dim, 4, 3);
  1472
+			/* 5->2 of next odd */
  1473
+			_switch_config(source, target_2, dim, 5, 2);
1485 1474
 		} else {
1486 1475
 			/* Last Odd Node */
1487  
-			/* 5->2 of second */
1488  
-			_switch_config(source, target_second, dim, 5, 2);
  1476
+			/* nothing */
1489 1477
 		}	
1490 1478
 	}	
1491 1479
 }
@@ -1891,42 +1879,33 @@ int main(int argc, char** argv)
1891 1879
 	List results;
1892 1880
 //	List results2;
1893 1881
 //	int i,j;
1894  
-	DIM_SIZE[X]=8;
  1882
+	DIM_SIZE[X]=4;
1895 1883
 	DIM_SIZE[Y]=1;
1896 1884
 	DIM_SIZE[Z]=1;
1897 1885
 	pa_init(NULL);
1898  
-	loc = find_bp_loc("R171");
1899  
-	printf("The loc is %d%d%d\n",loc[X],loc[Y],loc[Z]);
1900  
-	if((loc = find_bp_loc("R178")))
1901  
-		printf("The loc is %d%d%d\n",loc[X],loc[Y],loc[Z]);
1902  
-	else
1903  
-		printf("This doesn't exsist!\n");
1904  
-	exit(0);
1905 1886
 	
1906  
-/* 	request->rotate = true; */
1907  
-/* 	request->elongate = true; */
1908  
-/* 	request->force_contig = true; */
1909  
-/* 	request->co_proc = true; */
1910  
-/* 	request->geometry[0]=-1; */
1911  
-
1912  
-	results = list_create(NULL);
1913  
-	request->geometry[0] = -1;
1914  
-	request->size = 1; //atoi(argv[1]);
1915  
-	request->conn_type = TORUS;
1916  
-	new_pa_request(request);
1917  
-	print_pa_request(request);
1918  
-	allocate_part(request, results);
  1887
+	
1919 1888
 
1920 1889
 	results = list_create(NULL);
1921  
-	request->geometry[0] = 5;
  1890
+	request->geometry[0] = 4;
1922 1891
 	request->geometry[1] = 1;
1923 1892
 	request->geometry[2] = 1;
1924  
-	request->size = -1; //atoi(argv[1]);
1925  
-	request->conn_type = MESH;
  1893
+	request->size = 4;
  1894
+	request->conn_type = TORUS;
1926 1895
 	new_pa_request(request);
1927 1896
 	print_pa_request(request);
1928 1897
 	allocate_part(request, results);
1929 1898
 
  1899
+	/* results = list_create(NULL); */
  1900
+/* 	request->geometry[0] = 5; */
  1901
+/* 	request->geometry[1] = 1; */
  1902
+/* 	request->geometry[2] = 1; */
  1903
+/* 	request->size = -1; //atoi(argv[1]); */
  1904
+/* 	request->conn_type = MESH; */
  1905
+/* 	new_pa_request(request); */
  1906
+/* 	print_pa_request(request); */
  1907
+/* 	allocate_part(request, results); */
  1908
+
1930 1909
 	int dim,j;
1931 1910
 	int x,y,z;
1932 1911
 	int startx=0;
@@ -1955,11 +1934,11 @@ int main(int argc, char** argv)
1955 1934
 			}
1956 1935
 		}
1957 1936
 	}
1958  
-	list_destroy(results);
  1937
+	/* list_destroy(results); */
1959 1938
 
1960  
-	pa_fini();
  1939
+/* 	pa_fini(); */
1961 1940
 
1962  
-	delete_pa_request(request);
  1941
+/* 	delete_pa_request(request); */
1963 1942
 	
1964 1943
 	return 0;
1965 1944
 }
133  src/plugins/select/bluegene/bgl_job_run.c
@@ -163,23 +163,47 @@ static int _remove_job(db_job_id_t job_id)
163 163
 /* Get the owner of an existing partition. Caller must xfree() return value. */
164 164
 static char *_get_part_owner(pm_partition_id_t bgl_part_id)
165 165
 {
166  
-	int rc;
  166
+	int rc, i, j, num_parts;
167 167
 	char *owner, *cur_owner;
168  
-	rm_partition_t * part_elem;
169  
-
170  
-	if ((rc = rm_get_partition(bgl_part_id,  &part_elem)) != STATUS_OK) {
171  
-		error("rm_get_partition(%s): %s", bgl_part_id, bgl_err_str(rc));
172  
-		return NULL;
173  
-	}
174  
-	if ((rc = rm_get_data(part_elem, RM_PartitionUserName, &owner)) != 
175  
-			STATUS_OK) {
176  
-		error("rm_get_data(RM_PartitionUserName): %s", bgl_err_str(rc));
177  
-		(void) rm_free_partition(part_elem);
178  
-		return NULL;
  168
+	rm_partition_t *part_ptr;
  169
+	rm_partition_list_t *part_list;
  170
+	
  171
+	for(i=2;i<6;i++) {
  172
+		if ((rc = rm_get_partitions_info(i, &part_list))
  173
+		    != STATUS_OK) {
  174
+			error("rm_get_partitions() errno=%s\n", 
  175
+			      bgl_err_str(rc));
  176
+			
  177
+		}
  178
+		rm_get_data(part_list, RM_PartListSize, &num_parts);
  179
+		for(j=0; j<num_parts; j++) {
  180
+			if(j)
  181
+				rm_get_data(part_list, RM_PartListNextPart, &part_ptr);
  182
+			else
  183
+				rm_get_data(part_list, RM_PartListFirstPart, &part_ptr);
  184
+			rm_get_data(part_ptr, RM_PartitionID, &owner);
  185
+			if(!strcasecmp(bgl_part_id, owner)) {
  186
+				rc = rm_get_data(part_ptr, RM_PartitionUserName, &owner);
  187
+				break;
  188
+			}
  189
+		}
  190
+		rm_free_partition_list(part_list);
  191
+		if(j<num_parts)
  192
+			break;
179 193
 	}
  194
+	/* if ((rc = rm_get_partition(bgl_part_id,  &part_ptr)) != STATUS_OK) { */
  195
+/* 		error("rm_get_partition(%s): %s", bgl_part_id, bgl_err_str(rc)); */
  196
+/* 		return NULL; */
  197
+/* 	} */
  198
+/* 	if ((rc = rm_get_data(part_ptr, RM_PartitionUserName, &owner)) !=  */
  199
+/* 			STATUS_OK) { */
  200
+/* 		error("rm_get_data(RM_PartitionUserName): %s", bgl_err_str(rc)); */
  201
+/* 		(void) rm_free_partition(part_ptr); */
  202
+/* 		return NULL; */
  203
+/* 	} */
180 204
 	cur_owner = xstrdup(owner);
181  
-	if ((rc = rm_free_partition(part_elem)) != STATUS_OK)
182  
-		error("rm_free_partition(): %s", bgl_err_str(rc));
  205
+	/* if ((rc = rm_free_partition(part_ptr)) != STATUS_OK) */
  206
+/* 		error("rm_free_partition(): %s", bgl_err_str(rc)); */
183 207
 	return cur_owner;
184 208
 }
185 209
 
@@ -187,7 +211,7 @@ static char *_get_part_owner(pm_partition_id_t bgl_part_id)
187 211
 static int _set_part_owner(pm_partition_id_t bgl_part_id, char *user)
188 212
 {
189 213
 	int rc;
190  
-	rm_partition_t * part_elem;
  214
+	rm_partition_t * part_ptr;
191 215
 	
192 216
 	if (user && user[0])
193 217
 		info("Setting partition %s owner to %s", bgl_part_id, user);
@@ -205,7 +229,7 @@ static int _set_part_owner(pm_partition_id_t bgl_part_id, char *user)
205 229
 	int err_ret = SLURM_SUCCESS;
206 230
 
207 231
 /* 	find the partition */
208  
-	if ((rc = rm_get_partition(bgl_part_id,  &part_elem)) != STATUS_OK) {
  232
+	if ((rc = rm_get_partition(bgl_part_id,  &part_ptr)) != STATUS_OK) {
209 233
 		error("rm_get_partition(%s): %s", bgl_part_id, bgl_err_str(rc));
210 234
 		return SLURM_ERROR;
211 235
 	}
@@ -218,47 +242,73 @@ static int _set_part_owner(pm_partition_id_t bgl_part_id, char *user)
218 242
 	}
219 243
 	
220 244
 
221  
-/* 	if ((rc = rm_set_data(part_elem, RM_PartitionUserName, &user)) */
  245
+/* 	if ((rc = rm_set_data(part_ptr, RM_PartitionUserName, &user)) */
222 246
 /* 			!= STATUS_OK) { */
223 247
 /* 		error("rm_set_date(%s, RM_PartitionUserName): %s", bgl_part_id, */
224 248
 /* 			bgl_err_str(rc)); */
225 249
 /* 		err_ret = SLURM_ERROR; */
226 250
 /* 	} */
227 251
 
228  
-	if ((rc = rm_free_partition(part_elem)) != STATUS_OK)
  252
+	if ((rc = rm_free_partition(part_ptr)) != STATUS_OK)
229 253
 		error("rm_free_partition(): %s", bgl_err_str(rc));
230 254
 
231 255
 	return err_ret;
232 256
 #else
233  
-	int i=0;
234  
-	rm_partition_state_t part_state;
  257
+	int i=0, j, num_parts;
  258
+	rm_partition_list_t *part_list;
  259
+	rm_partition_state_t state;
  260
+	rm_partition_state_flag_t part_state = 7;
  261
+	char *name;
  262
+	int is_ready=0;
235 263
 	/* Wait for partition state to be FREE */
236 264
 	for (i=0; i<MAX_POLL_RETRIES; i++) {
237 265
 		if (i > 0)
238 266
 			sleep(POLL_INTERVAL);
239 267
 
240  
-		/* find the partition */
241  
-		if ((rc = rm_get_partition(bgl_part_id,  &part_elem)) != 
242  
-				STATUS_OK) {
243  
-			error("rm_get_partition(%s): %s", bgl_part_id, 
  268
+		if ((rc = rm_get_partitions_info(part_state, &part_list))
  269
+		    != STATUS_OK) {
  270
+			error("rm_get_partitions() errno=%s\n", 
244 271
 				bgl_err_str(rc));
245  
-			return SLURM_ERROR;
  272
+			
246 273
 		}
247  
-
248  
-		/* find its state */
249  
-		rc = rm_get_data(part_elem, RM_PartitionState, &part_state);
250  
-		if (rc != STATUS_OK) {
251  
-			error("rm_get_data(RM_PartitionState): %s", 
252  
-				bgl_err_str(rc));
253  
-			(void) rm_free_partition(part_elem);
254  
-			return SLURM_ERROR;
  274
+		rm_get_data(part_list, RM_PartListSize, &num_parts);
  275
+		for(j=0; j<num_parts; j++) {
  276
+			if(j)
  277
+				rm_get_data(part_list, RM_PartListNextPart, &part_ptr);
  278
+			else
  279
+				rm_get_data(part_list, RM_PartListFirstPart, &part_ptr);
  280
+			rm_get_data(part_ptr, RM_PartitionID, &name);
  281
+			if(!strcasecmp(bgl_part_id, name)) {
  282
+				rc = rm_get_data(part_ptr, RM_PartitionState, &state);
  283
+				is_ready = 1;
  284
+				break;
  285
+			}
255 286
 		}
256  
-
257  
-		if ((rc = rm_free_partition(part_elem)) != STATUS_OK)
258  
-			error("rm_free_partition(): %s", bgl_err_str(rc));
259  
-
260  
-		if (part_state == RM_PARTITION_FREE)
  287
+		rm_free_partition_list(part_list);
  288
+		if (state == RM_PARTITION_FREE)
261 289
 			break;	/* partition is now free */
  290
+		/* /\* find the partition *\/ */
  291
+/* 		if ((rc = rm_get_partition(bgl_part_id,  &part_ptr)) !=  */
  292
+/* 				STATUS_OK) { */
  293
+/* 			error("rm_get_partition(%s): %s", bgl_part_id,  */
  294
+/* 				bgl_err_str(rc)); */
  295
+/* 			return SLURM_ERROR; */
  296
+/* 		} */
  297
+
  298
+/* 		/\* find its state *\/ */
  299
+/* 		rc = rm_get_data(part_ptr, RM_PartitionState, &part_state); */
  300
+/* 		if (rc != STATUS_OK) { */
  301
+/* 			error("rm_get_data(RM_PartitionState): %s",  */
  302
+/* 				bgl_err_str(rc)); */
  303
+/* 			(void) rm_free_partition(part_ptr); */
  304
+/* 			return SLURM_ERROR; */
  305
+/* 		} */
  306
+
  307
+/* 		if ((rc = rm_free_partition(part_ptr)) != STATUS_OK) */
  308
+/* 			error("rm_free_partition(): %s", bgl_err_str(rc)); */
  309
+
  310
+/* 		if (part_state == RM_PARTITION_FREE) */
  311
+/* 			break;	/\* partition is now free *\/ */
262 312
 
263 313
 		/* Destroy the partition, only on first pass */
264 314
 		if ((i == 0)
@@ -269,7 +319,12 @@ static int _set_part_owner(pm_partition_id_t bgl_part_id, char *user)
269 319
 		}
270 320
 	}
271 321
 
272  
-	if (part_state != RM_PARTITION_FREE) {
  322
+	/* if (part_state != RM_PARTITION_FREE) { */
  323
+/* 		error("Could not free partition %s", bgl_part_id); */
  324
+/* 		return SLURM_ERROR; */
  325
+/* 	} */
  326
+
  327
+	if (!is_ready) {
273 328
 		error("Could not free partition %s", bgl_part_id);
274 329
 		return SLURM_ERROR;
275 330
 	}
21  src/plugins/select/bluegene/bgl_switch_connections.c
@@ -108,7 +108,7 @@ static int _add_switch_conns(rm_switch_t* curr_switch, bgl_switch_t *bgl_switch)
108 108
 			}
109 109
 		}
110 110
 		conn.part_state = RM_PARTITION_READY;
111  
-			
  111
+		
112 112
 		if(firstconnect) {
113 113
 			rm_set_data(curr_switch, RM_SwitchFirstConnection, &conn);
114 114
 			firstconnect=0;
@@ -239,6 +239,7 @@ extern int configure_partition_switches(bgl_record_t * bgl_record)
239 239
 	char *name2;
240 240
 	rm_BP_t *curr_bp;
241 241
 	rm_switch_t *coord_switch[PA_SYSTEM_DIMENSIONS];
  242
+	rm_switch_t *curr_switch;
242 243
 	pa_switch_t *pa_switch;
243 244
 	char *bpid, *curr_bpid;
244 245
 	int found_bpid = 0;
@@ -324,23 +325,23 @@ extern int configure_partition_switches(bgl_record_t * bgl_record)
324 325
 		rm_get_data(curr_bp, RM_BPID, &bpid);
325 326
 				
326 327
 		rm_get_data(bgl, RM_SwitchNum, &switch_count);
327  
-		rm_get_data(bgl, RM_FirstSwitch,&coord_switch[X]);
  328
+		rm_get_data(bgl, RM_FirstSwitch,&curr_switch);
328 329
 		found_bpid = 0;
329 330
 		for (i=0; i<switch_count; i++) {
330  
-			rm_get_data(coord_switch[X], RM_SwitchBPID, &curr_bpid);
  331
+			rm_get_data(curr_switch, RM_SwitchBPID, &curr_bpid);
331 332
 			
332 333
 			if (!strcasecmp((char *)bpid, (char *)curr_bpid)) {
333  
-				found_bpid = 1;
334  
-				break;
  334
+				coord_switch[found_bpid] = curr_switch;
  335
+				found_bpid++;
  336
+				if(found_bpid==PA_SYSTEM_DIMENSIONS)
  337
+					break;
335 338
 			}
336 339
 			
337  
-			rm_get_data(bgl,RM_NextSwitch,&coord_switch[X]);
  340
+			rm_get_data(bgl,RM_NextSwitch,&curr_switch);
338 341
 		}
339 342
 	
340  
-		if(found_bpid) {
341  
-			rm_get_data(bgl,RM_NextSwitch,&coord_switch[Y]);
342  
-			rm_get_data(bgl,RM_NextSwitch,&coord_switch[Z]);
343  
-					
  343
+		if(found_bpid==PA_SYSTEM_DIMENSIONS) {
  344
+						
344 345
 			switch_itr = list_iterator_create(bgl_bp->switch_list);
345 346
 			while((bgl_switch = list_next(switch_itr)) != NULL) {
346 347
 				rm_get_data(coord_switch[bgl_switch->dim],
273  src/plugins/select/bluegene/bluegene.c
@@ -50,10 +50,12 @@ List bgl_list = NULL;			/* list of bgl_record entries */
50 50
 List bgl_curr_part_list = NULL;  	/* current bgl partitions */
51 51
 List bgl_found_part_list = NULL;  	/* found bgl partitions */
52 52
 char *bluegene_blrts = NULL, *bluegene_linux = NULL, *bluegene_mloader = NULL;
53  
-char *bluegene_ramdisk = NULL;
  53
+char *bluegene_ramdisk = NULL, *bridge_api_file = NULL;
54 54
 char *change_numpsets = NULL;
  55
+int numpsets;
55 56
 bool agent_fini = false;
56  
-
  57
+FILE *fp = NULL;
  58
+		
57 59
 /* some local functions */
58 60
 #ifdef HAVE_BGL
59 61
 static int  _addto_node_list(bgl_record_t *bgl_record, int *start, int *end);
@@ -63,15 +65,15 @@ static int  _validate_config_nodes(void);
63 65
 static int  _bgl_record_cmpf_inc(bgl_record_t* rec_a, bgl_record_t* rec_b);
64 66
 static int  _parse_bgl_spec(char *in_line);
65 67
 static void _process_nodes(bgl_record_t *bgl_record);
  68
+static int _reopen_bridge_log(int api_verb);
66 69
 
67 70
 /* Initialize all plugin variables */
68 71
 extern int init_bgl(void)
69 72
 {
70 73
 #ifdef HAVE_BGL_FILES
71 74
 	int rc;
72  
-	
73 75
 	rm_size3D_t bp_size;
74  
-
  76
+	
75 77
 	info("Attempting to contact MMCS");
76 78
 	if ((rc = rm_set_serial(BGL_SERIAL)) != STATUS_OK) {
77 79
 		fatal("init_bgl: rm_set_serial(): %s", bgl_err_str(rc));
@@ -142,6 +144,7 @@ extern void fini_bgl(void)
142 144
 	xfree(bluegene_linux);
143 145
 	xfree(bluegene_mloader);
144 146
 	xfree(bluegene_ramdisk);
  147
+	xfree(bridge_api_file);
145 148
 
146 149
 #ifdef HAVE_BGL_FILES
147 150
 	if(bgl)
@@ -367,25 +370,6 @@ extern int create_static_partitions(List part_list)
367 370
 			configure_partition(bgl_record);
368 371
 			print_bgl_record(bgl_record);
369 372
 			
370  
-/* 			found_record = (bgl_record_t*) xmalloc(sizeof(bgl_record_t)); */
371  
-/* 			list_push(bgl_list, found_record); */
372  
-			
373  
-/* 			found_record->bgl_part_list = bgl_record->bgl_part_list;			 */
374  
-/* 			found_record->hostlist = bgl_record->hostlist; */
375  
-/* 			found_record->nodes = xstrdup(bgl_record->nodes); */
376  
-				
377  
-/* 			found_record->bp_count = bgl_record->bp_count; */
378  
-/* 			found_record->switch_count = bgl_record->switch_count; */
379  
-/* 			found_record->geo[X] = bgl_record->geo[X]; */
380  
-/* 			found_record->geo[Y] = bgl_record->geo[Y]; */
381  
-/* 			found_record->geo[Z] = bgl_record->geo[Z]; */
382  
-			
383  
-/* 			found_record->conn_type = bgl_record->conn_type; */
384  
-/* 			found_record->bitmap = bgl_record->bitmap; */
385  
-/* 			found_record->node_use = SELECT_COPROCESSOR_MODE; */
386  
-/* 			configure_partition(found_record); */
387  
-/* 			/\*********************************************************\/ */
388  
-/* 			print_bgl_record(found_record); */
389 373
 #endif
390 374
 		}
391 375
 	}
@@ -469,43 +453,92 @@ extern int bgl_free_partition(pm_partition_id_t part_id)
469 453
 {
470 454
 #ifdef HAVE_BGL_FILES
471 455
 	rm_partition_state_t state;
472  
-	rm_partition_t *my_part;
473  
-	int rc;
474  
-
475  
-        if ((rc = rm_get_partition(part_id, &my_part))
  456
+	rm_partition_t *part_ptr;
  457
+	int rc, j, num_parts;
  458
+	rm_partition_list_t *part_list;
  459
+	rm_partition_state_flag_t part_state = 7;
  460
+	char *name;
  461
+		
  462
+	if ((rc = rm_get_partitions_info(part_state, &part_list))
476 463
 	    != STATUS_OK) {
477  
-		error("couldn't get the partition in bgl_free_partition");
478  
-	} else {
479  
-		rm_get_data(my_part, RM_PartitionState, &state);
480  
-		if(state != RM_PARTITION_FREE)
481  
-			pm_destroy_partition(part_id);
  464
+		error("rm_get_partitions() errno=%s\n", 
  465
+		      bgl_err_str(rc));
  466
+		
  467
+	}
  468
+	rm_get_data(part_list, RM_PartListSize, &num_parts);
  469
+	for(j=0; j<num_parts; j++) {
  470
+		if(j)
  471
+			rm_get_data(part_list, RM_PartListNextPart, &part_ptr);
  472
+		else
  473
+			rm_get_data(part_list, RM_PartListFirstPart, &part_ptr);
  474
+		rm_get_data(part_ptr, RM_PartitionID, &name);
  475
+		if(!strcasecmp(part_id, name)) {
  476
+			rc = rm_get_data(part_ptr, RM_PartitionState, &state);
  477
+			break;
  478
+		}
  479
+	}
  480
+	rm_free_partition_list(part_list);
  481
+	if(state != RM_PARTITION_FREE)
  482
+		pm_destroy_partition(part_id);
  483
+
  484
+	while ((state != RM_PARTITION_FREE)  
  485
+	       && (state != RM_PARTITION_ERROR)){
  486
+		sleep(3);
  487
+		if ((rc = rm_get_partitions_info(part_state, &part_list))
  488
+		    != STATUS_OK) {
  489
+			error("rm_get_partitions() errno=%s\n", 
  490
+			      bgl_err_str(rc));
482 491
 			
483  
-		rm_get_data(my_part, RM_PartitionState, &state);
484  
-		while ((state != RM_PARTITION_FREE) 
485  
-		       && (state != RM_PARTITION_ERROR)){
486  
-			debug(".");
487  
-			rc=rm_free_partition(my_part);
488  
-			if(rc!=STATUS_OK){
489  
-				error("Error freeing partition\n");
490  
-				return(-1);
491  
-			}
492  
-			sleep(3);
493  
-			rc=rm_get_partition(part_id,&my_part);
494  
-			if(rc!=STATUS_OK) {
495  
-				error("Error in GetPartition\n");
496  
-				return(-1);
497  
-			}
498  
-			rm_get_data(my_part, RM_PartitionState,
499  
-				    &state);
500 492
 		}
501  
-		//Free memory allocated to mypart
502  
-		rc=rm_free_partition(my_part);
503  
-		if(rc!=STATUS_OK){
504  
-			error("Error freeing partition\n");
505  
-			return(-1);
  493
+		rm_get_data(part_list, RM_PartListSize, &num_parts);
  494
+		for(j=0; j<num_parts; j++) {
  495
+			if(j)
  496
+				rm_get_data(part_list, RM_PartListNextPart, &part_ptr);
  497
+			else
  498
+				rm_get_data(part_list, RM_PartListFirstPart, &part_ptr);
  499
+			rm_get_data(part_ptr, RM_PartitionID, &name);
  500
+			if(!strcasecmp(part_id, name)) {
  501
+				rc = rm_get_data(part_ptr, RM_PartitionState, &state);
  502
+				break;
  503
+			}
506 504
 		}
507  
-		
  505
+		rm_free_partition_list(part_list);
508 506
 	}
  507
+	
  508
+        /* if ((rc = rm_get_partition(part_id, &part_ptr)) */
  509
+/* 	    != STATUS_OK) { */
  510
+/* 		error("couldn't get the partition in bgl_free_partition"); */
  511
+/* 	} else { */
  512
+/* 		rm_get_data(part_ptr, RM_PartitionState, &state); */
  513
+/* 		if(state != RM_PARTITION_FREE) */
  514
+/* 			pm_destroy_partition(part_id); */
  515
+			
  516
+/* 		rm_get_data(part_ptr, RM_PartitionState, &state); */
  517
+/* 		while ((state != RM_PARTITION_FREE)  */
  518
+/* 		       && (state != RM_PARTITION_ERROR)){ */
  519
+/* 			debug("."); */
  520
+/* 			rc=rm_free_partition(part_ptr); */
  521
+/* 			if(rc!=STATUS_OK){ */
  522
+/* 				error("Error freeing partition\n"); */
  523
+/* 				return(-1); */
  524
+/* 			} */
  525
+/* 			sleep(3); */
  526
+/* 			rc=rm_get_partition(part_id,&part_ptr); */
  527
+/* 			if(rc!=STATUS_OK) { */
  528
+/* 				error("Error in GetPartition\n"); */
  529
+/* 				return(-1); */
  530
+/* 			} */
  531
+/* 			rm_get_data(part_ptr, RM_PartitionState, */
  532
+/* 				    &state); */
  533
+/* 		} */
  534
+/* 		//Free memory allocated to mypart */
  535
+/* 		rc=rm_free_partition(part_ptr); */
  536
+/* 		if(rc!=STATUS_OK){ */
  537
+/* 			error("Error freeing partition\n"); */
  538
+/* 			return(-1); */
  539
+/* 		} */
  540
+		
  541
+/* 	} */
509 542
 #endif
510 543
 	return SLURM_SUCCESS;
511 544
 }
@@ -649,54 +682,31 @@ static int _delete_old_partitions(void)
649 682
 	ListIterator itr_curr, itr_found;
650 683
 	bgl_record_t *found_record, *init_record;
651 684
         pm_partition_id_t part_id;
652  
-	rm_partition_t *my_part;
653  
-	int part_number, lowest_part=300;
654  
-	char part_name[7];
655  
-			
  685
+	rm_partition_t *part_ptr;
  686
+	int part_number, part_count;
  687
+	char *part_name;
  688
+	rm_partition_list_t *part_list;
  689
+	rm_partition_state_flag_t state = 7;
  690
+
656 691
 	/******************************************************************/
657  
-	itr_curr = list_iterator_create(bgl_curr_part_list);
658  
-	while ((init_record = (bgl_record_t*) list_next(itr_curr))) {
659  
-		part_id=init_record->bgl_part_id;
660  
-		part_number = atoi(init_record->bgl_part_id+3);
661  
-		if(part_number<lowest_part)
662  
-			lowest_part = part_number;
  692
+	if ((rc = rm_get_partitions_info(state, &part_list))
  693
+	    != STATUS_OK) {
  694
+		error("rm_get_partitions(): %s",
  695
+		      bgl_err_str(rc));
  696
+		return SLURM_ERROR;
  697
+		
663 698
 	}
664  
-	list_iterator_destroy(itr_curr);
665  
-//	if(lowest_part != 101) {
666  
-	/* 	rm_get_partitions(RM_PARTITION_FREE, &part_list); */
667  
-/* 		rm_get_data(part_list, RM_PartListSize, &size); */
668  
-/* 		printf("This is the size %d\n",size); */
669  
-/* 		for(i=0;i<size;i++) { */
670  
-/* 			if(!i) */
671  
-/* 				rm_get_data(part_list, RM_PartListFirstPart, &my_part); */
672  
-/* 			else */
673  
-/* 				rm_get_data(part_list, RM_PartListNextPart, &my_part); */
674  
-/* 			rm_get_data(my_part, RM_PartListNextPart, &part_id); */
675  
-/* 			printf("this is the name %s\n",part_id); */
676  
-/* 			if(!strncasecmp("RMP",part_id,3)) { */
677  
-/* 				init_record = xmalloc(sizeof(bgl_record_t)); */
678  
-/* 				list_push(bgl_curr_part_list, init_record); */
679  
-/* 				init_record->bgl_part_id = xstrdup(part_id); */
680  
-/* 			} */
681  
-/* 			xfree(part_id); */
682  
-/* 			rm_free_partition(my_part);			 */
683  
-/* 		} */
684  
-/* 		exit(0); */
685  
-
686  
-	/* Here is where we clear all the partitions that exist. This will need to 
687  
-	   be taken out when we get better code from IBM.
688  
-	*/
689  
-	for(part_number=101; part_number<lowest_part; part_number++) {
690  
-		memset(part_name,0,7);
691  
-		sprintf(part_name, "RMP%d", part_number);
  699
+	
  700
+	rm_get_data(part_list, RM_PartListSize, &part_count);
  701
+	
  702
+	rm_get_data(part_list, RM_PartListFirstPart, &part_ptr);
  703
+	
  704
+	for(part_number=0; part_number<part_count; part_number++) {
  705
+		rm_get_data(part_ptr, RM_PartitionID, &part_name);
  706
+		if(strncmp("RMP",part_name,3))
  707
+			goto next_partition;
692 708
 		//debug("Checking if Partition %s is free",part_name);
693  
-		if ((rc = rm_get_partition(part_name, &my_part))
694  
-		    != STATUS_OK) {
695  
-			debug("Above error is ok. "
696  
-			      "Partition %s doesn't exist.",
697  
-			      part_name);
698  
-			continue;
699  
-		}
  709
+		
700 710
 		debug("removing the jobs on partition %s\n",
701 711
 		      (char *)part_name);
702 712
 		term_jobs_on_part(part_name);
@@ -706,11 +716,16 @@ static int _delete_old_partitions(void)
706 716
 		
707 717
 		rm_remove_partition(part_name);
708 718
 		debug("done\n");
  719
+	next_partition:
  720
+		/* if ((rc = rm_free_partition(part_ptr)) != STATUS_OK) { */
  721
+/* 		} */
  722
+		rm_get_data(part_list, RM_PartListNextPart, &part_ptr);
709 723
 		
710 724
 		//sleep(3);
711 725
 		//debug("Removed Freed Partition %s",part_name);
712 726
 	}
713  
-	
  727
+	rm_free_partition_list(part_list);
  728
+
714 729
 	/*************************************************/
715 730
 //	}
716 731
 	
@@ -768,6 +783,7 @@ extern int read_bgl_conf(void)
768 783
 	if (last_config_update
769 784
 	&&  (last_config_update == config_stat.st_mtime)) {
770 785
 		debug("bluegene.conf unchanged");
  786
+		_reopen_bridge_log(0);
771 787
 		return SLURM_SUCCESS;
772 788
 	}
773 789
 	last_config_update = config_stat.st_mtime; 
@@ -828,9 +844,11 @@ extern int read_bgl_conf(void)
828 844
 		fatal("MloaderImage not configured in bluegene.conf");
829 845
 	if (!bluegene_ramdisk)
830 846
 		fatal("RamDiskImage not configured in bluegene.conf");
831  
-	if (!change_numpsets)
832  
-		info("Warning: ChangeNumpsets not configured in bluegene.conf");
833  
-
  847
+	if (!bridge_api_file)
  848
+		fatal("BridgeAPILogFile not configured in bluegene.conf");
  849
+	if (!numpsets)
  850
+		info("Warning: Numpsets not configured in bluegene.conf");
  851
+	
834 852
 	/* Check to see if the configs we have are correct */
835 853
 	if (!_validate_config_nodes()) { 
836 854
 		_delete_old_partitions();
@@ -838,6 +856,7 @@ extern int read_bgl_conf(void)
838 856
 		 * partition deletions */
839 857
 		sleep(3);
840 858
 	}
  859
+	
841 860
 	/* looking for partitions only I created */
842 861
 	if (create_static_partitions(NULL)) {
843 862
 		/* error in creating the static partitions, so
@@ -848,6 +867,7 @@ extern int read_bgl_conf(void)
848 867
 		fatal("Error, could not create the static partitions");
849 868
 		return error_code;
850 869
 	}
  870
+	//printf("yeap\n");
851 871
 	return error_code;
852 872
 }
853 873
 
@@ -880,14 +900,17 @@ static int _parse_bgl_spec(char *in_line)
880 900
 	char *nodes = NULL, *conn_type = NULL, *node_use = NULL;
881 901
 	char *blrts_image = NULL,   *linux_image = NULL;
882 902
 	char *mloader_image = NULL, *ramdisk_image = NULL;
883  
-	char *change = NULL;
  903
+	char *api_file = NULL;
  904
+	int pset_num=8, api_verb=0;
884 905
 	bgl_record_t *bgl_record, *found_record;
885 906
 	
886 907
 	error_code = slurm_parser(in_line,
887 908
 				  "BlrtsImage=", 's', &blrts_image,
888 909
 				  "LinuxImage=", 's', &linux_image,
889 910
 				  "MloaderImage=", 's', &mloader_image,
890  
-				  "ChangeNumpsets=", 's', &change,
  911
+				  "Numpsets=", 'd', &pset_num,
  912
+				  "BridgeAPIVerbose=", 'd', &api_verb,
  913
+				  "BridgeAPILogFile=", 's', &api_file,
891 914
 				  "Nodes=", 's', &nodes,
892 915
 				  "RamDiskImage=", 's', &ramdisk_image,
893 916
 				  "Type=", 's', &conn_type,
@@ -900,31 +923,41 @@ static int _parse_bgl_spec(char *in_line)
900 923
 	/* Process system-wide info */
901 924
 	if (blrts_image) {
902 925
 		xfree(bluegene_blrts);
  926
+		_strip_13_10(blrts_image);
903 927
 		bluegene_blrts = blrts_image;
904 928
 		blrts_image = NULL;	/* nothing left to xfree */
905 929
 	}
906 930
 	if (linux_image) {
907 931
 		xfree(bluegene_linux);
  932
+		_strip_13_10(linux_image);
908 933
 		bluegene_linux = linux_image;
909 934
 		linux_image = NULL;	/* nothing left to xfree */
910 935
 	}
911 936
 	if (mloader_image) {
912 937
 		xfree(bluegene_mloader);
  938
+		_strip_13_10(mloader_image);
913 939
 		bluegene_mloader = mloader_image;
914 940
 		mloader_image = NULL;	/* nothing left to xfree */
915 941
 	}
916 942
 	if (ramdisk_image) {
917 943
 		xfree(bluegene_ramdisk);
  944
+		_strip_13_10(ramdisk_image);
918 945
 		bluegene_ramdisk = ramdisk_image;
919 946
 		ramdisk_image = NULL;	/* nothing left to xfree */
920 947
 	}
921  
-	if (change) {
922  
-		xfree(change_numpsets);
923  
-		_strip_13_10(change);
924  
-		change_numpsets = change;
925  
-		change = NULL;	/* nothing left to xfree */
  948
+	if (api_file) {
  949
+		xfree(bridge_api_file);
  950
+		_strip_13_10(api_file);
  951
+		bridge_api_file = api_file;
  952
+		api_file = NULL;	/* nothing left to xfree */
926 953
 	}
927  
-
  954
+	if (pset_num!=8) {
  955
+		numpsets = pset_num;
  956
+		
  957
+	}
  958
+	
  959
+	_reopen_bridge_log(api_verb);
  960
+	
928 961
 	/* Process node information */
929 962
 	if (!nodes && !conn_type)
930 963
 		goto cleanup;	/* no data */
@@ -963,6 +996,7 @@ static int _parse_bgl_spec(char *in_line)
963 996
 			bgl_record->node_use = SELECT_COPROCESSOR_MODE;
964 997
 		else
965 998
 			bgl_record->node_use = SELECT_VIRTUAL_NODE_MODE;
  999
+		bgl_record->partner = NULL;
966 1000
 	} else {
967 1001
 		/* If not then we will make both. */
968 1002
 
@@ -973,6 +1007,9 @@ static int _parse_bgl_spec(char *in_line)
973 1007
 		found_record = (bgl_record_t*) xmalloc(sizeof(bgl_record_t));
974 1008
 		list_push(bgl_list, found_record);
975 1009
 	
  1010
+		bgl_record->partner = found_record;
  1011
+		found_record->partner = bgl_record;
  1012
+		
976 1013
 		found_record->bgl_part_list = bgl_record->bgl_part_list;			
977 1014
 		found_record->hostlist = bgl_record->hostlist;
978 1015
 		found_record->nodes = xstrdup(bgl_record->nodes);
@@ -1103,3 +1140,15 @@ static void _process_nodes(bgl_record_t *bgl_record)
1103 1140
 	return;
1104 1141
 }
1105 1142
 
  1143
+static int _reopen_bridge_log(int api_verb)
  1144
+{
  1145
+	if(fp)
  1146
+		fclose(fp);
  1147
+	fp = fopen(bridge_api_file,"a");
  1148
+	if(fp == NULL) 
  1149
+		error("can't open file for bridgeapi.log");
  1150
+	else if(api_verb)
  1151
+		setSayMessageParams(fp, api_verb);
  1152
+		
  1153
+	return 1;
  1154
+}
10  src/plugins/select/bluegene/bluegene.h
@@ -60,8 +60,7 @@
60 60
 #include "bgl_job_run.h"
61 61
 #include "state_test.h"
62 62
 
63  
-#define PSETS_PER_BP 8
64  
-#define USER_NAME "nobody"
  63
+#define USER_NAME "slurm"
65 64
 
66 65
 /* Global variables */
67 66
 extern rm_BGL_t *bgl;
@@ -69,7 +68,8 @@ extern char *bluegene_blrts;
69 68
 extern char *bluegene_linux;
70 69
 extern char *bluegene_mloader;
71 70
 extern char *bluegene_ramdisk;
72  
-extern char *change_numpsets;
  71
+extern char *bridge_api_file;
  72
+extern int numpsets;
73 73
 extern pa_system_t *pa_system_ptr;
74 74
 extern int DIM_SIZE[PA_SYSTEM_DIMENSIONS];
75 75
 
@@ -80,7 +80,7 @@ extern bool agent_fini;
80 80
 typedef int lifecycle_type_t;
81 81
 enum part_lifecycle {DYNAMIC, STATIC};
82 82
 
83  
-typedef struct {
  83
+typedef struct bgl_record {
84 84
 	char *nodes;			/* String of nodes in partition */
85 85
 	char *owner_name;		/* Owner of partition		*/
86 86
 	pm_partition_id_t bgl_part_id;	/* ID returned from MMCS	*/
@@ -95,6 +95,7 @@ typedef struct {
95 95
 	int bp_count;                   /* size */
96 96
 	int switch_count;
97 97
 	bitstr_t *bitmap;
  98
+	struct bgl_record *partner;
98 99
 } bgl_record_t;
99 100
 
100 101
 typedef struct {
@@ -180,3 +181,4 @@ extern int configure_partition_switches(bgl_record_t * bgl_conf_record);
180 181
 extern int bgl_free_partition(pm_partition_id_t part_id);
181 182
 
182 183
 #endif /* _BLUEGENE_H_ */
  184
+ 
63  src/plugins/select/bluegene/partition_sys.c
@@ -89,8 +89,6 @@ static void _print_list(List list)
89 89
  */
90 90
 static void _pre_allocate(bgl_record_t *bgl_record)
91 91
 {
92  
-	int psets = (PSETS_PER_BP * bgl_record->bp_count);
93  
-
94 92
 	rm_set_data(bgl_record->bgl_part, RM_PartitionBlrtsImg,   
95 93
 		bluegene_blrts);
96 94
 	rm_set_data(bgl_record->bgl_part, RM_PartitionLinuxImg,   
@@ -103,7 +101,7 @@ static void _pre_allocate(bgl_record_t *bgl_record)
103 101
 		&bgl_record->conn_type);
104 102
 	rm_set_data(bgl_record->bgl_part, RM_PartitionMode, 
105 103
 		&bgl_record->node_use);
106  
-	rm_set_data(bgl_record->bgl_part, RM_PartitionPsetNum, &psets); 
  104
+	rm_set_data(bgl_record->bgl_part, RM_PartitionPsetsPerBP, &numpsets); 
107 105
 	rm_set_data(bgl_record->bgl_part, RM_PartitionUserName, USER_NAME);
108 106
 }
109 107
 
@@ -114,9 +112,10 @@ static int _post_allocate(bgl_record_t *bgl_record)
114 112
 {
115 113
 	int rc;
116 114
 	pm_partition_id_t part_id;
117  
-	char command[255];
  115
+	//char command[255];
118 116
 	/* Add partition record to the DB */
119 117
 	debug("adding partition\n");
  118
+	
120 119
 	rc = rm_add_partition(bgl_record->bgl_part);
121 120
 	if (rc != STATUS_OK) {
122 121
 		error("Error adding partition");
@@ -127,12 +126,12 @@ static int _post_allocate(bgl_record_t *bgl_record)
127 126
 	/* Get back the new partition id */
128 127
 	rm_get_data(bgl_record->bgl_part, RM_PartitionID, &part_id);
129 128
 	bgl_record->bgl_part_id = xstrdup(part_id);
130  
-	if (change_numpsets) {
131  
-		memset(command,0,255);
132  
-		sprintf(command,"%s %s", change_numpsets, part_id);
133  
-		info("%s",command);
134  
-		system(command);
135  
-	}
  129
+	/* if (change_numpsets) { */
  130
+/* 		memset(command,0,255); */
  131
+/* 		sprintf(command,"%s %s", change_numpsets, part_id); */
  132
+/* 		info("%s",command); */
  133
+/* 		system(command); */
  134
+/* 	} */
136 135
 	/* We are done with the partition */