Skip to content

Commit 950d00c

Browse files
committed
tools/mpirun: Add the basename to the environment.
This way prterun can pickup mpirun/mpiexec and display it for --help and --version. Signed-off-by: Austen Lauria <[email protected]>
1 parent 525d8c7 commit 950d00c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ompi/tools/mpirun/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ int main(int argc, char *argv[])
4545
}
4646
setenv("PRTE_MCA_schizo_proxy", "ompi", 1);
4747
setenv("OMPI_VERSION", OMPI_VERSION, 1);
48+
char *base_tool_name = opal_basename(argv[0]);
49+
setenv("OMPI_TOOL_NAME", base_tool_name, 1);
50+
free(base_tool_name);
51+
4852

4953
opal_argv_append_nosize(&pargs, "prterun");
5054
for (m=1; NULL != argv[m]; m++) {

0 commit comments

Comments
 (0)