From 888928d046889625d873b4b3137242c382a9741d Mon Sep 17 00:00:00 2001 From: Evgeny Naumov Date: Mon, 10 Sep 2018 12:54:43 -0400 Subject: [PATCH] config: fix OB1, describe config errors --- src/gpu_nvml.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gpu_nvml.c b/src/gpu_nvml.c index ab4390b8..b34d80d3 100644 --- a/src/gpu_nvml.c +++ b/src/gpu_nvml.c @@ -48,9 +48,11 @@ static int nvml_config(const char *key, const char *value) { 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); @@ -58,6 +60,7 @@ static int nvml_config(const char *key, const char *value) { if IS_TRUE(value) { conf_mask_is_exclude = 1; } } else { + ERROR("Unrecognized config option %s", key); return -10; } -- 2.11.0