Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IOF redirection options #7162

Merged
merged 1 commit into from
Nov 13, 2019
Merged

Update IOF redirection options #7162

merged 1 commit into from
Nov 13, 2019

Conversation

rhc54
Copy link
Contributor

@rhc54 rhc54 commented Nov 13, 2019

Provide both "--output-directory" and "--output-filename" options but do
not allow both to be given at the same time. Output-directory allows
specification of a directory, with output redirected into files of form
"<directory>/<jobid>/rank.<vpid>/stdout[err]". This option also supports two
directives: nojobid (removes the jobid directory layer) and nocopy (do
not copy the output to the terminal).

Output-filename is the "old" behavior that names the output files as
"<filename>.<rank>" with both stdout and stderr redirected into it. This
option only supports one directive: nocopy (do not copy the output to
the terminal).

Fix both the --help and man documentation.

Fixes #7095
Refs #7133

Signed-off-by: Ralph Castain rhc@pmix.org

Provide both "--output-directory" and "--output-filename" options but do
not allow both to be given at the same time. Output-directory allows
specification of a directory, with output redirected into files of form
"<directory>/<jobid>/rank.<vpid>/stdout[err]". This option also supports two
directives: nojobid (removes the jobid directory layer) and nocopy (do
not copy the output to the terminal).

Output-filename is the "old" behavior that names the output files as
"<filename>.rank" with both stdout and stderr redirected into it. This
option only supports one directive: nocopy (do not copy the output to
the terminal).

Fix both the --help and man documentation.

Signed-off-by: Ralph Castain <rhc@pmix.org>
@rhc54 rhc54 merged commit db52da4 into open-mpi:master Nov 13, 2019
@rhc54 rhc54 deleted the topic/iof branch November 13, 2019 21:37
@jsquyres
Copy link
Member

@gpaulsen @hppritcha Do you want to bring this to v4.0.x?

On the one hand, it's an enhancement.

On the other hand, it's restoring old behavior (admittedly: that behavior was from the v2.x series -- I believe the current behavior has been this way since v3.0.0).

@vipulk1947
Copy link

I have one comment on this change. For finding ":" character, please use strrchr() function instead of strchr(). This is useful because in Linux, ":" is a valid character for directory/file names. In fact, people add current date/time in automatically generated directory names, so it occurs frequently.

Using strrchr() ensures that the parsing of the --output-directory field works correctly in such directory path. Otherwise, it gets messed up and gets created at random places (or fails to create due to permission issues).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug or Wrong documentation for --output-filename option
3 participants