diff --git a/slurm/slurmdb.h b/slurm/slurmdb.h index 9833a468ef02e7c28301b120f71da577a6463990..4fdd46051b0e152c0a17217bbfad94fc4056d52d 100644 --- a/slurm/slurmdb.h +++ b/slurm/slurmdb.h @@ -176,6 +176,11 @@ typedef enum { #define CLUSTER_FLAG_FE 0x00000200 /* This cluster is a front end system */ #define CLUSTER_FLAG_CRAY_N 0x00000400 /* This cluster is a Native cray */ + +/* Cluster Combo flags */ +#define CLUSTER_FLAG_CRAY 0x00000500 /* This cluster is a cray. + Combo of CRAY_A | CRAY_N */ + /* Define assoc_mgr_association_usage_t below to avoid including * extraneous slurmdb headers */ #ifndef __assoc_mgr_association_usage_t_defined diff --git a/src/common/working_cluster.c b/src/common/working_cluster.c index 20d7668e3c548e4fc30205e668e3d9506feae4a0..8af72ca291bb032eddbf640931da599c1b360f64 100644 --- a/src/common/working_cluster.c +++ b/src/common/working_cluster.c @@ -72,8 +72,7 @@ extern int *slurmdb_setup_cluster_dim_size(void) extern bool is_cray_system(void) { if (working_cluster_rec) - return working_cluster_rec->flags & - (CLUSTER_FLAG_CRAY_A | CLUSTER_FLAG_CRAY_N); + return working_cluster_rec->flags & CLUSTER_FLAG_CRAY; #if defined HAVE_ALPS_CRAY || defined HAVE_NATIVE_CRAY return true; #endif diff --git a/src/smap/grid_functions.c b/src/smap/grid_functions.c index fd7432a3cb47795b5fa99e3b2269ff4af4668d69..fd540061849b58a9d1a88c0f5fbaecd2e3062f57 100644 --- a/src/smap/grid_functions.c +++ b/src/smap/grid_functions.c @@ -65,8 +65,7 @@ extern int *get_cluster_dims(node_info_msg_t *node_info_ptr) { int *dim_size = slurmdb_setup_cluster_dim_size(); - if ((params.cluster_flags & (CLUSTER_FLAG_CRAY_A | CLUSTER_FLAG_CRAY_N)) - && dim_size) { + if ((params.cluster_flags & CLUSTER_FLAG_CRAY) && dim_size) { static int cray_dim_size[3] = {-1, -1, -1}; /* For now, assume one node per coordinate all * May need to refine. */ @@ -214,9 +213,7 @@ extern void init_grid(node_info_msg_t *node_info_ptr, int cols) node_ptr->name[j] - '0'; j++; } - } else if (params.cluster_flags - & (CLUSTER_FLAG_CRAY_A | - CLUSTER_FLAG_CRAY_N)) { + } else if (params.cluster_flags & CLUSTER_FLAG_CRAY) { int len_a, len_h; len_a = strlen(node_ptr->node_addr); len_h = strlen(node_ptr->node_hostname); diff --git a/src/sview/grid.c b/src/sview/grid.c index 495dd70fb7a70832a375dc7b9356836a3907a30a..d30e07859276a206259a9a5414d13f8d9aab2ae4 100644 --- a/src/sview/grid.c +++ b/src/sview/grid.c @@ -554,8 +554,7 @@ static int *_get_cluster_dims(void) { int *my_dim_size = slurmdb_setup_cluster_dim_size(); - if ((cluster_flags & (CLUSTER_FLAG_CRAY_A | CLUSTER_FLAG_CRAY_N)) - && my_dim_size) { + if ((cluster_flags & CLUSTER_FLAG_CRAY) && my_dim_size) { static int cray_dim_size[3] = {-1, -1, -1}; /* For now, assume four nodes per coordinate all in * the same cage. Need to refine. */ @@ -606,8 +605,7 @@ static int _add_button_to_list(node_info_t *node_ptr, g_error("bad node name %s\n", node_ptr->name); return SLURM_ERROR; } - if (cluster_flags - & (CLUSTER_FLAG_CRAY_A | CLUSTER_FLAG_CRAY_N)) { + if (cluster_flags & CLUSTER_FLAG_CRAY) { len_a = strlen(node_ptr->node_addr); if (len_a < cluster_dims) { g_error("bad node addr %s\n", @@ -661,8 +659,7 @@ static int _add_button_to_list(node_info_t *node_ptr, } else if (cluster_dims == 3) { int x, y, z; if (node_ptr) { - if (cluster_flags - & (CLUSTER_FLAG_CRAY_A | CLUSTER_FLAG_CRAY_N)) { + if (cluster_flags & CLUSTER_FLAG_CRAY) { x = select_char2coord( node_ptr->node_addr[len_a-3]); y = select_char2coord(