Skip to content

Commit efbb28b

Browse files
committed
odls_default: do not opal_output() while creating a process!
It is verbotten to use opal_output() after the fork() but before the exec()! It results in all manner of undefined behavior. For example, on some OS X systems, if you run a trivial "hello world" MPI program with a high level of ODLS verbosity: ```sh $ mpirun -np 3 --mca odls_base_verbose 100 ./hello_c ``` You will see a bunch of output from the mpirun ODLS base, but then it *may* hang in odls_default_module.c:do_child() -- after the fork() but before the exec() -- while trying to opal_output() some debugging statements. The solution is to remove these extraneous opal_output() statements. Indeed, the ODLS base is already outputting the same information that these opal_output() statements are trying to emit, anyway. Signed-off-by: Jeff Squyres <[email protected]> (cherry picked from commit open-mpi/ompi@dd9a819)
1 parent dd1aa9e commit efbb28b

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

orte/mca/odls/default/odls_default_module.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2007-2010 Oracle and/or its affiliates. All rights reserved.
1313
* Copyright (c) 2007 Evergrid, Inc. All rights reserved.
14-
* Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
14+
* Copyright (c) 2008-2016 Cisco Systems, Inc. All rights reserved.
1515
* Copyright (c) 2010 IBM Corporation. All rights reserved.
1616
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
1717
* reserved.
@@ -717,17 +717,6 @@ static int do_child(orte_app_context_t* context,
717717

718718
/* Exec the new executable */
719719

720-
if (10 < opal_output_get_verbosity(orte_odls_base_framework.framework_output)) {
721-
int jout;
722-
opal_output(0, "%s STARTING %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), context->app);
723-
for (jout=0; NULL != context->argv[jout]; jout++) {
724-
opal_output(0, "%s\tARGV[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, context->argv[jout]);
725-
}
726-
for (jout=0; NULL != environ_copy[jout]; jout++) {
727-
opal_output(0, "%s\tENVIRON[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, environ_copy[jout]);
728-
}
729-
}
730-
731720
execve(context->app, context->argv, environ_copy);
732721
send_error_show_help(write_fd, 1,
733722
"help-orte-odls-default.txt", "execve error",

0 commit comments

Comments
 (0)