diff --git a/src/plugins/select/bluegene/plugin/bg_job_place.c b/src/plugins/select/bluegene/plugin/bg_job_place.c index 6c3efb7cac3f5eee651188b19f4fb2dfa9f966a9..824a6cce291c693f28209f106f882d1ec877a102 100644 --- a/src/plugins/select/bluegene/plugin/bg_job_place.c +++ b/src/plugins/select/bluegene/plugin/bg_job_place.c @@ -351,7 +351,8 @@ static bg_record_t *_find_matching_block(List block_list, */ debug3("%s job_running = %d", bg_record->bg_block_id, bg_record->job_running); - /*block is messed up some how (BLOCK_ERROR_STATE) ignore it*/ + /*block is messed up some how (BLOCK_ERROR_STATE) + * ignore it or if state == RM_PARTITION_ERROR */ if((bg_record->job_running == BLOCK_ERROR_STATE) || (bg_record->state == RM_PARTITION_ERROR)) { debug("block %s is in an error state (can't use)", @@ -603,9 +604,12 @@ static int _check_for_booted_overlapping_blocks( } } - if(found_record->job_running != NO_JOB_RUNNING) { - if(found_record->job_running - == BLOCK_ERROR_STATE) + if((found_record->job_running != NO_JOB_RUNNING) + || (found_record->state == RM_PARTITION_ERROR)) { + if((found_record->job_running + == BLOCK_ERROR_STATE) + || (found_record->state + == RM_PARTITION_ERROR)) error("can't use %s, " "overlapping block %s " "is in an error state.", diff --git a/src/sreport/cluster_reports.c b/src/sreport/cluster_reports.c index d7c3e0055f4065513a724587ca6214880a6a7ab1..f404a54a692fe344ab1d11dd971743008bba0427 100644 --- a/src/sreport/cluster_reports.c +++ b/src/sreport/cluster_reports.c @@ -117,8 +117,6 @@ static int _set_wckey_cond(int *start, int argc, char *argv[], set = 1; } else if(!end || !strncasecmp (argv[i], "WCKeys", - MAX(command_len, 3)) - || !strncasecmp (argv[i], "Names", MAX(command_len, 3))) { if(!wckey_cond->name_list) wckey_cond->name_list = @@ -320,8 +318,6 @@ static int _set_cluster_cond(int *start, int argc, char *argv[], local_cluster_flag = 1; } else if(!end || !strncasecmp (argv[i], "Clusters", - MAX(command_len, 1)) - || !strncasecmp (argv[i], "Names", MAX(command_len, 1))) { slurm_addto_char_list(cluster_cond->cluster_list, argv[i]+end); diff --git a/src/sreport/sreport.c b/src/sreport/sreport.c index 1bc7a3dae9ed39161a9f520a8cc07fe9799dacd8..d8140e8eaa5f7b1c5dba855e665779a51473d349 100644 --- a/src/sreport/sreport.c +++ b/src/sreport/sreport.c @@ -76,7 +76,7 @@ main (int argc, char *argv[]) int error_code = SLURM_SUCCESS, i, opt_char, input_field_count; char **input_fields; log_options_t opts = LOG_OPTS_STDERR_ONLY ; - + char *temp = NULL; int option_index; static struct option long_options[] = { {"all_clusters", 0, 0, 'a'}, @@ -100,6 +100,20 @@ main (int argc, char *argv[]) quiet_flag = 0; log_init("sreport", opts, SYSLOG_FACILITY_DAEMON, NULL); + /* Check to see if we are running a supported accounting plugin */ + temp = slurm_get_accounting_storage_type(); + if(strcasecmp(temp, "accounting_storage/slurmdbd") + && strcasecmp(temp, "accounting_storage/mysql")) { + fprintf (stderr, "You are not running a supported " + "accounting_storage plugin\n(%s).\n" + "Only 'accounting_storage/slurmdbd' " + "and 'accounting_storage/mysql' are supported.\n", + temp); + xfree(temp); + exit(1); + } + xfree(temp); + while((opt_char = getopt_long(argc, argv, "ahnpPqs:t:vV", long_options, &option_index)) != -1) { switch (opt_char) { @@ -618,7 +632,7 @@ sreport [<OPTION>] [<COMMAND>] \n\ - Start=<OPT> - Period start for report. \n\ Default is 00:00:00 of previous day. \n\ \n\ - cluster - Names=<OPT> - List of clusters to include in report \n\ + cluster - Clusters=<OPT> - List of clusters to include in report \n\ Default is local cluster. \n\ - Tree - When used with the AccountUtilizationByUser\n\ report will span the accounts as they \n\