You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nD nodeset: added fold axis support and --axis option to nodeset
This adds support for constrainted nD folded nodeset to improve external
tools support.
NodeSet.py:
NodeSetBase's member fold_axis can be set to an iterable over nD
0-indexed axis integers. If so, only rangesets along fold axis are
effectively folded.
However, we always use nD algorithms internally and only re-expand
rangesets of unspecified axis at __str__() time. This may lead to
suboptimal folding, mostly observed with tricky cases, like
overlapping dimensions, etc.
We cannot really talk about this as a 1.6 compat feature, as 1.6
was mostly broken on these aspects. However, for nodesets fed from
unique nD nodes, like in clush when gathering results, setting
fold_axis to [0] should lead to similar results than 1.6 (this patch
doesn't include the feature for clush).
CLI/Nodeset.py and CLI/Options.py:
Added --axis=RANGESET option to nodeset, to use with --fold. Axis are
1-indexed with nodeset CLI. Also --axis=-INDEX is supported to count
backward.
Tests, docs and examples included.
Closes#269.
Change-Id: Ib1f7947f6ecf7b4acbdd1550800a9d89e32743c4
Copy file name to clipboardExpand all lines: doc/man/man1/nodeset.1
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
.\" Man page generated from reStructuredText.
2
2
.
3
-
.TH NODESET 1 "2015-07-10" "1.7" "ClusterShell User Manual"
3
+
.TH NODESET 1 "2015-08-29" "1.7" "ClusterShell User Manual"
4
4
.SH NAME
5
5
nodeset \- compute advanced nodeset operations
6
6
.
@@ -131,6 +131,9 @@ split result into a number of subsets
131
131
.TP
132
132
.B\-\-contiguous
133
133
split result into contiguous subsets (ie. for nodeset, subsets will contain nodes with same pattern name and a contiguous range of indexes, like foobar[1\-100]; for rangeset, subsets with consists in contiguous index ranges)"""
134
+
.TP
135
+
.BI\-\-axis\fB=RANGESET
136
+
for nD nodesets, fold along provided axis only. Axis are indexed from 1 to n and can be specified here either using the rangeset syntax, eg. \(aq1\(aq, \(aq1\-2\(aq, \(aq1,3\(aq, or by a single negative number meaning that the indice is counted from the end. Because some nodesets may have several different dimensions, axis indices are silently truncated to fall in the allowed range.
return sliced off result; examples of SLICE_RANGESET are "0" for simple index selection, or "1-9/2,16" for complex rangeset selection
73
73
--split=MAXSPLIT split result into a number of subsets
74
74
--contiguous split result into contiguous subsets (ie. for nodeset, subsets will contain nodes with same pattern name and a contiguous range of indexes, like foobar[1-100]; for rangeset, subsets with consists in contiguous index ranges)"""
75
+
--axis=RANGESET for nD nodesets, fold along provided axis only. Axis are indexed from 1 to n and can be specified here either using the rangeset syntax, eg. '1', '1-2', '1,3', or by a single negative number meaning that the indice is counted from the end. Because some nodesets may have several different dimensions, axis indices are silently truncated to fall in the allowed range.
75
76
76
77
77
78
For a short explanation of these options, see ``-h, --help``.
0 commit comments