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

make scontrol update conn_type of a bluegene job

parent 71b4fc68
No related branches found
No related tags found
No related merge requests found
...@@ -143,12 +143,15 @@ task_dist_states_t verify_dist_type(const char *arg, uint32_t *plane_size) ...@@ -143,12 +143,15 @@ task_dist_states_t verify_dist_type(const char *arg, uint32_t *plane_size)
* verify that a connection type in arg is of known form * verify that a connection type in arg is of known form
* returns the connection_type or -1 if not recognized * returns the connection_type or -1 if not recognized
*/ */
int verify_conn_type(const char *arg) uint16_t verify_conn_type(const char *arg)
{ {
#ifdef HAVE_BG #ifdef HAVE_BG
int len = strlen(arg); uint16_t len = strlen(arg);
if(!len) {
if (!strncasecmp(arg, "MESH", len)) /* no input given */
error("no conn-type argument given.");
return (uint16_t)NO_VAL;
} else if (!strncasecmp(arg, "MESH", len))
return SELECT_MESH; return SELECT_MESH;
else if (!strncasecmp(arg, "TORUS", len)) else if (!strncasecmp(arg, "TORUS", len))
return SELECT_TORUS; return SELECT_TORUS;
...@@ -166,8 +169,8 @@ int verify_conn_type(const char *arg) ...@@ -166,8 +169,8 @@ int verify_conn_type(const char *arg)
return SELECT_HTC_L; return SELECT_HTC_L;
#endif #endif
#endif #endif
error("invalid --conn-type argument %s ignored.", arg); error("invalid conn-type argument '%s' ignored.", arg);
return NO_VAL; return (uint16_t)NO_VAL;
} }
/* /*
......
...@@ -69,7 +69,7 @@ void print_slurm_version(void); ...@@ -69,7 +69,7 @@ void print_slurm_version(void);
task_dist_states_t verify_dist_type(const char *arg, uint32_t *plane_size); task_dist_states_t verify_dist_type(const char *arg, uint32_t *plane_size);
/* verify the requested connection type */ /* verify the requested connection type */
int verify_conn_type(const char *arg); uint16_t verify_conn_type(const char *arg);
/* verify the requested geometry arguments */ /* verify the requested geometry arguments */
int verify_geometry(const char *arg, uint16_t *geometry); int verify_geometry(const char *arg, uint16_t *geometry);
......
...@@ -513,6 +513,11 @@ scontrol_update_job (int argc, char *argv[]) ...@@ -513,6 +513,11 @@ scontrol_update_job (int argc, char *argv[])
job_msg.rotate = rotate; job_msg.rotate = rotate;
update_cnt++; update_cnt++;
} }
else if (strncasecmp(tag, "Conn-Type", MAX(taglen, 2)) == 0) {
job_msg.conn_type = verify_conn_type(val);
if(job_msg.conn_type != (uint16_t)NO_VAL)
update_cnt++;
}
#endif #endif
else if (strncasecmp(tag, "Licenses", MAX(taglen, 1)) == 0) { else if (strncasecmp(tag, "Licenses", MAX(taglen, 1)) == 0) {
job_msg.licenses = val; job_msg.licenses = val;
......
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