Skip to content
Snippets Groups Projects
Commit 76813950 authored by Danny Auble's avatar Danny Auble
Browse files

BGQ - complete check for different conn-type's

parent 38549907
No related branches found
No related tags found
No related merge requests found
...@@ -289,7 +289,12 @@ static bg_record_t *_find_matching_block(List block_list, ...@@ -289,7 +289,12 @@ static bg_record_t *_find_matching_block(List block_list,
bg_record_t *bg_record = NULL; bg_record_t *bg_record = NULL;
ListIterator itr = NULL; ListIterator itr = NULL;
char tmp_char[256]; char tmp_char[256];
int dim = 0;
#ifdef HAVE_BG_L_P
int conn_type_dims = 1;
#else
int conn_type_dims = SYSTEM_DIMENSIONS;
#endif
if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK)
info("number of blocks to check: %d state %d " info("number of blocks to check: %d state %d "
"asking for %u-%u cpus", "asking for %u-%u cpus",
...@@ -494,40 +499,50 @@ static bg_record_t *_find_matching_block(List block_list, ...@@ -494,40 +499,50 @@ static bg_record_t *_find_matching_block(List block_list,
/***********************************************/ /***********************************************/
/* check the connection type specified matches */ /* check the connection type specified matches */
/***********************************************/ /***********************************************/
if ((request->conn_type[0] != bg_record->conn_type[0]) for (dim=0; dim<conn_type_dims; dim++) {
&& (request->conn_type[0] != SELECT_NAV)) { if ((request->conn_type[dim]
!= bg_record->conn_type[dim])
&& (request->conn_type[dim] != SELECT_NAV)) {
#ifdef HAVE_BGP #ifdef HAVE_BGP
if (request->conn_type[0] >= SELECT_SMALL) { if (request->conn_type[0] >= SELECT_SMALL) {
/* we only want to reboot blocks if /* we only want to reboot blocks if
they have to be so skip booted they have to be so skip booted
blocks if in small state blocks if in small state
*/ */
if (check_image if (check_image
&& (bg_record->state && (bg_record->state
== BG_BLOCK_INITED)) { == BG_BLOCK_INITED)) {
*allow = 1; *allow = 1;
continue; break;
}
goto good_conn_type;
} else if (bg_record->conn_type[0]
>= SELECT_SMALL) {
/* since we already checked to see if
the cpus were good this means we are
looking for a block in a range that
includes small and regular blocks.
So we can just continue on.
*/
goto good_conn_type;
} }
goto good_conn_type;
} else if (bg_record->conn_type[0] >= SELECT_SMALL) {
/* since we already checked to see if
the cpus were good this means we are
looking for a block in a range that
includes small and regular blocks.
So we can just continue on.
*/
goto good_conn_type;
}
#endif #endif
if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) if (bg_conf->slurm_debug_flags
info("bg block %s conn-type not usable " & DEBUG_FLAG_BG_PICK)
"asking for %s bg_record is %s", info("bg block %s conn-type not usable "
bg_record->bg_block_id, "asking for %s bg_record is %s",
conn_type_string_full(request->conn_type), bg_record->bg_block_id,
conn_type_string_full( conn_type_string_full(
bg_record->conn_type)); request->conn_type),
continue; conn_type_string_full(
bg_record->conn_type));
break;
}
} }
if (dim != conn_type_dims)
continue;
#ifdef HAVE_BGP #ifdef HAVE_BGP
good_conn_type: good_conn_type:
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment