#define WRAPGAUGE(x) ((value_t){.gauge = (gauge_t)(x)})
static const char *config_keys[] = {
- "GPUIndex",
- "IgnoreSelected",
+ "GPUIndex", "IgnoreSelected",
};
static const unsigned int n_config_keys = STATIC_ARRAY_SIZE(config_keys);
if (strcasecmp(key, config_keys[0]) == 0) {
device_ix = strtoul(value, &eptr, 10);
if (eptr == value) {
+ ERROR("Failed to parse GPUIndex value \"%s\"", value);
return -1;
}
- if (device_ix > 64) {
+ if (device_ix >= 64) {
+ ERROR("At most 64 GPUs (0 <= GPUIndex < 64) are supported!");
return -2;
}
conf_match_mask |= (1 << device_ix);
if
IS_TRUE(value) { conf_mask_is_exclude = 1; }
} else {
+ ERROR("Unrecognized config option %s", key);
return -10;
}
return 0;
- // Failures here indicate serious misconfiguration; we bail out totally.
+// Failures here indicate serious misconfiguration; we bail out totally.
catch_nocount:
ERROR("Failed to enumerate NVIDIA GPUs (\"%s\" returned %d)", nv_errline,
nv_status);