diff --git a/NEWS b/NEWS index 3383d12dcfb85b965a9c9dea96cbde8071287157..2c5120853ede29c69828196cd207c545642b6784 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ documents those changes that are of interest to users and admins. new formats: min:sec, hr:min:sec, days-hr:min:sec, days-hr, etc. -- scontrol "notify" command added to send message to stdout of srun for specified job id. + -- For BlueGene, make alpha part of node location specification be case insensitive. * Changes in SLURM 1.3.0-pre4 ============================= diff --git a/src/common/hostlist.c b/src/common/hostlist.c index f048a4b087270af784ef26c90e5e336df5556d61..f925af093aa1f0a084456bb5f6f251efc893817c 100644 --- a/src/common/hostlist.c +++ b/src/common/hostlist.c @@ -1549,18 +1549,22 @@ static int _parse_box_range(char *str, struct _range *ranges, int len, int *coun return 0; for(i = 0; i<3; i++) { - a[i] = str[i] - '0'; - /* Remove the extra chars inbetween the 9 and A */ - if(a[i] > 9) - a[i] -= 7; - if ((a[i] < 0) || (a[i] > 36)) + if ((str[i] >= '0') && (str[i] <= '9')) + a[i] = str[i] - '0'; + else if ((str[i] >= 'a') && (str[i] <= 'z')) + a[i] = str[i] - 'a' + 10; + else if ((str[i] >= 'A') && (str[i] <= 'Z')) + a[i] = str[i] - 'A' + 10; + else return 0; - - b[i] = str[i+4] - '0'; - /* Remove the extra chars inbetween the 9 and A */ - if(b[i] > 9) - b[i] -= 7; - if ((b[i] < 0) || (b[i] > 36)) + + if ((str[i+4] >= '0') && (str[i+4] <= '9')) + b[i] = str[i+4] - '0'; + else if ((str[i+4] >= 'a') && (str[i+4] <= 'z')) + b[i] = str[i+4] - 'a' + 10; + else if ((str[i+4] >= 'A') && (str[i+4] <= 'Z')) + b[i] = str[i+4] - 'A' + 10; + else return 0; }