Skip to content

Commit

Permalink
Merge pull request #3068 from chu11/issue2915_labelio
Browse files Browse the repository at this point in the history
cmd: Make label io options consistent
  • Loading branch information
mergify[bot] committed Jul 24, 2020
2 parents 7953a1a + 0bee084 commit d81b772
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/man1/flux-exec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ flux-exec - Execute processes across flux ranks

SYNOPSIS
--------
*flux* *exec* [--noinput] ['--labelio] ['--dir=DIR'] ['--rank=NODESET'] ['--verbose'] COMMANDS...
*flux* *exec* [--noinput] ['--label-io] ['--dir=DIR'] ['--rank=NODESET'] ['--verbose'] COMMANDS...


DESCRIPTION
Expand Down Expand Up @@ -46,7 +46,7 @@ exits with exit code 128+signo.
OPTIONS
-------

*-l, --labelio*::
*-l, --label-io*::
Label lines of output with the source RANK.

*-n, --noinput*::
Expand Down
2 changes: 1 addition & 1 deletion doc/man1/flux-mini.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ set FILENAME to 'none' or 'kvs'.
Redirect stderr to the specified FILENAME, bypassing the KVS.
The mustache template '{{id}}' is expanded as above.

*--label-io*::
*-l, --label-io*::
Add task rank prefixes to each line of output.


Expand Down
1 change: 0 additions & 1 deletion doc/test/spell.en.pws
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ hostname
io
jobid
knowlege
labelio
libpmi
lwj
mpi
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/flux-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static struct optparse_option cmdopts[] = {
.usage = "Exclude ranks from target." },
{ .name = "dir", .key = 'd', .has_arg = 1, .arginfo = "PATH",
.usage = "Set the working directory to PATH" },
{ .name = "labelio", .key = 'l', .has_arg = 0,
{ .name = "label-io", .key = 'l', .has_arg = 0,
.usage = "Label lines of output with the source RANK" },
{ .name = "noinput", .key = 'n', .has_arg = 0,
.usage = "Redirect stdin from /dev/null" },
Expand Down Expand Up @@ -191,7 +191,7 @@ void output_cb (flux_subprocess_t *p, const char *stream)
log_err_exit ("flux_subprocess_getline");

if (lenp) {
if (optparse_getopt (opts, "labelio", NULL) > 0)
if (optparse_getopt (opts, "label-io", NULL) > 0)
fprintf (fstream, "%d: ", flux_subprocess_rank (p));
fwrite (ptr, lenp, 1, fstream);
}
Expand Down
1 change: 1 addition & 0 deletions src/cmd/flux-mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def create_parser(exclude_io=False):
metavar="FILENAME",
)
parser.add_argument(
"-l",
"--label-io",
action="store_true",
help="Add rank labels to stdout, stderr lines"
Expand Down

0 comments on commit d81b772

Please sign in to comment.