Skip to content

Commit dd9a819

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]>
1 parent 461ca12 commit dd9a819

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-2015 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.
@@ -479,17 +479,6 @@ static int do_child(orte_app_context_t* context,
479479

480480
/* Exec the new executable */
481481

482-
if (10 < opal_output_get_verbosity(orte_odls_base_framework.framework_output)) {
483-
int jout;
484-
opal_output(0, "%s STARTING %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), context->app);
485-
for (jout=0; NULL != context->argv[jout]; jout++) {
486-
opal_output(0, "%s\tARGV[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, context->argv[jout]);
487-
}
488-
for (jout=0; NULL != environ_copy[jout]; jout++) {
489-
opal_output(0, "%s\tENVIRON[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, environ_copy[jout]);
490-
}
491-
}
492-
493482
execve(context->app, context->argv, environ_copy);
494483
send_error_show_help(write_fd, 1,
495484
"help-orte-odls-default.txt", "execve error",

0 commit comments

Comments
 (0)