Index: branches/slurm-drmaa-1.2.0/slurm_drmaa/job.h
===================================================================
--- branches/slurm-drmaa-1.2.0/slurm_drmaa/job.h	(revision 27)
+++ branches/slurm-drmaa-1.2.0/slurm_drmaa/job.h	(revision 38)
@@ -43,6 +43,6 @@
 };
 
-void slurmdrmaa_job_create_req(fsd_drmaa_session_t *session, const fsd_template_t *jt, fsd_environ_t **envp, job_desc_msg_t * job_desc, int n_job );
-void slurmdrmaa_job_create(fsd_drmaa_session_t *session, const fsd_template_t *jt, fsd_environ_t **envp, fsd_expand_drmaa_ph_t *expand, job_desc_msg_t * job_desc, int n_job);
+void slurmdrmaa_job_create_req(fsd_drmaa_session_t *session, const fsd_template_t *jt, fsd_environ_t **envp, job_desc_msg_t * job_desc );
+void slurmdrmaa_job_create(fsd_drmaa_session_t *session, const fsd_template_t *jt, fsd_environ_t **envp, fsd_expand_drmaa_ph_t *expand, job_desc_msg_t * job_desc );
 
 #endif /* __SLURM_DRMAA__JOB_H */
Index: branches/slurm-drmaa-1.2.0/slurm_drmaa/session.c
===================================================================
--- branches/slurm-drmaa-1.2.0/slurm_drmaa/session.c	(revision 35)
+++ branches/slurm-drmaa-1.2.0/slurm_drmaa/session.c	(revision 38)
@@ -98,54 +98,53 @@
 	job_desc_msg_t job_desc;
 	submit_response_msg_t *submit_response = NULL;
+	job_info_msg_t *job_info = NULL;
+
+    /* zero out the struct, and set default vaules */
+	slurm_init_job_desc_msg( &job_desc );
 	
 	TRY
 	 {
-
+        unsigned i;
 		if( start != end )
 		 {
-			unsigned idx, i;
-
 			n_jobs = (end - start) / incr + 1;
 
 			fsd_calloc( job_ids, n_jobs+1, char* );
+			job_desc.array_inx = fsd_asprintf( "%d-%d:%d", start, end, incr );
+         }
 
-			for( idx = start, i = 0;  idx <= (unsigned)end;  idx += incr, i++ )
-			 {
-				connection_lock = fsd_mutex_lock( &self->drm_connection_mutex );
-				slurmdrmaa_job_create_req( self, jt, (fsd_environ_t**)&env , &job_desc, idx);
-				if(slurm_submit_batch_job(&job_desc,&submit_response)){
-					fsd_exc_raise_fmt(
-						FSD_ERRNO_INTERNAL_ERROR,"slurm_submit_batch_job: %s",slurm_strerror(slurm_get_errno()));
+		connection_lock = fsd_mutex_lock( &self->drm_connection_mutex );
+		slurmdrmaa_job_create_req( self, jt, (fsd_environ_t**)&env , &job_desc );
+		if(slurm_submit_batch_job(&job_desc,&submit_response)){
+			fsd_exc_raise_fmt(
+				FSD_ERRNO_INTERNAL_ERROR,"slurm_submit_batch_job: %s",slurm_strerror(slurm_get_errno()));
+		}
+
+		connection_lock = fsd_mutex_unlock( &self->drm_connection_mutex );
+
+		fsd_log_debug(("job %u submitted", submit_response->job_id));
+
+		if( start != end )
+		{
+			if ( SLURM_SUCCESS == slurm_load_job( &job_info, submit_response->job_id, 0) )
+			{
+				fsd_assert(  job_info->record_count == n_jobs );
+				for(i=0; i < job_info->record_count; i++)
+				{
+					job_ids[i] = fsd_asprintf( "%d", job_info->job_array[i].job_id);
+
+					job = slurmdrmaa_job_new( fsd_strdup(job_ids[i]) );
+					job->session = self;
+					job->submit_time = time(NULL);
+					self->jobs->add( self->jobs, job );
+					job->release( job );
+					job = NULL;
 				}
-
-				fsd_log_debug(("job %u submitted", submit_response->job_id));         
-				connection_lock = fsd_mutex_unlock( &self->drm_connection_mutex );
-
-				job_ids[i] = fsd_asprintf("%d",submit_response->job_id); /*TODO  */
-
-				job = slurmdrmaa_job_new( fsd_strdup(job_ids[i]) ); 
-				job->session = self;
-				job->submit_time = time(NULL);
-				self->jobs->add( self->jobs, job );
-				job->release( job );  
-				job = NULL;
-			 }
-			fsd_assert( i == n_jobs );
-		 }
-		else /* ! bulk */
-		 {
+			} else  {
+				fsd_exc_raise_fmt( FSD_ERRNO_INTERNAL_ERROR,"slurm_load_job: %s",slurm_strerror(slurm_get_errno()));
+			}
+		} else {
 			fsd_calloc( job_ids, n_jobs+1, char* );
 
-			connection_lock = fsd_mutex_lock( &self->drm_connection_mutex );
-			slurmdrmaa_job_create_req( self, jt, (fsd_environ_t**)&env , &job_desc, 0);
-			if(slurm_submit_batch_job(&job_desc,&submit_response)){
-				fsd_exc_raise_fmt(
-					FSD_ERRNO_INTERNAL_ERROR,"slurm_submit_batch_job: %s",slurm_strerror(slurm_get_errno()));
-			}
-
-			connection_lock = fsd_mutex_unlock( &self->drm_connection_mutex );
-
-			fsd_log_debug(("job %u submitted", submit_response->job_id));         
-			
 			job_ids[0] = fsd_asprintf( "%d", submit_response->job_id); /* .0*/
 
@@ -156,5 +155,5 @@
 			job->release( job );
 			job = NULL;
-		 }
+		}
 	 }
 	 ELSE
@@ -194,3 +193,2 @@
 	return job;
 }
-
Index: branches/slurm-drmaa-1.2.0/slurm_drmaa/job.c
===================================================================
--- branches/slurm-drmaa-1.2.0/slurm_drmaa/job.c	(revision 37)
+++ branches/slurm-drmaa-1.2.0/slurm_drmaa/job.c	(revision 38)
@@ -261,7 +261,5 @@
 		const fsd_template_t *jt,
 		fsd_environ_t **envp,
-		job_desc_msg_t * job_desc,
-		int n_job /* ~job_step */
-		)
+		job_desc_msg_t * job_desc)
 {
 	fsd_expand_drmaa_ph_t *volatile expand = NULL;
@@ -269,6 +267,6 @@
 	TRY
 	 {
-		expand = fsd_expand_drmaa_ph_new( NULL, NULL, fsd_asprintf("%d",n_job) );
-		slurmdrmaa_job_create( session, jt, envp, expand, job_desc, n_job);
+		expand = fsd_expand_drmaa_ph_new( NULL, NULL, fsd_strdup("%a") );
+		slurmdrmaa_job_create( session, jt, envp, expand, job_desc );
 	 }
 	EXCEPT_DEFAULT
@@ -308,6 +306,5 @@
 		fsd_environ_t **envp,
 		fsd_expand_drmaa_ph_t *expand, 
-		job_desc_msg_t * job_desc,
-		int n_job
+		job_desc_msg_t * job_desc
 		)
 {
@@ -326,8 +323,4 @@
 	const char *job_category = "default";
 	
-	slurmdrmaa_init_job_desc( job_desc );
-
-	slurm_init_job_desc_msg( job_desc );
-	
 	job_desc->user_id = getuid();
 	job_desc->group_id = getgid();
Index: branches/slurm-drmaa-1.2.0/slurm_drmaa/util.c
===================================================================
--- branches/slurm-drmaa-1.2.0/slurm_drmaa/util.c	(revision 37)
+++ branches/slurm-drmaa-1.2.0/slurm_drmaa/util.c	(revision 38)
@@ -168,4 +168,5 @@
 	fsd_free(job_desc->exc_nodes);
 	fsd_free(job_desc->gres);
+	fsd_free(job_desc->array_inx);
 	
 	fsd_log_return(( "" ));
