Silence warnings
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
Этот коммит содержится в:
родитель
30f23ac67a
Коммит
3906aaf41a
@ -245,6 +245,7 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
|
||||
AC_MSG_CHECKING([if user requested external PMIx support($with_pmix)])
|
||||
opal_prun_happy=no
|
||||
opal_external_have_pmix1=0
|
||||
AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_pmix" = "internal"],
|
||||
[AC_MSG_RESULT([no])
|
||||
opal_external_pmix_happy=no
|
||||
@ -299,7 +300,8 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
AS_IF([test "x`ls $pmix_ext_install_dir/include/pmix_version.h 2> /dev/null`" = "x"],
|
||||
[AC_MSG_RESULT([version file not found - assuming v1.1.4])
|
||||
opal_external_pmix_version_found=1
|
||||
opal_external_pmix_version=114],
|
||||
opal_external_pmix_version=114
|
||||
opal_external_have_pmix1=1],
|
||||
[AC_MSG_RESULT([version file found])
|
||||
opal_external_pmix_version_found=0])
|
||||
|
||||
@ -342,7 +344,8 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
], [])],
|
||||
[AC_MSG_RESULT([found])
|
||||
opal_external_pmix_version=1x
|
||||
opal_external_pmix_version_found=1],
|
||||
opal_external_pmix_version_found=1
|
||||
opal_external_have_pmix1=1],
|
||||
[AC_MSG_RESULT([not found])])])
|
||||
|
||||
AS_IF([test "x$opal_external_pmix_version" = "x"],
|
||||
@ -361,6 +364,8 @@ AC_DEFUN([OPAL_CHECK_PMIX],[
|
||||
opal_external_pmix_LIBS=-lpmix
|
||||
opal_external_pmix_happy=yes])
|
||||
|
||||
AC_DEFINE_UNQUOTED([OPAL_PMIX_V1],[$opal_external_have_pmix1],
|
||||
[Whether the external PMIx library is v1])
|
||||
AM_CONDITIONAL([OPAL_WANT_PRUN], [test "$opal_prun_happy" = "yes"])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
@ -54,7 +54,6 @@ int mca_common_monitoring_coll_cache_name(ompi_communicator_t*comm)
|
||||
|
||||
static inline void mca_common_monitoring_coll_cache(mca_monitoring_coll_data_t*data)
|
||||
{
|
||||
int world_rank;
|
||||
if( -1 == data->world_rank ) {
|
||||
/* Get current process world_rank */
|
||||
mca_common_monitoring_get_world_rank(ompi_comm_rank(data->p_comm), data->p_comm,
|
||||
|
@ -65,10 +65,10 @@ static int ompi_osc_rdma_component_query (struct ompi_win_t *win, void **base, s
|
||||
static int ompi_osc_rdma_component_select (struct ompi_win_t *win, void **base, size_t size, int disp_unit,
|
||||
struct ompi_communicator_t *comm, struct opal_info_t *info,
|
||||
int flavor, int *model);
|
||||
|
||||
#if 0 // stale code?
|
||||
static int ompi_osc_rdma_set_info (struct ompi_win_t *win, struct opal_info_t *info);
|
||||
static int ompi_osc_rdma_get_info (struct ompi_win_t *win, struct opal_info_t **info_used);
|
||||
|
||||
#endif
|
||||
static int ompi_osc_rdma_query_btls (ompi_communicator_t *comm, struct mca_btl_base_module_t **btl);
|
||||
|
||||
static char* ompi_osc_rdma_set_no_lock_info(opal_infosubscriber_t *obj, char *key, char *value);
|
||||
@ -1256,6 +1256,7 @@ static char* ompi_osc_rdma_set_no_lock_info(opal_infosubscriber_t *obj, char *ke
|
||||
return module->no_locks ? "true" : "false";
|
||||
}
|
||||
|
||||
#if 0 // stale code?
|
||||
static int ompi_osc_rdma_set_info (struct ompi_win_t *win, struct opal_info_t *info)
|
||||
{
|
||||
ompi_osc_rdma_module_t *module = GET_MODULE(win);
|
||||
@ -1302,5 +1303,5 @@ static int ompi_osc_rdma_get_info (struct ompi_win_t *win, struct opal_info_t **
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
OBJ_CLASS_INSTANCE(ompi_osc_rdma_aggregation_t, opal_list_item_t, NULL, NULL);
|
||||
|
@ -133,7 +133,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm,
|
||||
** and then mapping it to memory
|
||||
** For sharedfp we also want to put the file backed shared memory into the tmp directory
|
||||
*/
|
||||
filename_basename = basename(filename);
|
||||
filename_basename = basename((char*)filename);
|
||||
/* format is "%s/%s_cid-%d.sm", see below */
|
||||
sm_filename_length = strlen(ompi_process_info.job_session_dir) + 1 + strlen(filename_basename) + 5 + (3*sizeof(uint32_t)+1) + 4;
|
||||
sm_filename = (char*) malloc( sizeof(char) * sm_filename_length);
|
||||
|
@ -7,3 +7,5 @@ typedef struct _com_mat_t{
|
||||
|
||||
int *kpartition(int, com_mat_t*, int, int *, int);
|
||||
tm_tree_t * kpartition_build_tree_from_topology(tm_topology_t *topology,double **com_mat,int N, int *constraints, int nb_constraints, double *obj_weight, double *com_speed);
|
||||
|
||||
#define HAVE_LIBSCOTCH 0 // missing configure setup?
|
||||
|
@ -83,7 +83,6 @@ static bool cray_get_attr(const char *attr, opal_value_t **kv);
|
||||
#endif
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_cray_module = {
|
||||
.name = "cray",
|
||||
.init = cray_init,
|
||||
.finalize = cray_fini,
|
||||
.initialized = cray_initialized,
|
||||
|
@ -50,7 +50,6 @@ static const char *pmix1_get_nspace(opal_jobid_t jobid);
|
||||
static void pmix1_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_ext1x_module = {
|
||||
.name = "pmix1",
|
||||
/* client APIs */
|
||||
.init = pmix1_client_init,
|
||||
.finalize = pmix1_client_finalize,
|
||||
|
@ -72,7 +72,6 @@ static void ext2x_log(opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_ext2x_module = {
|
||||
.name = "pmix2",
|
||||
/* client APIs */
|
||||
.init = ext2x_client_init,
|
||||
.finalize = ext2x_client_finalize,
|
||||
|
@ -59,7 +59,6 @@ static const char *flux_get_nspace(opal_jobid_t jobid);
|
||||
static void flux_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_flux_module = {
|
||||
.name = "flux",
|
||||
.init = flux_init,
|
||||
.finalize = flux_fini,
|
||||
.initialized = flux_initialized,
|
||||
|
@ -83,7 +83,6 @@ static const char *isolated_get_nspace(opal_jobid_t jobid);
|
||||
static void isolated_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_isolated_module = {
|
||||
.name = "isolated",
|
||||
.init = isolated_init,
|
||||
.finalize = isolated_fini,
|
||||
.initialized = isolated_initialized,
|
||||
|
@ -871,7 +871,6 @@ typedef int (*opal_pmix_base_process_monitor_fn_t)(opal_list_t *monitor,
|
||||
* the standard public API data structure
|
||||
*/
|
||||
typedef struct {
|
||||
char *name;
|
||||
/* client APIs */
|
||||
opal_pmix_base_module_init_fn_t init;
|
||||
opal_pmix_base_module_fini_fn_t finalize;
|
||||
|
@ -72,7 +72,6 @@ static void pmix3x_log(opal_list_t *info,
|
||||
opal_pmix_op_cbfunc_t cbfunc, void *cbdata);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_pmix3x_module = {
|
||||
.name = "pmix3",
|
||||
/* client APIs */
|
||||
.init = pmix3x_client_init,
|
||||
.finalize = pmix3x_client_finalize,
|
||||
|
@ -59,7 +59,6 @@ static const char *s1_get_nspace(opal_jobid_t jobid);
|
||||
static void s1_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_s1_module = {
|
||||
.name = "s1",
|
||||
.init = s1_init,
|
||||
.finalize = s1_fini,
|
||||
.initialized = s1_initialized,
|
||||
|
@ -62,7 +62,6 @@ static const char *s2_get_nspace(opal_jobid_t jobid);
|
||||
static void s2_register_jobid(opal_jobid_t jobid, const char *nspace);
|
||||
|
||||
const opal_pmix_base_module_t opal_pmix_s2_module = {
|
||||
.name = "s2",
|
||||
.init = s2_init,
|
||||
.finalize = s2_fini,
|
||||
.initialized = s2_initialized,
|
||||
|
@ -361,7 +361,9 @@ opal_net_addr_isipv4public(const struct sockaddr *addr)
|
||||
bool
|
||||
opal_net_addr_isipv6linklocal(const struct sockaddr *addr)
|
||||
{
|
||||
#if OPAL_ENABLE_IPV6
|
||||
struct sockaddr_in6 if_addr;
|
||||
#endif
|
||||
|
||||
switch (addr->sa_family) {
|
||||
#if OPAL_ENABLE_IPV6
|
||||
|
@ -126,7 +126,9 @@ typedef struct {
|
||||
orte_iof_sink_t *stdinev;
|
||||
orte_iof_read_event_t *revstdout;
|
||||
orte_iof_read_event_t *revstderr;
|
||||
#if OPAL_PMIX_V1
|
||||
orte_iof_read_event_t *revstddiag;
|
||||
#endif
|
||||
opal_list_t *subscribers;
|
||||
bool copy;
|
||||
} orte_iof_proc_t;
|
||||
|
@ -211,7 +211,9 @@ static void orte_iof_base_proc_construct(orte_iof_proc_t* ptr)
|
||||
ptr->stdinev = NULL;
|
||||
ptr->revstdout = NULL;
|
||||
ptr->revstderr = NULL;
|
||||
#if OPAL_PMIX_V1
|
||||
ptr->revstddiag = NULL;
|
||||
#endif
|
||||
ptr->subscribers = NULL;
|
||||
ptr->copy = true;
|
||||
}
|
||||
@ -226,9 +228,11 @@ static void orte_iof_base_proc_destruct(orte_iof_proc_t* ptr)
|
||||
if (NULL != ptr->revstderr) {
|
||||
OBJ_RELEASE(ptr->revstderr);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (NULL != ptr->revstddiag) {
|
||||
OBJ_RELEASE(ptr->revstddiag);
|
||||
}
|
||||
#endif
|
||||
if (NULL != ptr->subscribers) {
|
||||
OPAL_LIST_RELEASE(ptr->subscribers);
|
||||
}
|
||||
|
@ -64,7 +64,6 @@
|
||||
#include "opal/util/os_dirpath.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "orte/util/name_fns.h"
|
||||
@ -120,13 +119,12 @@ orte_iof_base_setup_prefork(orte_iof_base_io_conf_t *opts)
|
||||
return ORTE_ERR_SYS_LIMITS_PIPES;
|
||||
}
|
||||
}
|
||||
if (0 == strncmp(opal_pmix.name, "pmix1", 5)) {
|
||||
if (pipe(opts->p_internal) < 0) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_SYS_LIMITS_PIPES);
|
||||
return ORTE_ERR_SYS_LIMITS_PIPES;
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (pipe(opts->p_internal) < 0) {
|
||||
ORTE_ERROR_LOG(ORTE_ERR_SYS_LIMITS_PIPES);
|
||||
return ORTE_ERR_SYS_LIMITS_PIPES;
|
||||
}
|
||||
|
||||
#endif
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
@ -135,7 +133,9 @@ int
|
||||
orte_iof_base_setup_child(orte_iof_base_io_conf_t *opts, char ***env)
|
||||
{
|
||||
int ret;
|
||||
#if OPAL_PMIX_V1
|
||||
char *str;
|
||||
#endif
|
||||
|
||||
if (opts->connect_stdin) {
|
||||
close(opts->p_stdin[1]);
|
||||
@ -144,9 +144,9 @@ orte_iof_base_setup_child(orte_iof_base_io_conf_t *opts, char ***env)
|
||||
if( !orte_iof_base.redirect_app_stderr_to_stdout ) {
|
||||
close(opts->p_stderr[0]);
|
||||
}
|
||||
if (0 == strncmp(opal_pmix.name, "pmix1", 5)) {
|
||||
close(opts->p_internal[0]);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
close(opts->p_internal[0]);
|
||||
#endif
|
||||
|
||||
if (opts->usepty) {
|
||||
/* disable echo */
|
||||
@ -220,20 +220,19 @@ orte_iof_base_setup_child(orte_iof_base_io_conf_t *opts, char ***env)
|
||||
}
|
||||
}
|
||||
|
||||
if (0 == strncmp(opal_pmix.name, "pmix1", 5)) {
|
||||
if (!orte_map_stddiag_to_stderr && !orte_map_stddiag_to_stdout ) {
|
||||
/* Set an environment variable that the new child process can use
|
||||
to get the fd of the pipe connected to the INTERNAL IOF tag. */
|
||||
asprintf(&str, "%d", opts->p_internal[1]);
|
||||
if (NULL != str) {
|
||||
opal_setenv("OPAL_OUTPUT_STDERR_FD", str, true, env);
|
||||
free(str);
|
||||
}
|
||||
}
|
||||
else if( orte_map_stddiag_to_stdout ) {
|
||||
opal_setenv("OPAL_OUTPUT_INTERNAL_TO_STDOUT", "1", true, env);
|
||||
#if OPAL_PMIX_V1
|
||||
if (!orte_map_stddiag_to_stderr && !orte_map_stddiag_to_stdout ) {
|
||||
/* Set an environment variable that the new child process can use
|
||||
to get the fd of the pipe connected to the INTERNAL IOF tag. */
|
||||
asprintf(&str, "%d", opts->p_internal[1]);
|
||||
if (NULL != str) {
|
||||
opal_setenv("OPAL_OUTPUT_STDERR_FD", str, true, env);
|
||||
free(str);
|
||||
}
|
||||
} else if( orte_map_stddiag_to_stdout ) {
|
||||
opal_setenv("OPAL_OUTPUT_INTERNAL_TO_STDOUT", "1", true, env);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
@ -270,13 +269,13 @@ orte_iof_base_setup_parent(const orte_process_name_t* name,
|
||||
}
|
||||
}
|
||||
|
||||
if (0 == strncmp(opal_pmix.name, "pmix1", 5)) {
|
||||
ret = orte_iof.push(name, ORTE_IOF_STDDIAG, opts->p_internal[0]);
|
||||
if(ORTE_SUCCESS != ret) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
return ret;
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
ret = orte_iof.push(name, ORTE_IOF_STDDIAG, opts->p_internal[0]);
|
||||
if(ORTE_SUCCESS != ret) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
@ -372,12 +371,13 @@ int orte_iof_base_setup_output_files(const orte_process_name_t* dst_name,
|
||||
orte_iof_base_write_handler);
|
||||
}
|
||||
}
|
||||
|
||||
#if OPAL_PMIX_V1
|
||||
if (NULL != proct->revstddiag && NULL == proct->revstddiag->sink) {
|
||||
/* always tie the sink for stddiag to stderr */
|
||||
OBJ_RETAIN(proct->revstderr->sink);
|
||||
proct->revstddiag->sink = proct->revstderr->sink;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
|
@ -35,7 +35,9 @@ struct orte_iof_base_io_conf_t {
|
||||
int p_stdin[2];
|
||||
int p_stdout[2];
|
||||
int p_stderr[2];
|
||||
#if OPAL_PMIX_V1
|
||||
int p_internal[2];
|
||||
#endif
|
||||
};
|
||||
typedef struct orte_iof_base_io_conf_t orte_iof_base_io_conf_t;
|
||||
|
||||
|
@ -42,7 +42,6 @@
|
||||
#endif
|
||||
|
||||
#include "opal/mca/event/event.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
|
||||
#include "orte/runtime/orte_globals.h"
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
@ -187,9 +186,11 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag,
|
||||
} else if (src_tag & ORTE_IOF_STDERR) {
|
||||
ORTE_IOF_READ_EVENT(&proct->revstderr, proct, fd, ORTE_IOF_STDERR,
|
||||
orte_iof_hnp_read_local_handler, false);
|
||||
} else if (0 == strncmp(opal_pmix.name, "pmix1", 5) && src_tag & ORTE_IOF_STDDIAG) {
|
||||
#if OPAL_PMIX_V1
|
||||
} else if (src_tag & ORTE_IOF_STDDIAG) {
|
||||
ORTE_IOF_READ_EVENT(&proct->revstddiag, proct, fd, ORTE_IOF_STDDIAG,
|
||||
orte_iof_hnp_read_local_handler, false);
|
||||
#endif
|
||||
}
|
||||
/* setup any requested output files */
|
||||
if (ORTE_SUCCESS != (rc = orte_iof_base_setup_output_files(dst_name, jdata, proct))) {
|
||||
@ -203,7 +204,9 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag,
|
||||
* been defined!
|
||||
*/
|
||||
if (NULL != proct->revstdout &&
|
||||
(0 != strncmp(opal_pmix.name, "pmix1", 5) || NULL != proct->revstddiag) &&
|
||||
#if OPAL_PMIX_V1
|
||||
NULL != proct->revstddiag &&
|
||||
#endif
|
||||
(orte_iof_base.redirect_app_stderr_to_stdout || NULL != proct->revstderr)) {
|
||||
if (proct->copy) {
|
||||
/* see if there are any wildcard subscribers out there that
|
||||
@ -222,9 +225,11 @@ static int hnp_push(const orte_process_name_t* dst_name, orte_iof_tag_t src_tag,
|
||||
if (!orte_iof_base.redirect_app_stderr_to_stdout) {
|
||||
ORTE_IOF_READ_ACTIVATE(proct->revstderr);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (NULL != proct->revstddiag) {
|
||||
ORTE_IOF_READ_ACTIVATE(proct->revstddiag);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
@ -408,6 +413,7 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (ORTE_IOF_STDDIAG & source_tag) {
|
||||
if (NULL != proct->revstddiag) {
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
@ -415,6 +421,9 @@ static int hnp_close(const orte_process_name_t* peer,
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
#else
|
||||
++cnt;
|
||||
#endif
|
||||
/* if we closed them all, then remove this proc */
|
||||
if (4 == cnt) {
|
||||
opal_list_remove_item(&mca_iof_hnp_component.procs, &proct->super);
|
||||
@ -491,9 +500,11 @@ static int finalize(void)
|
||||
if (NULL != proct->revstderr) {
|
||||
orte_iof_base_static_dump_output(proct->revstderr);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (NULL != proct->revstddiag) {
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
}
|
||||
#endif
|
||||
OBJ_RELEASE(proct);
|
||||
}
|
||||
OBJ_DESTRUCT(&mca_iof_hnp_component.procs);
|
||||
|
@ -267,14 +267,18 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata)
|
||||
} else if (rev->tag & ORTE_IOF_STDERR) {
|
||||
orte_iof_base_static_dump_output(proct->revstderr);
|
||||
OBJ_RELEASE(proct->revstderr);
|
||||
#if OPAL_PMIX_V1
|
||||
} else if (rev->tag & ORTE_IOF_STDDIAG) {
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
OBJ_RELEASE(proct->revstddiag);
|
||||
#endif
|
||||
}
|
||||
/* check to see if they are all done */
|
||||
if (NULL == proct->revstdout &&
|
||||
NULL == proct->revstderr &&
|
||||
NULL == proct->revstddiag) {
|
||||
#if OPAL_PMIX_V1
|
||||
NULL == proct->revstddiag &&
|
||||
#endif
|
||||
NULL == proct->revstderr) {
|
||||
/* this proc's iof is complete */
|
||||
ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE);
|
||||
}
|
||||
|
@ -42,7 +42,6 @@
|
||||
#endif
|
||||
|
||||
#include "opal/util/os_dirpath.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "orte/util/name_fns.h"
|
||||
@ -178,9 +177,11 @@ static int orted_push(const orte_process_name_t* dst_name,
|
||||
} else if (src_tag & ORTE_IOF_STDERR) {
|
||||
ORTE_IOF_READ_EVENT(&proct->revstderr, proct, fd, ORTE_IOF_STDERR,
|
||||
orte_iof_orted_read_handler, false);
|
||||
} else if (0 == strncmp(opal_pmix.name, "pmix1", 5) && src_tag & ORTE_IOF_STDDIAG) {
|
||||
#if OPAL_PMIX_V1
|
||||
} else if (src_tag & ORTE_IOF_STDDIAG) {
|
||||
ORTE_IOF_READ_EVENT(&proct->revstddiag, proct, fd, ORTE_IOF_STDDIAG,
|
||||
orte_iof_orted_read_handler, false);
|
||||
#endif
|
||||
}
|
||||
/* setup any requested output files */
|
||||
if (ORTE_SUCCESS != (rc = orte_iof_base_setup_output_files(dst_name, jobdat, proct))) {
|
||||
@ -194,15 +195,19 @@ static int orted_push(const orte_process_name_t* dst_name,
|
||||
* been defined!
|
||||
*/
|
||||
if (NULL != proct->revstdout &&
|
||||
(0 != strncmp(opal_pmix.name, "pmix1", 5) || NULL != proct->revstddiag) &&
|
||||
#if OPAL_PMIX_V1
|
||||
NULL != proct->revstddiag &&
|
||||
#endif
|
||||
(orte_iof_base.redirect_app_stderr_to_stdout || NULL != proct->revstderr)) {
|
||||
ORTE_IOF_READ_ACTIVATE(proct->revstdout);
|
||||
if (!orte_iof_base.redirect_app_stderr_to_stdout) {
|
||||
ORTE_IOF_READ_ACTIVATE(proct->revstderr);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (NULL != proct->revstddiag) {
|
||||
ORTE_IOF_READ_ACTIVATE(proct->revstddiag);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
@ -301,6 +306,7 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (ORTE_IOF_STDDIAG & source_tag) {
|
||||
if (NULL != proct->revstddiag) {
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
@ -308,6 +314,9 @@ static int orted_close(const orte_process_name_t* peer,
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
#else
|
||||
++cnt;
|
||||
#endif
|
||||
/* if we closed them all, then remove this proc */
|
||||
if (4 == cnt) {
|
||||
opal_list_remove_item(&mca_iof_orted_component.procs, &proct->super);
|
||||
@ -346,9 +355,11 @@ static int finalize(void)
|
||||
if (NULL != proct->revstderr) {
|
||||
orte_iof_base_static_dump_output(proct->revstderr);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
if (NULL != proct->revstddiag) {
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
}
|
||||
#endif
|
||||
OBJ_RELEASE(proct);
|
||||
}
|
||||
OBJ_DESTRUCT(&mca_iof_orted_component.procs);
|
||||
|
@ -164,16 +164,20 @@ void orte_iof_orted_read_handler(int fd, short event, void *cbdata)
|
||||
orte_iof_base_static_dump_output(proct->revstderr);
|
||||
OBJ_RELEASE(proct->revstderr);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
} else if (rev->tag & ORTE_IOF_STDDIAG) {
|
||||
if( NULL != proct->revstddiag ) {
|
||||
orte_iof_base_static_dump_output(proct->revstddiag);
|
||||
OBJ_RELEASE(proct->revstddiag);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* check to see if they are all done */
|
||||
if (NULL == proct->revstdout &&
|
||||
NULL == proct->revstderr &&
|
||||
NULL == proct->revstddiag) {
|
||||
#if OPAL_PMIX_V1
|
||||
NULL == proct->revstddiag &&
|
||||
#endif
|
||||
NULL == proct->revstderr) {
|
||||
/* this proc's iof is complete */
|
||||
ORTE_ACTIVATE_PROC_STATE(&proct->name, ORTE_PROC_STATE_IOF_COMPLETE);
|
||||
}
|
||||
|
@ -112,7 +112,6 @@
|
||||
|
||||
#include "opal/mca/hwloc/hwloc-internal.h"
|
||||
#include "opal/mca/hwloc/base/base.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "opal/class/opal_pointer_array.h"
|
||||
#include "opal/util/opal_environ.h"
|
||||
#include "opal/util/show_help.h"
|
||||
@ -294,9 +293,8 @@ static void send_error_show_help(int fd, int exit_status,
|
||||
exit(exit_status);
|
||||
}
|
||||
|
||||
/* close all open file descriptors w/ exception of stdin/stdout/stderr,
|
||||
the pipe used for the IOF INTERNAL messages, and the pipe up to
|
||||
the parent. */
|
||||
/* close all open file descriptors w/ exception of stdin/stdout/stderr
|
||||
and the pipe up to the parent. */
|
||||
static int close_open_file_descriptors(int write_fd,
|
||||
orte_iof_base_io_conf_t opts) {
|
||||
DIR *dir = opendir("/proc/self/fd");
|
||||
@ -313,7 +311,11 @@ static int close_open_file_descriptors(int write_fd,
|
||||
closedir(dir);
|
||||
return ORTE_ERR_TYPE_MISMATCH;
|
||||
}
|
||||
if (fd >=3 && (0 != strncmp(opal_pmix.name, "pmix", 4) && fd != opts.p_internal[1]) && fd != write_fd) {
|
||||
if (fd >=3 &&
|
||||
#if OPAL_PMIX_V1
|
||||
fd != opts.p_internal[1] &&
|
||||
#endif
|
||||
fd != write_fd) {
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
@ -375,13 +377,13 @@ static int do_child(orte_odls_spawn_caddy_t *cd, int write_fd)
|
||||
}
|
||||
close(fdnull);
|
||||
}
|
||||
if (0 != strncmp(opal_pmix.name, "pmix", 4)) {
|
||||
fdnull = open("/dev/null", O_RDONLY, 0);
|
||||
if (fdnull > cd->opts.p_internal[1]) {
|
||||
dup2(fdnull, cd->opts.p_internal[1]);
|
||||
}
|
||||
close(fdnull);
|
||||
#if OPAL_PMIX_V1
|
||||
fdnull = open("/dev/null", O_RDONLY, 0);
|
||||
if (fdnull > cd->opts.p_internal[1]) {
|
||||
dup2(fdnull, cd->opts.p_internal[1]);
|
||||
}
|
||||
close(fdnull);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* close all open file descriptors w/ exception of stdin/stdout/stderr,
|
||||
@ -390,7 +392,11 @@ static int do_child(orte_odls_spawn_caddy_t *cd, int write_fd)
|
||||
if (ORTE_SUCCESS != close_open_file_descriptors(write_fd, cd->opts)) {
|
||||
// close *all* file descriptors -- slow
|
||||
for(fd=3; fd<fdmax; fd++) {
|
||||
if ((0 != strncmp(opal_pmix.name, "pmix", 4) && fd != cd->opts.p_internal[1]) && fd != write_fd) {
|
||||
if (
|
||||
#if OPAL_PMIX_V1
|
||||
fd != cd->opts.p_internal[1] &&
|
||||
#endif
|
||||
fd != write_fd) {
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
@ -459,9 +465,9 @@ static int do_parent(orte_odls_spawn_caddy_t *cd, int read_fd)
|
||||
if( !orte_iof_base.redirect_app_stderr_to_stdout ) {
|
||||
close(cd->opts.p_stderr[1]);
|
||||
}
|
||||
if (0 != strncmp(opal_pmix.name, "pmix", 4)) {
|
||||
close(cd->opts.p_internal[1]);
|
||||
}
|
||||
#if OPAL_PMIX_V1
|
||||
close(cd->opts.p_internal[1]);
|
||||
#endif
|
||||
|
||||
/* Block reading a message from the pipe */
|
||||
while (1) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user