Permalink
Browse files

svn merge -r22111:22141 https://eris.llnl.gov/svn/slurm/branches/slur…

  • Loading branch information...
1 parent 130e80f commit e8e16e76a018e0a164b87a7628d9992737238b0c @dannyauble dannyauble committed Jan 20, 2011
View
2 trunk/NEWS
@@ -62,7 +62,7 @@ documents those changes that are of interest to users and admins.
-- BLUEGENE - more robust checking for states when freeing blocks.
-- Added correct files to the slurm.spec file for correct perl api rpm
creation.
-
+
* Changes in SLURM 2.2.0
========================
-- Change format of Duration field in "scontrol show reservation" output from
View
6 trunk/doc/man/man1/sacct.1
@@ -27,7 +27,11 @@ For the non\-root user, the \f3sacct\fP command limits the display of
job accounting data to jobs that were launched with their own user
identifier (UID) by default. Data for other users can be displayed
with the \f3\-\-all\fP, \f3\-\-user\fP, or \f3\-\-uid\fP options.
-.TP "10"
+.TP "7"
+\f3Note: \fP\c
+The content's of SLURM's database are maintained in lower case. This may
+result in some \f3sacct\fP output differing from that of other SLURM commands.
+.TP
\f3Note: \fP\c
Much of the data reported by \f3sacct\fP has been generated by
the \f2wait3()\fP and \f2getrusage()\fP system calls. Some systems
View
6 trunk/doc/man/man1/sacctmgr.1
@@ -24,6 +24,12 @@ The intended mode of operation is to initiate the \fBsacctmgr\fR command,
add, delete, modify, and/or list \fIassociation\fR records then
commit the changes and exit.
+.TP "7"
+\f3Note: \fP\c
+The content's of SLURM's database are maintained in lower case. This may
+result in some \f3sacctmgr\fP output differing from that of other SLURM
+commands.
+
.SH "OPTIONS"
.TP
View
29 trunk/src/plugins/select/bluegene/plugin/bg_job_place.c
@@ -729,6 +729,7 @@ static int _dynamically_request(List block_list, int *blocks_added,
List list_of_lists = NULL;
List temp_list = NULL;
List new_blocks = NULL;
+ List job_list = NULL, booted_list = NULL;
ListIterator itr = NULL;
int rc = SLURM_ERROR;
int create_try = 0;
@@ -746,20 +747,28 @@ static int _dynamically_request(List block_list, int *blocks_added,
if (SELECT_IS_PREEMPT_SET(query_mode)
&& SELECT_IS_CHECK_FULL_SET(query_mode)) {
list_append(list_of_lists, block_list);
- } else if (user_req_nodes)
- list_append(list_of_lists, bg_lists->job_running);
- else {
+ } else if (user_req_nodes) {
+ slurm_mutex_lock(&block_state_mutex);
+ job_list = copy_bg_list(bg_lists->job_running);
+ list_append(list_of_lists, job_list);
+ slurm_mutex_unlock(&block_state_mutex);
+ } else {
+ slurm_mutex_lock(&block_state_mutex);
list_append(list_of_lists, block_list);
if (list_count(block_list) != list_count(bg_lists->booted)) {
- list_append(list_of_lists, bg_lists->booted);
+ booted_list = copy_bg_list(bg_lists->booted);
+ list_append(list_of_lists, booted_list);
if (list_count(bg_lists->booted)
- != list_count(bg_lists->job_running))
- list_append(list_of_lists,
- bg_lists->job_running);
+ != list_count(bg_lists->job_running)) {
+ job_list = copy_bg_list(bg_lists->job_running);
+ list_append(list_of_lists, job_list);
+ }
} else if (list_count(block_list)
!= list_count(bg_lists->job_running)) {
- list_append(list_of_lists, bg_lists->job_running);
+ job_list = copy_bg_list(bg_lists->job_running);
+ list_append(list_of_lists, job_list);
}
+ slurm_mutex_unlock(&block_state_mutex);
}
itr = list_iterator_create(list_of_lists);
while ((temp_list = (List)list_next(itr))) {
@@ -838,6 +847,10 @@ static int _dynamically_request(List block_list, int *blocks_added,
if (list_of_lists)
list_destroy(list_of_lists);
+ if (job_list)
+ list_destroy(job_list);
+ if (booted_list)
+ list_destroy(booted_list);
return rc;
}
View
19 trunk/src/plugins/select/bluegene/plugin/bluegene.c
@@ -540,8 +540,9 @@ extern int bg_free_block(bg_record_t *bg_record, bool wait, bool locked)
}
}
#else
- bg_record->state = RM_PARTITION_FREE;
-// bg_record->state = RM_PARTITION_DEALLOCATING;
+// bg_record->state = RM_PARTITION_FREE;
+ if (bg_record->state != RM_PARTITION_FREE)
+ bg_record->state = RM_PARTITION_DEALLOCATING;
#endif
}
@@ -691,6 +692,13 @@ extern int free_block_list(uint32_t job_id, List track_in_list,
/* just incase things change */
track_cnt = list_count(track_list);
while ((bg_record = list_next(itr))) {
+#ifndef HAVE_BG_FILES
+ /* Fake a free since we are n deallocating
+ state before this.
+ */
+ if (retry_cnt >= 2)
+ bg_record->state = RM_PARTITION_FREE;
+#endif
if ((bg_record->state == RM_PARTITION_FREE)
|| (bg_record->state == RM_PARTITION_ERROR))
free_cnt++;
@@ -1655,6 +1663,13 @@ static void *_track_freeing_blocks(void *args)
/* just incase this changes from the update function */
track_cnt = list_count(track_list);
while ((bg_record = list_next(itr))) {
+#ifndef HAVE_BG_FILES
+ /* Fake a free since we are n deallocating
+ state before this.
+ */
+ if (retry_cnt >= 2)
+ bg_record->state = RM_PARTITION_FREE;
+#endif
if ((bg_record->state == RM_PARTITION_FREE)
|| (bg_record->state == RM_PARTITION_ERROR))
free_cnt++;
View
12 trunk/src/plugins/select/bluegene/plugin/dynamic_block.c
@@ -75,11 +75,20 @@ extern List create_dynamic_block(List block_list,
}
memset(&blockreq, 0, sizeof(blockreq_t));
- slurm_mutex_lock(&block_state_mutex);
if (my_block_list) {
reset_ba_system(track_down_nodes);
itr = list_iterator_create(my_block_list);
while ((bg_record = list_next(itr))) {
+ if (bg_record->magic != BLOCK_MAGIC) {
+ /* This should never happen since we
+ only call this on copies of blocks
+ and we check on this during the
+ copy.
+ */
+ error("create_dynamic_block: "
+ "got a block with bad magic?");
+ continue;
+ }
if (bg_record->free_cnt) {
if (bg_conf->slurm_debug_flags
& DEBUG_FLAG_BG_PICK) {
@@ -392,7 +401,6 @@ extern List create_dynamic_block(List block_list,
if (results)
list_destroy(results);
errno = rc;
- slurm_mutex_unlock(&block_state_mutex);
return new_blocks;
}
View
6 trunk/src/plugins/select/bluegene/plugin/state_test.c
@@ -574,6 +574,12 @@ extern int check_block_bp_states(char *bg_block_id, bool slurmctld_locked)
int i = 0;
bool small = false;
+ /* If no bg_record->bg_block_id we don't need to check this
+ since this block isn't really created.
+ */
+ if (!bg_block_id)
+ return SLURM_SUCCESS;
+
if ((rc = bridge_get_block(bg_block_id, &block_ptr)) != STATUS_OK) {
error("Block %s doesn't exist.", bg_block_id);
rc = SLURM_ERROR;

0 comments on commit e8e16e7

Please sign in to comment.