Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/orte_config_files.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Corporation. All rights reserved.
# Copyright (c) 2011-2012 Los Alamos National Security, LLC. All rights
# reserved.
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved
# Copyright (c) 2015 Intel, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -33,6 +33,7 @@ AC_DEFUN([ORTE_CONFIG_FILES],[
orte/tools/orte-migrate/Makefile
orte/tools/orte-info/Makefile
orte/tools/orte-server/Makefile
orte/tools/orte-submit/Makefile
orte/tools/orte-dvm/Makefile
])
])
12 changes: 8 additions & 4 deletions ompi/mca/rte/orte/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#
# Copyright (c) 2012 Los Alamos National Security, LLC.
# All rights reserved.
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 Intel, Inc. All rights reserved.
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -28,7 +27,7 @@ libmca_rte_orte_la_SOURCES =$(sources) $(headers)
libmca_rte_orte_la_LDFLAGS = -module -avoid-version
libmca_rte_orte_la_LIBADD = $(top_builddir)/orte/lib@ORTE_LIB_PREFIX@open-rte.la

man_pages = mpirun.1 mpiexec.1 ompi-ps.1 ompi-clean.1 ompi-top.1 ompi-server.1 ompi-dvm.1
man_pages = mpirun.1 mpiexec.1 ompi-ps.1 ompi-clean.1 ompi-top.1 ompi-server.1 ompi-dvm.1 ompi-submit.1

if WANT_FT
man_pages += ompi-checkpoint.1 ompi-restart.1
Expand All @@ -45,6 +44,7 @@ install-exec-hook:
(cd $(DESTDIR)$(bindir); rm -f ompi-top$(EXEEXT); $(LN_S) orte-top$(EXEEXT) ompi-top$(EXEEXT))
(cd $(DESTDIR)$(bindir); rm -f ompi-server$(EXEEXT); $(LN_S) orte-server$(EXEEXT) ompi-server$(EXEEXT))
(cd $(DESTDIR)$(bindir); rm -f ompi-dvm$(EXEEXT); $(LN_S) orte-dvm$(EXEEXT) ompi-dvm$(EXEEXT))
(cd $(DESTDIR)$(bindir); rm -f ompi-submit$(EXEEXT); $(LN_S) orte-submit$(EXEEXT) ompi-submit$(EXEEXT))
if WANT_FT
(cd $(DESTDIR)$(bindir); rm -f ompi-checkpoint$(EXEEXT); $(LN_S) orte-checkpoint$(EXEEXT) ompi-checkpoint$(EXEEXT))
(cd $(DESTDIR)$(bindir); rm -f ompi-restart$(EXEEXT); $(LN_S) orte-restart$(EXEEXT) ompi-restart$(EXEEXT))
Expand All @@ -58,7 +58,8 @@ uninstall-local:
$(DESTDIR)$(bindir)/ompi-clean$(EXEEXT) \
$(DESTDIR)$(bindir)/ompi-top$(EXEEXT) \
$(DESTDIR)$(bindir)/ompi-server$(EXEEXT) \
$(DESTDIR)$(bindir)/ompi-dvm$(EXEEXT)
$(DESTDIR)$(bindir)/ompi-dvm$(EXEEXT) \
$(DESTDIR)$(bindir)/ompi-submit$(EXEEXT)
if WANT_FT
rm -f $(DESTDIR)$(bindir)/ompi-checkpoint$(EXEEXT) \
$(DESTDIR)$(bindir)/ompi-restart$(EXEEXT) \
Expand Down Expand Up @@ -121,5 +122,8 @@ ompi-server.1: $(top_builddir)/orte/tools/orte-server/orte-server.1
ompi-dvm.1: $(top_builddir)/orte/tools/orte-dvm/orte-dvm.1
cp -f $(top_builddir)/orte/tools/orte-dvm/orte-dvm.1 ompi-dvm.1

ompi-submit.1: $(top_builddir)/orte/tools/orte-submit/orte-submit.1
cp -f $(top_builddir)/orte/tools/orte-submit/orte-submit.1 ompi-submit.1

clean-local:
rm -f $(man_pages)
2 changes: 1 addition & 1 deletion opal/mca/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ OPAL_DECLSPEC int mca_base_is_component_required(opal_list_t *components_availab
/* mca_base_cmd_line.c */

OPAL_DECLSPEC int mca_base_cmd_line_setup(opal_cmd_line_t *cmd);
OPAL_DECLSPEC int mca_base_cmd_line_process_args(char **argv,
OPAL_DECLSPEC int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd,
char ***app_env,
char ***global_env);
OPAL_DECLSPEC void mca_base_cmd_line_wrap_args(char **args);
Expand Down
49 changes: 25 additions & 24 deletions opal/mca/base/mca_base_cmd_line.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,29 @@ int mca_base_cmd_line_setup(opal_cmd_line_t *cmd)
/*
* Look for and handle any -mca options on the command line
*/
int mca_base_cmd_line_process_args(char **argv,
int mca_base_cmd_line_process_args(opal_cmd_line_t *cmd,
char ***context_env, char ***global_env)
{
int i, rc;
int i, num_insts, rc;
char **params;
char **values;

/* If no relevant parameters were given, just return */

if (!opal_cmd_line_is_taken(cmd, OPAL_MCA_CMD_LINE_ID) &&
!opal_cmd_line_is_taken(cmd, "g"OPAL_MCA_CMD_LINE_ID)) {
return OPAL_SUCCESS;
}

/* Handle app context-specific parameters */

num_insts = opal_cmd_line_get_ninsts(cmd, OPAL_MCA_CMD_LINE_ID);
params = values = NULL;
for (i = 0; NULL != argv[i]; ++i) {
if (0 == strcmp("-"OPAL_MCA_CMD_LINE_ID, argv[i]) ||
0 == strcmp("--"OPAL_MCA_CMD_LINE_ID, argv[i])) {
if (NULL == argv[i+1] || NULL == argv[i+2]) {
return OPAL_ERR_BAD_PARAM;
}
if (OPAL_SUCCESS != (rc = process_arg(argv[i+1], argv[i+2],
&params, &values))) {
return rc;
}
i += 2;
for (i = 0; i < num_insts; ++i) {
if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, OPAL_MCA_CMD_LINE_ID, i, 0),
opal_cmd_line_get_param(cmd, OPAL_MCA_CMD_LINE_ID, i, 1),
&params, &values))) {
return rc;
}
}
if (NULL != params) {
Expand All @@ -121,19 +125,15 @@ int mca_base_cmd_line_process_args(char **argv,
opal_argv_free(values);
}

/* Handle global parameters */

num_insts = opal_cmd_line_get_ninsts(cmd, "g"OPAL_MCA_CMD_LINE_ID);
params = values = NULL;
for (i = 0; NULL != argv[i]; ++i) {
if (0 == strcmp("-g"OPAL_MCA_CMD_LINE_ID, argv[i]) ||
0 == strcmp("--g"OPAL_MCA_CMD_LINE_ID, argv[i])) {
if (NULL == argv[i+1] || NULL == argv[i+2]) {
return OPAL_ERR_BAD_PARAM;
}
if (OPAL_SUCCESS != (rc = process_arg(argv[i+1], argv[i+2],
&params, &values))) {
return rc;
}
i += 2;
for (i = 0; i < num_insts; ++i) {
if (OPAL_SUCCESS != (rc = process_arg(opal_cmd_line_get_param(cmd, "g"OPAL_MCA_CMD_LINE_ID, i, 0),
opal_cmd_line_get_param(cmd, "g"OPAL_MCA_CMD_LINE_ID, i, 1),
&params, &values))) {
return rc;
}
}
if (NULL != params) {
Expand Down Expand Up @@ -190,6 +190,7 @@ static int process_arg(const char *param, const char *value,

/* If we didn't already have an value for the same param, save
this one away */

opal_argv_append_nosize(params, param);
opal_argv_append_nosize(values, p1);
free(p1);
Expand Down
2 changes: 1 addition & 1 deletion opal/runtime/opal_info_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ int opal_info_init(int argc, char **argv,
exit(cmd_error ? 1 : 0);
}

mca_base_cmd_line_process_args(argv, &app_env, &global_env);
mca_base_cmd_line_process_args(opal_info_cmd_line, &app_env, &global_env);


/* set the flags */
Expand Down
4 changes: 1 addition & 3 deletions opal/util/cmd_line.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ int opal_cmd_line_create(opal_cmd_line_t *cmd,
}
OBJ_CONSTRUCT(cmd, opal_cmd_line_t);

if (NULL != table) {
ret = opal_cmd_line_add(cmd, table);
}
ret = opal_cmd_line_add(cmd, table);
return ret;
}

Expand Down
9 changes: 0 additions & 9 deletions orte/mca/ess/hnp/ess_hnp_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
#include "orte/mca/state/base/base.h"
#include "orte/mca/state/state.h"

#include "orte/orted/orted_submit.h"
#include "orte/orted/pmix/pmix_server.h"

#include "orte/util/show_help.h"
Expand Down Expand Up @@ -714,14 +713,6 @@ static int rte_init(void)
goto error;
}

/* setup to support debugging */
orte_state.add_job_state(ORTE_JOB_STATE_READY_FOR_DEBUGGERS,
orte_debugger_init_after_spawn,
ORTE_SYS_PRI);
orte_state.add_job_state(ORTE_JOB_STATE_DEBUGGER_DETACH,
orte_debugger_detached,
ORTE_SYS_PRI);

/* if a tool has launched us and is requesting event reports,
* then set its contact info into the comm system
*/
Expand Down
8 changes: 7 additions & 1 deletion orte/mca/grpcomm/base/grpcomm_base_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static int create_dmns(orte_grpcomm_signature_t *sig,
*dmns = NULL;
return ORTE_ERR_NOT_FOUND;
}
if (0 == jdata->map->num_nodes) {
if (NULL == jdata->map) {
/* we haven't generated a job map yet - if we are the HNP,
* then we should only involve ourselves. Otherwise, we have
* no choice but to abort to avoid hangs */
Expand All @@ -340,6 +340,12 @@ static int create_dmns(orte_grpcomm_signature_t *sig,
*dmns = NULL;
return ORTE_ERR_NOT_FOUND;
}
/* get the array */
if (0 == jdata->map->num_nodes) {
ORTE_UPDATE_EXIT_STATUS(ORTE_ERROR_DEFAULT_EXIT_CODE);
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
return ORTE_ERR_SILENT;
}
dns = (orte_vpid_t*)malloc(jdata->map->num_nodes * sizeof(vpid));
nds = 0;
for (i=0; i < jdata->map->nodes->size && (int)nds < jdata->map->num_nodes; i++) {
Expand Down
33 changes: 22 additions & 11 deletions orte/mca/plm/base/plm_base_launch_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -1537,9 +1537,6 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
return ORTE_ERR_NOT_FOUND;
}
if (NULL == daemons->map) {
daemons->map = OBJ_NEW(orte_job_map_t);
}
map = daemons->map;

/* if this job is being launched against a fixed DVM, then there is
Expand All @@ -1555,7 +1552,8 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
* the virtual machine unless specifically requested to do so
*/
if (ORTE_JOBID_INVALID != jdata->originator.jobid) {
if (0 == map->num_nodes) {
OBJ_CONSTRUCT(&nodes, opal_list_t);
if (NULL == daemons->map) {
OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output,
"%s plm:base:setup_vm creating map",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
Expand All @@ -1564,15 +1562,16 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
* are obviously already here! The ess will already
* have assigned our node to us.
*/
daemons->map = OBJ_NEW(orte_job_map_t);
node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
opal_pointer_array_add(map->nodes, (void*)node);
++(map->num_nodes);
opal_pointer_array_add(daemons->map->nodes, (void*)node);
++(daemons->map->num_nodes);
/* maintain accounting */
OBJ_RETAIN(node);
/* mark that this is from a singleton */
singleton = true;
}
OBJ_CONSTRUCT(&nodes, opal_list_t);
map = daemons->map;
for (i=1; i < orte_node_pool->size; i++) {
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
continue;
Expand Down Expand Up @@ -1619,6 +1618,16 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
*/
if (orte_get_attribute(&daemons->attributes, ORTE_JOB_NO_VM, NULL, OPAL_BOOL)) {
OBJ_CONSTRUCT(&nodes, opal_list_t);
if (NULL == daemons->map) {
OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output,
"%s plm:base:setup_vm creating map",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
/* this is the first time thru, so the vm is just getting
* defined - create a map for it
*/
daemons->map = OBJ_NEW(orte_job_map_t);
}
map = daemons->map;
/* loop across all nodes and include those that have
* num_procs > 0 && no daemon already on them
*/
Expand Down Expand Up @@ -1676,21 +1685,23 @@ int orte_plm_base_setup_virtual_machine(orte_job_t *jdata)
goto process;
}

if (0 == map->num_nodes) {
if (NULL == daemons->map) {
OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output,
"%s plm:base:setup_vm creating map",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
/* this is the first time thru, so the vm is just getting
* defined - put us in as we
* defined - create a map for it and put us in as we
* are obviously already here! The ess will already
* have assigned our node to us.
*/
daemons->map = OBJ_NEW(orte_job_map_t);
node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
opal_pointer_array_add(map->nodes, (void*)node);
++(map->num_nodes);
opal_pointer_array_add(daemons->map->nodes, (void*)node);
++(daemons->map->num_nodes);
/* maintain accounting */
OBJ_RETAIN(node);
}
map = daemons->map;

/* zero-out the number of new daemons as we will compute this
* each time we are called
Expand Down
6 changes: 2 additions & 4 deletions orte/mca/rmaps/ppr/rmaps_ppr.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@ static int ppr_mapper(orte_job_t *jdata)
ORTE_MAPPING_PPR != ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) {
/* not for us */
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
"mca:rmaps:ppr: job %s not using ppr mapper PPR %s policy %s",
ORTE_JOBID_PRINT(jdata->jobid),
(NULL == jdata->map->ppr) ? "NULL" : jdata->map->ppr,
(ORTE_MAPPING_PPR == ORTE_GET_MAPPING_POLICY(jdata->map->mapping)) ? "PPRSET" : "PPR NOTSET");
"mca:rmaps:ppr: job %s not using ppr mapper",
ORTE_JOBID_PRINT(jdata->jobid));
return ORTE_ERR_TAKE_NEXT_OPTION;
}

Expand Down
11 changes: 6 additions & 5 deletions orte/mca/schizo/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ ORTE_DECLSPEC int orte_schizo_base_select(void);
typedef struct {
/* list of active modules */
opal_list_t active_modules;
char **personalities;
} orte_schizo_base_t;

/**
Expand All @@ -62,13 +61,15 @@ OBJ_CLASS_DECLARATION(orte_schizo_base_active_module_t);

/* the base stub functions */
ORTE_DECLSPEC const char* orte_schizo_base_print_env(orte_schizo_launch_environ_t env);
ORTE_DECLSPEC int orte_schizo_base_define_cli(opal_cmd_line_t *cli);
ORTE_DECLSPEC int orte_schizo_base_parse_cli(int argc, int start, char **argv);
ORTE_DECLSPEC int orte_schizo_base_parse_env(char *path,
ORTE_DECLSPEC int orte_schizo_base_parse_cli(char **personality,
int argc, int start, char **argv);
ORTE_DECLSPEC int orte_schizo_base_parse_env(char **personality,
char *path,
opal_cmd_line_t *cmd_line,
char **srcenv,
char ***dstenv);
ORTE_DECLSPEC int orte_schizo_base_setup_app(orte_app_context_t *app);
ORTE_DECLSPEC int orte_schizo_base_setup_app(char **personality,
orte_app_context_t *app);
ORTE_DECLSPEC int orte_schizo_base_setup_fork(orte_job_t *jdata,
orte_app_context_t *context);
ORTE_DECLSPEC int orte_schizo_base_setup_child(orte_job_t *jobdat,
Expand Down
26 changes: 1 addition & 25 deletions orte/mca/schizo/base/schizo_base_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
*/
orte_schizo_base_t orte_schizo_base = {{{0}}};
orte_schizo_base_module_t orte_schizo = {
.define_cli = orte_schizo_base_define_cli,
.parse_cli = orte_schizo_base_parse_cli,
.parse_env = orte_schizo_base_parse_env,
.setup_app = orte_schizo_base_setup_app,
Expand All @@ -47,28 +46,10 @@ orte_schizo_base_module_t orte_schizo = {
.finalize = orte_schizo_base_finalize
};

static char *personalities = NULL;

static int orte_schizo_base_register(mca_base_register_flag_t flags)
{
/* pickup any defined personalities */
personalities = NULL;
mca_base_var_register("orte", "schizo", "base", "personalities",
"Comma-separated list of personalities",
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&personalities);
return ORTE_SUCCESS;
}

static int orte_schizo_base_close(void)
{
/* cleanup globals */
OPAL_LIST_DESTRUCT(&orte_schizo_base.active_modules);
if (NULL != orte_schizo_base.personalities) {
opal_argv_free(orte_schizo_base.personalities);
}

return mca_base_framework_components_close(&orte_schizo_base_framework, NULL);
}
Expand All @@ -83,10 +64,6 @@ static int orte_schizo_base_open(mca_base_open_flag_t flags)

/* init the globals */
OBJ_CONSTRUCT(&orte_schizo_base.active_modules, opal_list_t);
orte_schizo_base.personalities = NULL;
if (NULL != personalities) {
orte_schizo_base.personalities = opal_argv_split(personalities, ',');
}

/* Open up all available components */
rc = mca_base_framework_components_open(&orte_schizo_base_framework, flags);
Expand All @@ -96,8 +73,7 @@ static int orte_schizo_base_open(mca_base_open_flag_t flags)
}

MCA_BASE_FRAMEWORK_DECLARE(orte, schizo, "ORTE Schizo Subsystem",
orte_schizo_base_register,
orte_schizo_base_open, orte_schizo_base_close,
NULL, orte_schizo_base_open, orte_schizo_base_close,
mca_schizo_base_static_components, 0);

OBJ_CLASS_INSTANCE(orte_schizo_base_active_module_t,
Expand Down
Loading