Hello, I use task/cgroup plugin. When I enabling ConstrainDevices=yes in cgroups.conf tasks refuses to run. The error is: sinfo: bitstring.c:238: bit_nclear: Assertion `(start) < ((b)[1])' failed.
The error occurs while calling gres_conf_lines = gres_plugin_node_config_devices_path(dev_path, gres_name, PATH_MAX); from src/plugins/task/cgroup/task_cgroup_devices.c. This function assumes that another function gres_plugin_node_config_load was called before. I've added gres_plugin_node_config_load call into task_cgroup_devices_init function and problem disappears. The patch is in attachment. Alexander Bersenev, Institute of Mathematics and Mechanics, Russia
--- slurm-2.3.1/src/plugins/task/cgroup/task_cgroup_devices.c 2011-10-24 23:15:42.000000000 +0600
+++ slurm-2.3.1_patched/src/plugins/task/cgroup/task_cgroup_devices.c 2011-12-02 17:21:25.055846044 +0600
@@ -83,6 +83,8 @@
{
char release_agent_path[PATH_MAX];
+ uint16_t cpunum;
+
/* initialize cpuinfo internal data */
if ( xcpuinfo_init() != XCPUINFO_SUCCESS )
return SLURM_ERROR;
@@ -95,6 +97,15 @@
release_agent_path[0] = '\0';
/* initialize allowed_devices_filename */
cgroup_allowed_devices_file[0] = '\0';
+
+ if(get_procs(&cpunum) != 0) {
+ error("task/cgroup: unable to get a number of CPU");
+ goto error;
+ }
+
+ (void) gres_plugin_node_config_load(cpunum);
strcpy(cgroup_allowed_devices_file, slurm_cgroup_conf->allowed_devices_file);
slurm.conf
Description: Binary data
gres.conf
Description: Binary data
cgroup.conf
Description: Binary data
