From 4ba11c53e1377744f55750fb20ec5842972f22a0 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Fri, 19 Aug 2022 14:53:12 -0700 Subject: [PATCH] Fix the dpm to fwd IO to the spawning parent When doing a comm_spawn as a singleton, you need to instruct the "prte" DVM to forward any IO from the child job to the singleton "parent" so it can be properly output. Otherwise, the IO from the child job will simply be lost. Signed-off-by: Ralph Castain --- ompi/dpm/dpm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ompi/dpm/dpm.c b/ompi/dpm/dpm.c index 032b27fefa5..56203a24f85 100644 --- a/ompi/dpm/dpm.c +++ b/ompi/dpm/dpm.c @@ -1624,6 +1624,16 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[], } return MPI_ERR_SPAWN; } + /* tell it to forward output to us */ + info = OBJ_NEW(opal_info_item_t); + PMIX_INFO_LOAD(&info->info, PMIX_FWD_STDOUT, NULL, PMIX_BOOL); + opal_list_append(&job_info, &info->super); + info = OBJ_NEW(opal_info_item_t); + PMIX_INFO_LOAD(&info->info, PMIX_FWD_STDERR, NULL, PMIX_BOOL); + opal_list_append(&job_info, &info->super); + info = OBJ_NEW(opal_info_item_t); + PMIX_INFO_LOAD(&info->info, PMIX_FWD_STDDIAG, NULL, PMIX_BOOL); + opal_list_append(&job_info, &info->super); } if (NULL != hostfiles) { opal_argv_free(hostfiles);