Skip to content
Snippets Groups Projects
Commit d2d6eba9 authored by Moe Jette's avatar Moe Jette
Browse files

add is_cray_select_type() function. Patch from Gerrit.

parent 46ac56fa
No related branches found
No related tags found
No related merge requests found
...@@ -1665,6 +1665,20 @@ char *slurm_get_select_type(void) ...@@ -1665,6 +1665,20 @@ char *slurm_get_select_type(void)
return select_type; 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 /* slurm_get_switch_type
* get switch type from slurmctld_conf object * get switch type from slurmctld_conf object
* RET char * - switch type, MUST be xfreed by caller * RET char * - switch type, MUST be xfreed by caller
......
...@@ -557,6 +557,9 @@ char *slurm_get_sched_type(void); ...@@ -557,6 +557,9 @@ char *slurm_get_sched_type(void);
*/ */
char *slurm_get_select_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 /* slurm_get_switch_type
* get switch type from slurmctld_conf object * get switch type from slurmctld_conf object
* RET char * - switch type, MUST be xfreed by caller * RET char * - switch type, MUST be xfreed by caller
......
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