From 5f3b4c1215f95db4bba05aff3a90dd85a47b255a Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 21 Sep 2004 16:54:25 +0000 Subject: [PATCH] Only print in box notation if request has three digits and is more than one node. NOTE: srun uses hostlist to report task numbers. --- src/common/hostlist.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/hostlist.c b/src/common/hostlist.c index 484d90f6987..c1b3dc8e9ff 100644 --- a/src/common/hostlist.c +++ b/src/common/hostlist.c @@ -2240,6 +2240,11 @@ _test_box(void) || (axis_min_z > axis_max_z)) return false; + if ((axis_min_x == axis_max_x) + && (axis_min_y == axis_max_y) + && (axis_min_z == axis_max_z)) + return false; /* single node */ + for (temp = axis_min_x; temp<=axis_max_x; temp++) { for (temp1 = axis_min_y; temp1<=axis_max_y; temp1++) { for (temp2 = axis_min_z; temp2<=axis_max_z; temp2++) { @@ -2263,6 +2268,8 @@ size_t hostlist_ranged_string(hostlist_t hl, size_t n, char *buf) LOCK_HOSTLIST(hl); #ifdef HAVE_BGL + if (hl->hr[0]->width != 3) + goto notbox; _clear_grid(); for (i=0;i<hl->nranges;i++) _set_grid(hl->hr[i]->lo, hl->hr[i]->hi); -- GitLab