Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit f97a733

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 327c394 commit f97a733

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

501501
/* Exec the new executable */
502502

503-
if (10 < opal_output_get_verbosity(orte_odls_base_framework.framework_output)) {
504-
int jout;
505-
opal_output(0, "%s STARTING %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), context->app);
506-
for (jout=0; NULL != context->argv[jout]; jout++) {
507-
opal_output(0, "%s\tARGV[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, context->argv[jout]);
508-
}
509-
for (jout=0; NULL != environ_copy[jout]; jout++) {
510-
opal_output(0, "%s\tENVIRON[%d]: %s", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), jout, environ_copy[jout]);
511-
}
512-
}
513-
514503
execve(context->app, context->argv, environ_copy);
515504
send_error_show_help(write_fd, 1,
516505
"help-orte-odls-default.txt", "execve error",

0 commit comments

Comments
 (0)