diff --git a/NEWS b/NEWS
index ecfde2e4e9a935cc665cf5a8f92c6274dbaf42ab..497dfb34ccdc986473b0dd5237a5e9ccd03a1464 100644
--- a/NEWS
+++ b/NEWS
@@ -106,6 +106,15 @@ documents those changes that are of interest to users and admins.
  -- Add support for new SchedulerParameters value of "bf_max_job_part", the
     maximum depth the backfill scheduler should go in any single partition.
  -- acct_gather/infiniband plugin - Correct packets_in/out values.
+ -- BLUEGENE - Don't ignore a conn-type request from the user.
+ -- BGQ - Force a request on a Q for a MESH to be a TORUS in a dimension that
+    can only be a TORUS (1).
+ -- Change max message length from 100MB to 1GB before generating "Insane
+    message length" error.
+ -- sched/backfill - Prevent possible memory corruption due to use of
+    bf_continue option and long running scheduling cycle (pending jobs could
+    have been cancelled and purged).
+ -- CRAY - fix AcceleratorAllocation depth correctly for basil 1.3
 
 * Changes in Slurm 2.6.2
 ========================
diff --git a/doc/html/publications.shtml b/doc/html/publications.shtml
index c58753148fd480fdb9410e3ecf7f093c55a2cd87..591de87441a4b87a2abc210a471e7a36e4aa0bb4 100644
--- a/doc/html/publications.shtml
+++ b/doc/html/publications.shtml
@@ -362,6 +362,10 @@ Morris Jette, Lawrence Livermore National Laboratory
 
 <ul>
 
+<li>Energy Accounting and Control with SLURM Resource and Job Management System,
+Yiannis Georgiou, et. al.
+(ICDCN 2014, January 2014)</li>
+
 <li>GreenSlot: Scheduling Energy Consumption in Green Datacenters,
 Inigo Goiri, et. al.
 (SuperComputing 2011, November 2011)</li>
@@ -410,6 +414,6 @@ Danny Auble of LLNL about SLURM.</p>
 Learning Chef: Compute Cluter with SLURM</a>
 A SLURM Cookbook by Adam DeConinck</p>
 
-<p style="text-align:center;">Last modified 25 September 2013</p>
+<p style="text-align:center;">Last modified 30 September 2013</p>
 
 <!--#include virtual="footer.txt"-->
diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5
index eaa413b1dda3571d82913eef635bdf28375d5502..5e6c6f86a756c53821d9ba23dcffe3ac269e54a4 100644
--- a/doc/man/man5/slurm.conf.5
+++ b/doc/man/man5/slurm.conf.5
@@ -1020,9 +1020,14 @@ The maximum number of jobs SLURM can have in its active database
 at one time. Set the values of \fBMaxJobCount\fR and \fBMinJobAge\fR
 to insure the slurmctld daemon does not exhaust its memory or other
 resources. Once this limit is reached, requests to submit additional
-jobs will fail. The default value is 10000 jobs. This value may not
-be reset via "scontrol reconfig". It only takes effect upon restart
-of the slurmctld daemon.
+jobs will fail. The default value is 10000 jobs.
+Performance can suffer with more than a couple hundred thousand jobs.
+Setting per MaxSubmitJobs per user is generally valuable to prevent a single
+user from filling the system with jobs.
+This is accomplished using Slurm's database and configuring enforcement of
+resource limits.
+This value may not be reset via "scontrol reconfig".
+It only takes effect upon restart of the slurmctld daemon.
 
 .TP
 \fBMaxJobId\fR
diff --git a/src/common/proc_args.c b/src/common/proc_args.c
index f4ab279c78f11296da898031f46ce11634f394a9..b65fa5385978e118dae278f1e3084196489eeac9 100644
--- a/src/common/proc_args.c
+++ b/src/common/proc_args.c
@@ -834,8 +834,8 @@ char *print_geometry(const uint16_t *geometry)
 	char buf[32], *rc = NULL;
 	int dims = slurmdb_setup_cluster_dims();
 
-	if ((dims == 0)
-	||  (geometry[0] == (uint16_t)NO_VAL))
+	if ((dims == 0) || !geometry[0]
+	    ||  (geometry[0] == (uint16_t)NO_VAL))
 		return NULL;
 
 	for (i=0; i<dims; i++) {
diff --git a/src/common/slurm_protocol_socket_implementation.c b/src/common/slurm_protocol_socket_implementation.c
index 90c4659f9d0fba8cd660c821022993e29c1955f5..04de75e1b3caff5fd27642bba14264fbb64f6c0d 100644
--- a/src/common/slurm_protocol_socket_implementation.c
+++ b/src/common/slurm_protocol_socket_implementation.c
@@ -88,7 +88,7 @@
  *  Maximum message size. Messages larger than this value (in bytes)
  *  will not be received.
  */
-#define MAX_MSG_SIZE     (128*1024*1024)
+#define MAX_MSG_SIZE     (1024*1024*1024)
 
 /****************************************************************
  * MIDDLE LAYER MSG FUNCTIONS
diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c
index 7f878788a456b67e3e3332d383ebdd0b90547100..f7936591e1c83e4be19bbaf4132ad4a0ecb42c0f 100644
--- a/src/plugins/sched/backfill/backfill.c
+++ b/src/plugins/sched/backfill/backfill.c
@@ -639,12 +639,7 @@ static int _attempt_backfill(void)
 	}
 	while ((job_queue_rec = (job_queue_rec_t *)
 				list_pop_bottom(job_queue, sort_job_queue2))) {
-		job_ptr  = job_queue_rec->job_ptr;
-		orig_time_limit = job_ptr->time_limit;
-
 		if ((time(NULL) - sched_start) >= sched_timeout) {
-			uint32_t save_time_limit = job_ptr->time_limit;
-			job_ptr->time_limit = orig_time_limit;
 			if (debug_flags & DEBUG_FLAG_BACKFILL) {
 				END_TIMER;
 				info("backfill: completed yielding locks "
@@ -660,13 +655,19 @@ static int _attempt_backfill(void)
 				rc = 1;
 				break;
 			}
-			job_ptr->time_limit = save_time_limit;
 			/* Reset backfill scheduling timers, resume testing */
 			sched_start = time(NULL);
 			job_test_count = 0;
 			START_TIMER;
 		}
 
+		job_ptr  = job_queue_rec->job_ptr;
+		/* With bf_continue configured, the original job could have
+		 * been cancelled and purged. Validate pointer here. */
+		if ((job_ptr->magic  != JOB_MAGIC) ||
+		    (job_ptr->job_id != job_queue_rec->job_id))
+			continue;
+		orig_time_limit = job_ptr->time_limit;
 		part_ptr = job_queue_rec->part_ptr;
 		job_test_count++;
 
diff --git a/src/plugins/select/alps/libalps/parser_basil_5.1.c b/src/plugins/select/alps/libalps/parser_basil_5.1.c
index 3f1602d7fdd85de07348d65e9b103bb2480e13a3..376bed49ec447c04250ff38fb05608746291ffc0 100644
--- a/src/plugins/select/alps/libalps/parser_basil_5.1.c
+++ b/src/plugins/select/alps/libalps/parser_basil_5.1.c
@@ -231,7 +231,7 @@ const struct element_handler basil_5_1_elements[] = {
 	},
 	[BT_ACCELALLOC]	= {
 			.tag	= "AcceleratorAllocation",
-			.depth	= 5,
+			.depth	= 7,
 			.uniq	= false,
 			.hnd	= eh_accel_alloc
 	},
diff --git a/src/plugins/select/bluegene/bg_job_info.c b/src/plugins/select/bluegene/bg_job_info.c
index 7ff9995030e05c4c237c461b7a1cb0adcc23909d..3266a33fccc4f10fc77534915a1851b4141592ba 100644
--- a/src/plugins/select/bluegene/bg_job_info.c
+++ b/src/plugins/select/bluegene/bg_job_info.c
@@ -143,12 +143,17 @@ extern int set_select_jobinfo(select_jobinfo_t *jobinfo,
 	case SELECT_JOBDATA_GEOMETRY:
 		new_size = 1;
 		for (i=0; i<jobinfo->dim_cnt; i++) {
+			/* If geo[i] is NO_VAL then we know this
+			   doesn't need to be reset.
+			*/
+			if (jobinfo->geometry[i] != (uint16_t) NO_VAL) {
+				/* Make sure the conn type is correct with the
+				 * new count (if Geometry is requested it
+				 * can't be small) */
+				jobinfo->conn_type[i] =	SELECT_NAV;
+			}
 			jobinfo->geometry[i] = uint16[i];
 			new_size *= uint16[i];
-			/* Make sure the conn type is correct with the
-			 * new count (if Geometry is requested it
-			 * can't be small) */
-			jobinfo->conn_type[i] =	SELECT_NAV;
 		}
 
 		break;
diff --git a/src/plugins/select/bluegene/bg_job_place.c b/src/plugins/select/bluegene/bg_job_place.c
index a15d31edcb27ccb4f5cecc8189e9d34101e8407c..7e393ed7d6b2cdbe34f5b2b9d0ad8d9e6235d5f5 100644
--- a/src/plugins/select/bluegene/bg_job_place.c
+++ b/src/plugins/select/bluegene/bg_job_place.c
@@ -602,6 +602,17 @@ static bg_record_t *_find_matching_block(List block_list,
 					*/
 					goto good_conn_type;
 				}
+#ifndef HAVE_BG_L_P
+				else if ((bg_record->geo[dim] == 1)
+					 && (request->conn_type[dim]
+					     == SELECT_MESH)) {
+					/* On a BGQ system a dim only
+					   1 long must be a TORUS, so
+					   ignore a requested MESH.
+					*/
+					goto good_conn_type;
+				}
+#endif
 
 				if (bg_conf->slurm_debug_flags
 				    & DEBUG_FLAG_BG_PICK) {
diff --git a/src/salloc/opt.c b/src/salloc/opt.c
index 1f2ac353d7d437f8b22da2df618355166eebbea7..9d571138468f23d5c6ac32a849faf3821ed855f6 100644
--- a/src/salloc/opt.c
+++ b/src/salloc/opt.c
@@ -348,7 +348,7 @@ static void _opt_default()
 
 	for (i=0; i<HIGHEST_DIMENSIONS; i++) {
 		opt.conn_type[i]    = (uint16_t) NO_VAL;
-		opt.geometry[i]	    = (uint16_t) NO_VAL;
+		opt.geometry[i]	    = 0;
 	}
 	opt.reboot          = false;
 	opt.no_rotate	    = false;
@@ -1724,7 +1724,6 @@ static char *print_constraints()
 
 static void _opt_list(void)
 {
-	int i;
 	char *str;
 
 	info("defined options for program `%s'", opt.progname);
@@ -1779,10 +1778,10 @@ static void _opt_list(void)
 	str = print_constraints();
 	info("constraints    : %s", str);
 	xfree(str);
-	for (i = 0; i < HIGHEST_DIMENSIONS; i++) {
-		if (opt.conn_type[i] == (uint16_t) NO_VAL)
-			break;
-		info("conn_type[%d]   : %u", i, opt.conn_type[i]);
+	if (opt.conn_type[0] != (uint16_t) NO_VAL) {
+		str = conn_type_string_full(opt.conn_type);
+		info("conn_type      : %s", str);
+		xfree(str);
 	}
 	str = print_geometry(opt.geometry);
 	info("geometry       : %s", str);
diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c
index 5ca0daa6f2c0f09dcd874c0150eae673609c3203..b5b639f3264cb1627a57073a73e54ab89bc1ceef 100644
--- a/src/sbatch/opt.c
+++ b/src/sbatch/opt.c
@@ -359,7 +359,7 @@ static void _opt_default()
 
 	for (i=0; i<HIGHEST_DIMENSIONS; i++) {
 		opt.conn_type[i]    = (uint16_t) NO_VAL;
-		opt.geometry[i]	    = (uint16_t) NO_VAL;
+		opt.geometry[i]	    = 0;
 	}
 	opt.reboot          = false;
 	opt.no_rotate	    = false;
@@ -2751,7 +2751,6 @@ static void _fullpath(char **filename, const char *cwd)
 
 static void _opt_list(void)
 {
-	int i;
 	char *str;
 
 	info("defined options for program `%s'", opt.progname);
@@ -2807,10 +2806,10 @@ static void _opt_list(void)
 	str = print_constraints();
 	info("constraints       : %s", str);
 	xfree(str);
-	for (i = 0; i < HIGHEST_DIMENSIONS; i++) {
-		if (opt.conn_type[i] == (uint16_t) NO_VAL)
-			break;
-		info("conn_type[%d]    : %u", i, opt.conn_type[i]);
+	if (opt.conn_type[0] != (uint16_t) NO_VAL) {
+		str = conn_type_string_full(opt.conn_type);
+		info("conn_type      : %s", str);
+		xfree(str);
 	}
 	str = print_geometry(opt.geometry);
 	info("geometry          : %s", str);
diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c
index f7b09ef32c7f1a0facc490c382e28e427126d229..094a835920f0675767e780c45bfe1daf2723587c 100644
--- a/src/slurmctld/job_scheduler.c
+++ b/src/slurmctld/job_scheduler.c
@@ -140,6 +140,7 @@ static void _job_queue_append(List job_queue, struct job_record *job_ptr,
 	job_queue_rec_t *job_queue_rec;
 
 	job_queue_rec = xmalloc(sizeof(job_queue_rec_t));
+	job_queue_rec->job_id   = job_ptr->job_id;
 	job_queue_rec->job_ptr  = job_ptr;
 	job_queue_rec->part_ptr = part_ptr;
 	job_queue_rec->priority = prio;
diff --git a/src/slurmctld/job_scheduler.h b/src/slurmctld/job_scheduler.h
index 4f7941f5618ad718fb44f2f058af19a32d0264c9..37d654a6a362c3d73c88c6f1c08bad8ef129ec71 100644
--- a/src/slurmctld/job_scheduler.h
+++ b/src/slurmctld/job_scheduler.h
@@ -45,6 +45,7 @@
 #include "src/slurmctld/slurmctld.h"
 
 typedef struct job_queue_rec {
+	uint32_t job_id;
 	struct job_record *job_ptr;
 	struct part_record *part_ptr;
 	uint32_t priority;
diff --git a/src/srun/libsrun/opt.c b/src/srun/libsrun/opt.c
index 46e0a2e737de0f610aaee53c9619eae12f6a040f..6e37866ebf998c2738e3c6c0975df51775df6ec6 100644
--- a/src/srun/libsrun/opt.c
+++ b/src/srun/libsrun/opt.c
@@ -478,7 +478,7 @@ static void _opt_default()
 
 	for (i=0; i<HIGHEST_DIMENSIONS; i++) {
 		opt.conn_type[i]    = (uint16_t) NO_VAL;
-		opt.geometry[i]	    = (uint16_t) NO_VAL;
+		opt.geometry[i]	    = 0;
 	}
 	opt.reboot          = false;
 	opt.no_rotate	    = false;
@@ -2264,7 +2264,6 @@ static char *print_constraints()
 
 static void _opt_list(void)
 {
-	int i;
 	char *str;
 
 	info("defined options for program `%s'", opt.progname);
@@ -2340,10 +2339,10 @@ static void _opt_list(void)
 	str = print_constraints();
 	info("constraints    : %s", str);
 	xfree(str);
-	for (i = 0; i < HIGHEST_DIMENSIONS; i++) {
-		if (opt.conn_type[i] == (uint16_t) NO_VAL)
-			break;
-		info("conn_type[%d]    : %u", i, opt.conn_type[i]);
+	if (opt.conn_type[0] != (uint16_t) NO_VAL) {
+		str = conn_type_string_full(opt.conn_type);
+		info("conn_type      : %s", str);
+		xfree(str);
 	}
 	str = print_geometry(opt.geometry);
 	info("geometry       : %s", str);