diff --git a/src/common/gres.c b/src/common/gres.c index 6a2f6727d7568091d0fe8f0160958dc53a9735df..12f97024e916c3bdf5eec53597ec20d239ed1db5 100644 --- a/src/common/gres.c +++ b/src/common/gres.c @@ -542,7 +542,7 @@ static int _parse_gres_config(void **dest, slurm_parser_enum_t type, const char *line, char **leftover) { static s_p_options_t _gres_options[] = { - {"Count", S_P_UINT16}, /* Number of Gres available */ + {"Count", S_P_UINT32}, /* Number of Gres available */ {"CPUs", S_P_STRING}, /* CPUs to bind to Gres resource */ {"File", S_P_STRING}, /* Path to Gres device */ {NULL} @@ -565,10 +565,10 @@ static int _parse_gres_config(void **dest, slurm_parser_enum_t type, p = xmalloc(sizeof(gres_conf_t)); p->name = xstrdup(value); - if (!s_p_get_uint16(&p->count, "Count", tbl)) + if (!s_p_get_uint32(&p->count, "Count", tbl)) p->count = 1; if (s_p_get_string(&p->cpus, "CPUs", tbl)) { -//FIXME: change to bitmap, size? +//FIXME: change to bitmap, size? change from cpuset/numa to slurmctld format //bit_unfmt(bimap, p->cpus); } if (s_p_get_string(&p->file, "File", tbl)) { @@ -635,12 +635,7 @@ extern int gres_plugin_node_config_load(void) /* * Pack this node's gres configuration into a buffer - * - * Data format: - * uint32_t magic cookie - * uint32_t plugin_id name (must be unique) - * uint32_t gres data block size - * void * gres data packed by plugin + * IN/OUT buffer - message buffer to pack */ extern int gres_plugin_node_config_pack(Buf buffer) { @@ -673,8 +668,8 @@ extern int gres_plugin_node_config_pack(Buf buffer) } /* - * Unpack this node's configuration from a buffer - * IN buffer - message buffer to unpack + * Unpack this node's configuration from a buffer (build/packed by slurmd) + * IN/OUT buffer - message buffer to unpack * IN node_name - name of node whose data is being unpacked */ extern int gres_plugin_node_config_unpack(Buf buffer, char* node_name) diff --git a/src/common/gres.h b/src/common/gres.h index 171c49ebec8baad29a1a0a0054c691c7b194d3d9..051c7c85bf0eec4971507834f6dcf96a26495793 100644 --- a/src/common/gres.h +++ b/src/common/gres.h @@ -43,10 +43,11 @@ #include "src/common/pack.h" typedef struct gres_conf { - uint16_t count; + uint32_t count; char *cpus; char *file; char *name; + uint32_t plugin_id; } gres_conf_t; /* @@ -88,12 +89,13 @@ extern int gres_plugin_help_msg(char *msg, int msg_size); ************************************************************************** */ /* - * Load this node's configuration (i.e. how many resources it has) + * Load this node's configuration (how many resources it has, topology, etc.) */ extern int gres_plugin_node_config_load(void); /* - * Pack this node's configuration into a buffer + * Pack this node's gres configuration into a buffer + * IN/OUT buffer - message buffer to pack */ extern int gres_plugin_node_config_pack(Buf buffer); @@ -112,8 +114,8 @@ extern int gres_plugin_init_node_config(char *node_name, char *orig_config, List *gres_list); /* - * Unpack this node's configuration from a buffer - * IN buffer - message buffer to unpack + * Unpack this node's configuration from a buffer (build/packed by slurmd) + * IN/OUT buffer - message buffer to unpack * IN node_name - name of node whose data is being unpacked */ extern int gres_plugin_node_config_unpack(Buf buffer, char *node_name); diff --git a/src/plugins/gres/gpu/gres_gpu.c b/src/plugins/gres/gpu/gres_gpu.c index dc46e03c80b7f44259bd2d5131b816537ea1dc2a..a1b1b8cd70e378dc9d5eadbffe793b2114690c10 100644 --- a/src/plugins/gres/gpu/gres_gpu.c +++ b/src/plugins/gres/gpu/gres_gpu.c @@ -211,7 +211,7 @@ extern int node_config_load(List gres_conf_list) list_iterator_destroy(iter); if (rc != SLURM_SUCCESS) - error("%s failed to load configuration", plugin_name); + fatal("%s failed to load configuration", plugin_name); return rc; } diff --git a/src/plugins/gres/nic/gres_nic.c b/src/plugins/gres/nic/gres_nic.c index 66f592d649c0c71482f56e51e98f87b49b358689..f3142b2e6f7699cdff9e5904e745ecfea1483d1e 100644 --- a/src/plugins/gres/nic/gres_nic.c +++ b/src/plugins/gres/nic/gres_nic.c @@ -211,7 +211,7 @@ extern int node_config_load(List gres_conf_list) list_iterator_destroy(iter); if (rc != SLURM_SUCCESS) - error("%s failed to load configuration", plugin_name); + fatal("%s failed to load configuration", plugin_name); return rc; }