Check for both absolute-path-to-mpirun and -prefix being specified. If the two differ, print out a warning and ignore -prefix. If they are the same, or only one was given, then proceed as directed.
This commit was SVN r24657.
Этот коммит содержится в:
родитель
c8c8044b92
Коммит
6af2677fb8
@ -150,6 +150,17 @@ It is dangerous to interrupt %s while it is killing a job (proper
|
|||||||
termination may not be guaranteed). Hit control-C again within 1
|
termination may not be guaranteed). Hit control-C again within 1
|
||||||
second if you really want to kill %s immediately.
|
second if you really want to kill %s immediately.
|
||||||
#
|
#
|
||||||
|
[orterun:double-prefix]
|
||||||
|
Both a prefix was supplied to %s and the absolute path to %s was
|
||||||
|
given:
|
||||||
|
|
||||||
|
Prefix: %s
|
||||||
|
Path: %s
|
||||||
|
|
||||||
|
Only one should be specified to avoid potential version
|
||||||
|
confusion. Operation will continue, but the -prefix option will be
|
||||||
|
ignored.
|
||||||
|
#
|
||||||
[orterun:empty-prefix]
|
[orterun:empty-prefix]
|
||||||
A prefix was supplied to %s that only contained slashes.
|
A prefix was supplied to %s that only contained slashes.
|
||||||
|
|
||||||
|
@ -1558,14 +1558,26 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
|
|||||||
if (opal_cmd_line_is_taken(&cmd_line, "prefix") ||
|
if (opal_cmd_line_is_taken(&cmd_line, "prefix") ||
|
||||||
'/' == argv[0][0] || want_prefix_by_default) {
|
'/' == argv[0][0] || want_prefix_by_default) {
|
||||||
size_t param_len;
|
size_t param_len;
|
||||||
|
char *path_to_mpirun;
|
||||||
|
|
||||||
/* The --prefix option takes precedence over /path/to/orterun */
|
/* if both are given, check to see if they match */
|
||||||
if (opal_cmd_line_is_taken(&cmd_line, "prefix")) {
|
if (opal_cmd_line_is_taken(&cmd_line, "prefix") && '/' == argv[0][0]) {
|
||||||
|
/* if they don't match, then that merits a warning */
|
||||||
param = opal_cmd_line_get_param(&cmd_line, "prefix", 0, 0);
|
param = opal_cmd_line_get_param(&cmd_line, "prefix", 0, 0);
|
||||||
}
|
path_to_mpirun = opal_dirname(argv[0]);
|
||||||
/* /path/to/orterun */
|
if (0 != strcmp(param, path_to_mpirun)) {
|
||||||
else if ('/' == argv[0][0]) {
|
orte_show_help("help-orterun.txt", "orterun:double-prefix",
|
||||||
char* tmp_basename = NULL;
|
true, orte_basename, orte_basename, param, path_to_mpirun);
|
||||||
|
/* let the path-to-mpirun take precedence since we
|
||||||
|
* know that one is being used
|
||||||
|
*/
|
||||||
|
param = path_to_mpirun;
|
||||||
|
} else {
|
||||||
|
/* since they match, just use param */
|
||||||
|
free(path_to_mpirun);
|
||||||
|
}
|
||||||
|
} else if ('/' == argv[0][0]) {
|
||||||
|
char* tmp_basename = NULL;
|
||||||
/* If they specified an absolute path, strip off the
|
/* If they specified an absolute path, strip off the
|
||||||
/bin/<exec_name>" and leave just the prefix */
|
/bin/<exec_name>" and leave just the prefix */
|
||||||
param = opal_dirname(argv[0]);
|
param = opal_dirname(argv[0]);
|
||||||
@ -1583,10 +1595,12 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
|
|||||||
param = NULL;
|
param = NULL;
|
||||||
}
|
}
|
||||||
free(tmp_basename);
|
free(tmp_basename);
|
||||||
}
|
} else if (opal_cmd_line_is_taken(&cmd_line, "prefix")){
|
||||||
/* --enable-orterun-prefix-default was given to orterun */
|
/* must be --prefix alone */
|
||||||
else {
|
param = strdup(opal_cmd_line_get_param(&cmd_line, "prefix", 0, 0));
|
||||||
param = opal_install_dirs.prefix;
|
} else {
|
||||||
|
/* --enable-orterun-prefix-default was given to orterun */
|
||||||
|
param = strdup(opal_install_dirs.prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != param) {
|
if (NULL != param) {
|
||||||
@ -1603,6 +1617,7 @@ static int create_app(int argc, char* argv[], orte_app_context_t **app_ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
app->prefix_dir = strdup(param);
|
app->prefix_dir = strdup(param);
|
||||||
|
free(param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user