diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c index 7578f2877e1fd2720c75f44e3b4061d405e3699d..c812dce83819c3cffb79dfe294f46746034e0e1b 100644 --- a/src/common/slurm_protocol_api.c +++ b/src/common/slurm_protocol_api.c @@ -1665,6 +1665,20 @@ char *slurm_get_select_type(void) return select_type; } +/** Return true if (remote) system runs Cray XT/XE */ +bool is_cray_select_type(void) +{ + bool result = false; + + if (slurmdbd_conf) { + } else { + slurm_ctl_conf_t *conf = slurm_conf_lock(); + result = strcasecmp(conf->select_type, "select/cray") == 0; + slurm_conf_unlock(); + } + return result; +} + /* slurm_get_switch_type * get switch type from slurmctld_conf object * RET char * - switch type, MUST be xfreed by caller diff --git a/src/common/slurm_protocol_api.h b/src/common/slurm_protocol_api.h index f93428b1c05a3d28eee6172531f9e17aae12d824..86268ce54e802f6152ae628aa0b32ce608d2fca7 100644 --- a/src/common/slurm_protocol_api.h +++ b/src/common/slurm_protocol_api.h @@ -557,6 +557,9 @@ char *slurm_get_sched_type(void); */ char *slurm_get_select_type(void); +/** Return true if (remote) system runs Cray XT/XE */ +bool is_cray_select_type(void); + /* slurm_get_switch_type * get switch type from slurmctld_conf object * RET char * - switch type, MUST be xfreed by caller