This commit compliements/completes r30140. r30140 made all the
configury/Makefile.am changes; this commit renames the internal installdirs.h framework struct field names to match the configry macro names: * pkgdatdir -> ompidatadir * pkglibdir -> ompilibdir * pkgincludedir -> ompiincludedir This commit was SVN r30145. The following SVN revision numbers were found above: r30140 --> open-mpi/ompi@8b778903d8
Этот коммит содержится в:
родитель
7d472ad5a5
Коммит
13b29cff2c
@ -168,7 +168,7 @@ ompi_debugger_setup_dlls(void)
|
||||
int i;
|
||||
char **dirs, **tmp1 = NULL, **tmp2 = NULL;
|
||||
|
||||
ompi_debugger_dll_path = opal_install_dirs.pkglibdir;
|
||||
ompi_debugger_dll_path = opal_install_dirs.ompilibdir;
|
||||
(void) mca_base_var_register("ompi", "ompi", "debugger", "dll_path",
|
||||
"List of directories where MPI_INIT should search for debugger plugins",
|
||||
MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
|
||||
|
@ -1978,7 +1978,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
|
||||
mca_btl_openib_component.receive_queues)) {
|
||||
opal_show_help("help-mpi-btl-openib.txt",
|
||||
"locally conflicting receive_queues", true,
|
||||
opal_install_dirs.pkgdatadir,
|
||||
opal_install_dirs.ompidatadir,
|
||||
ompi_process_info.nodename,
|
||||
ibv_get_device_name(receive_queues_device->ib_dev),
|
||||
receive_queues_device->ib_dev_attr.vendor_id,
|
||||
@ -2002,7 +2002,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
|
||||
mca_btl_openib_component.receive_queues_source) {
|
||||
opal_show_help("help-mpi-btl-openib.txt",
|
||||
"locally conflicting receive_queues", true,
|
||||
opal_install_dirs.pkgdatadir,
|
||||
opal_install_dirs.ompidatadir,
|
||||
ompi_process_info.nodename,
|
||||
ibv_get_device_name(receive_queues_device->ib_dev),
|
||||
receive_queues_device->ib_dev_attr.vendor_id,
|
||||
|
@ -270,7 +270,7 @@ int btl_openib_register_mca_params(void)
|
||||
OMPI_HAVE_IBV_FORK_INIT ? -1 : 0, &mca_btl_openib_component.want_fork_support, 0));
|
||||
|
||||
asprintf(&str, "%s/mca-btl-openib-device-params.ini",
|
||||
opal_install_dirs.pkgdatadir);
|
||||
opal_install_dirs.ompidatadir);
|
||||
if (NULL == str) {
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ int mca_coll_ml_register_params(void)
|
||||
, 0, &mca_coll_ml_component.use_brucks_smsg_alltoall, 0));
|
||||
|
||||
asprintf(&str, "%s/mca-coll-ml.config",
|
||||
opal_install_dirs.pkgdatadir);
|
||||
opal_install_dirs.ompidatadir);
|
||||
if (NULL == str) {
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
@ -75,10 +75,10 @@ int mca_base_open(void)
|
||||
|
||||
/* define the system and user default paths */
|
||||
#if OPAL_WANT_HOME_CONFIG_FILES
|
||||
mca_base_system_default_path = strdup(opal_install_dirs.pkglibdir);
|
||||
mca_base_system_default_path = strdup(opal_install_dirs.ompilibdir);
|
||||
asprintf(&mca_base_user_default_path, "%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"components", opal_home_directory());
|
||||
#else
|
||||
asprintf(&mca_base_system_default_path, "%s", opal_install_dirs.pkglibdir);
|
||||
asprintf(&mca_base_system_default_path, "%s", opal_install_dirs.ompilibdir);
|
||||
#endif
|
||||
|
||||
/* see if the user wants to override the defaults */
|
||||
|
@ -350,7 +350,7 @@ static int mca_base_var_cache_files(bool rel_path_search)
|
||||
MCA_BASE_VAR_SCOPE_READONLY, &mca_base_var_file_prefix);
|
||||
|
||||
ret = asprintf(&mca_base_param_file_path, "%s" OPAL_PATH_SEP "amca-param-sets%c%s",
|
||||
opal_install_dirs.pkgdatadir, OPAL_ENV_SEP, cwd);
|
||||
opal_install_dirs.ompidatadir, OPAL_ENV_SEP, cwd);
|
||||
if (0 > ret) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
@ -74,11 +74,11 @@ opal_installdirs_base_open(mca_base_open_flag_t flags)
|
||||
CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data,
|
||||
mandir);
|
||||
CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data,
|
||||
pkgdatadir);
|
||||
ompidatadir);
|
||||
CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data,
|
||||
pkglibdir);
|
||||
ompilibdir);
|
||||
CONDITIONAL_COPY(opal_install_dirs, component->install_dirs_data,
|
||||
pkgincludedir);
|
||||
ompiincludedir);
|
||||
}
|
||||
|
||||
/* expand out all the fields */
|
||||
@ -110,12 +110,12 @@ opal_installdirs_base_open(mca_base_open_flag_t flags)
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.infodir);
|
||||
opal_install_dirs.mandir =
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.mandir);
|
||||
opal_install_dirs.pkgdatadir =
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.pkgdatadir);
|
||||
opal_install_dirs.pkglibdir =
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.pkglibdir);
|
||||
opal_install_dirs.pkgincludedir =
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.pkgincludedir);
|
||||
opal_install_dirs.ompidatadir =
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.ompidatadir);
|
||||
opal_install_dirs.ompilibdir =
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.ompilibdir);
|
||||
opal_install_dirs.ompiincludedir =
|
||||
opal_install_dirs_expand_setup(opal_install_dirs.ompiincludedir);
|
||||
|
||||
#if 0
|
||||
fprintf(stderr, "prefix: %s\n", opal_install_dirs.prefix);
|
||||
@ -161,9 +161,9 @@ opal_installdirs_base_close(void)
|
||||
free(opal_install_dirs.includedir);
|
||||
free(opal_install_dirs.infodir);
|
||||
free(opal_install_dirs.mandir);
|
||||
free(opal_install_dirs.pkgdatadir);
|
||||
free(opal_install_dirs.pkglibdir);
|
||||
free(opal_install_dirs.pkgincludedir);
|
||||
free(opal_install_dirs.ompidatadir);
|
||||
free(opal_install_dirs.ompilibdir);
|
||||
free(opal_install_dirs.ompiincludedir);
|
||||
|
||||
return mca_base_framework_components_close (&opal_installdirs_base_framework, NULL);
|
||||
}
|
||||
|
@ -24,23 +24,25 @@
|
||||
pass values through AC_SUBST without being munged by m4 (e.g., if
|
||||
we want to pass "@{libdir}" and not have it replaced by m4 to be
|
||||
whatever the actual value of the shell variable is. */
|
||||
#define EXPAND_STRING(field) \
|
||||
#define EXPAND_STRING(name) EXPAND_STRING2(name, name)
|
||||
|
||||
#define EXPAND_STRING2(ompiname, fieldname) \
|
||||
do { \
|
||||
if (NULL != (start_pos = strstr(retval, "${" #field "}"))) { \
|
||||
if (NULL != (start_pos = strstr(retval, "${" #fieldname "}"))) { \
|
||||
tmp = retval; \
|
||||
*start_pos = '\0'; \
|
||||
end_pos = start_pos + strlen("${" #field "}"); \
|
||||
end_pos = start_pos + strlen("${" #fieldname "}"); \
|
||||
asprintf(&retval, "%s%s%s", tmp, \
|
||||
opal_install_dirs.field + destdir_offset, \
|
||||
opal_install_dirs.ompiname + destdir_offset, \
|
||||
end_pos); \
|
||||
free(tmp); \
|
||||
changed = true; \
|
||||
} else if (NULL != (start_pos = strstr(retval, "@{" #field "}"))) { \
|
||||
} else if (NULL != (start_pos = strstr(retval, "@{" #fieldname "}"))) { \
|
||||
tmp = retval; \
|
||||
*start_pos = '\0'; \
|
||||
end_pos = start_pos + strlen("@{" #field "}"); \
|
||||
end_pos = start_pos + strlen("@{" #fieldname "}"); \
|
||||
asprintf(&retval, "%s%s%s", tmp, \
|
||||
opal_install_dirs.field + destdir_offset, \
|
||||
opal_install_dirs.ompiname + destdir_offset, \
|
||||
end_pos); \
|
||||
free(tmp); \
|
||||
changed = true; \
|
||||
@ -139,9 +141,9 @@ opal_install_dirs_expand_internal(const char* input, bool is_setup)
|
||||
EXPAND_STRING(includedir);
|
||||
EXPAND_STRING(infodir);
|
||||
EXPAND_STRING(mandir);
|
||||
EXPAND_STRING(pkgdatadir);
|
||||
EXPAND_STRING(pkglibdir);
|
||||
EXPAND_STRING(pkgincludedir);
|
||||
EXPAND_STRING2(ompidatadir, pkgdatadir);
|
||||
EXPAND_STRING2(ompilibdir, pkglibdir);
|
||||
EXPAND_STRING2(ompiincludedir, pkgincludedir);
|
||||
} while (changed);
|
||||
}
|
||||
|
||||
|
6
opal/mca/installdirs/env/opal_installdirs_env.c
поставляемый
6
opal/mca/installdirs/env/opal_installdirs_env.c
поставляемый
@ -75,9 +75,9 @@ installdirs_env_open(void)
|
||||
SET_FIELD(includedir, "OPAL_INCLUDEDIR");
|
||||
SET_FIELD(infodir, "OPAL_INFODIR");
|
||||
SET_FIELD(mandir, "OPAL_MANDIR");
|
||||
SET_FIELD(pkgdatadir, "OPAL_PKGDATADIR");
|
||||
SET_FIELD(pkglibdir, "OPAL_PKGLIBDIR");
|
||||
SET_FIELD(pkgincludedir, "OPAL_PKGINCLUDEDIR");
|
||||
SET_FIELD(ompidatadir, "OPAL_PKGDATADIR");
|
||||
SET_FIELD(ompilibdir, "OPAL_PKGLIBDIR");
|
||||
SET_FIELD(ompiincludedir, "OPAL_PKGINCLUDEDIR");
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -37,9 +37,26 @@ struct opal_install_dirs_t {
|
||||
char* includedir;
|
||||
char* infodir;
|
||||
char* mandir;
|
||||
char* pkgdatadir;
|
||||
char* pkglibdir;
|
||||
char* pkgincludedir;
|
||||
|
||||
/* Note that the following fields intentionally have an "ompi"
|
||||
prefix, even though they're down in the OPAL layer. This is
|
||||
not abstraction break because the "ompi" they're referring to
|
||||
is for the build system of the overall software tree -- not an
|
||||
individual project within that overall tree.
|
||||
|
||||
Rather than using pkg{data,lib,includedir}, use our own
|
||||
ompi{data,lib,includedir}, which is always set to
|
||||
{datadir,libdir,includedir}/openmpi. This will keep us from
|
||||
having help files in prefix/share/open-rte when building
|
||||
without Open MPI, but in prefix/share/openmpi when building
|
||||
with Open MPI.
|
||||
|
||||
Note that these field names match macros set by configure that
|
||||
are used in Makefile.am files. E.g., project help files are
|
||||
installed into $(ompidatadir). */
|
||||
char* ompidatadir;
|
||||
char* ompilibdir;
|
||||
char* ompiincludedir;
|
||||
};
|
||||
typedef struct opal_install_dirs_t opal_install_dirs_t;
|
||||
|
||||
|
@ -361,7 +361,7 @@ void opal_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
opal_info_show_path(opal_info_path_libdir, opal_install_dirs.libdir);
|
||||
opal_info_show_path(opal_info_path_incdir, opal_install_dirs.includedir);
|
||||
opal_info_show_path(opal_info_path_mandir, opal_install_dirs.mandir);
|
||||
opal_info_show_path(opal_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
||||
opal_info_show_path(opal_info_path_pkglibdir, opal_install_dirs.ompilibdir);
|
||||
opal_info_show_path(opal_info_path_libexecdir, opal_install_dirs.libexecdir);
|
||||
opal_info_show_path(opal_info_path_datarootdir, opal_install_dirs.datarootdir);
|
||||
opal_info_show_path(opal_info_path_datadir, opal_install_dirs.datadir);
|
||||
@ -369,9 +369,9 @@ void opal_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
opal_info_show_path(opal_info_path_sharedstatedir, opal_install_dirs.sharedstatedir);
|
||||
opal_info_show_path(opal_info_path_localstatedir, opal_install_dirs.localstatedir);
|
||||
opal_info_show_path(opal_info_path_infodir, opal_install_dirs.infodir);
|
||||
opal_info_show_path(opal_info_path_pkgdatadir, opal_install_dirs.pkgdatadir);
|
||||
opal_info_show_path(opal_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
||||
opal_info_show_path(opal_info_path_pkgincludedir, opal_install_dirs.pkgincludedir);
|
||||
opal_info_show_path(opal_info_path_pkgdatadir, opal_install_dirs.ompidatadir);
|
||||
opal_info_show_path(opal_info_path_pkglibdir, opal_install_dirs.ompilibdir);
|
||||
opal_info_show_path(opal_info_path_pkgincludedir, opal_install_dirs.ompiincludedir);
|
||||
} else {
|
||||
count = opal_cmd_line_get_ninsts(cmd_line, "path");
|
||||
for (i = 0; i < count; ++i) {
|
||||
@ -388,7 +388,7 @@ void opal_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
} else if (0 == strcmp(opal_info_path_mandir, scope)) {
|
||||
opal_info_show_path(opal_info_path_mandir, opal_install_dirs.mandir);
|
||||
} else if (0 == strcmp(opal_info_path_pkglibdir, scope)) {
|
||||
opal_info_show_path(opal_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
||||
opal_info_show_path(opal_info_path_pkglibdir, opal_install_dirs.ompilibdir);
|
||||
} else if (0 == strcmp(opal_info_path_sysconfdir, scope)) {
|
||||
opal_info_show_path(opal_info_path_sysconfdir, opal_install_dirs.sysconfdir);
|
||||
} else if (0 == strcmp(opal_info_path_exec_prefix, scope)) {
|
||||
@ -408,9 +408,9 @@ void opal_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
} else if (0 == strcmp(opal_info_path_infodir, scope)) {
|
||||
opal_info_show_path(opal_info_path_infodir, opal_install_dirs.infodir);
|
||||
} else if (0 == strcmp(opal_info_path_pkgdatadir, scope)) {
|
||||
opal_info_show_path(opal_info_path_pkgdatadir, opal_install_dirs.pkgdatadir);
|
||||
opal_info_show_path(opal_info_path_pkgdatadir, opal_install_dirs.ompidatadir);
|
||||
} else if (0 == strcmp(opal_info_path_pkgincludedir, scope)) {
|
||||
opal_info_show_path(opal_info_path_pkgincludedir, opal_install_dirs.pkgincludedir);
|
||||
opal_info_show_path(opal_info_path_pkgincludedir, opal_install_dirs.ompiincludedir);
|
||||
} else {
|
||||
char *usage = opal_cmd_line_get_usage_msg(cmd_line);
|
||||
opal_show_help("help-opal_info.txt", "usage", true, usage);
|
||||
|
@ -344,7 +344,7 @@ data_init(const char *appname)
|
||||
|
||||
/* now load the data */
|
||||
asprintf(&datafile, "%s%s%s-wrapper-data.txt",
|
||||
opal_install_dirs.pkgdatadir, OPAL_PATH_SEP, appname);
|
||||
opal_install_dirs.ompidatadir, OPAL_PATH_SEP, appname);
|
||||
if (NULL == datafile) return OPAL_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
|
||||
ret = opal_util_keyval_parse(datafile, data_callback);
|
||||
|
@ -62,7 +62,7 @@ int opal_show_help_init(void)
|
||||
lds.lds_want_stderr = true;
|
||||
output_stream = opal_output_open(&lds);
|
||||
|
||||
opal_argv_append_nosize(&search_dirs, opal_install_dirs.pkgdatadir);
|
||||
opal_argv_append_nosize(&search_dirs, opal_install_dirs.ompidatadir);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ void orte_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
orte_info_show_path(orte_info_path_libdir, opal_install_dirs.libdir);
|
||||
orte_info_show_path(orte_info_path_incdir, opal_install_dirs.includedir);
|
||||
orte_info_show_path(orte_info_path_mandir, opal_install_dirs.mandir);
|
||||
orte_info_show_path(orte_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
||||
orte_info_show_path(orte_info_path_pkglibdir, opal_install_dirs.ompilibdir);
|
||||
orte_info_show_path(orte_info_path_libexecdir, opal_install_dirs.libexecdir);
|
||||
orte_info_show_path(orte_info_path_datarootdir, opal_install_dirs.datarootdir);
|
||||
orte_info_show_path(orte_info_path_datadir, opal_install_dirs.datadir);
|
||||
@ -239,9 +239,9 @@ void orte_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
orte_info_show_path(orte_info_path_sharedstatedir, opal_install_dirs.sharedstatedir);
|
||||
orte_info_show_path(orte_info_path_localstatedir, opal_install_dirs.localstatedir);
|
||||
orte_info_show_path(orte_info_path_infodir, opal_install_dirs.infodir);
|
||||
orte_info_show_path(orte_info_path_pkgdatadir, opal_install_dirs.pkgdatadir);
|
||||
orte_info_show_path(orte_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
||||
orte_info_show_path(orte_info_path_pkgincludedir, opal_install_dirs.pkgincludedir);
|
||||
orte_info_show_path(orte_info_path_pkgdatadir, opal_install_dirs.ompidatadir);
|
||||
orte_info_show_path(orte_info_path_pkglibdir, opal_install_dirs.ompilibdir);
|
||||
orte_info_show_path(orte_info_path_pkgincludedir, opal_install_dirs.ompiincludedir);
|
||||
} else {
|
||||
count = opal_cmd_line_get_ninsts(cmd_line, "path");
|
||||
for (i = 0; i < count; ++i) {
|
||||
@ -258,7 +258,7 @@ void orte_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
} else if (0 == strcmp(orte_info_path_mandir, scope)) {
|
||||
orte_info_show_path(orte_info_path_mandir, opal_install_dirs.mandir);
|
||||
} else if (0 == strcmp(orte_info_path_pkglibdir, scope)) {
|
||||
orte_info_show_path(orte_info_path_pkglibdir, opal_install_dirs.pkglibdir);
|
||||
orte_info_show_path(orte_info_path_pkglibdir, opal_install_dirs.ompilibdir);
|
||||
} else if (0 == strcmp(orte_info_path_sysconfdir, scope)) {
|
||||
orte_info_show_path(orte_info_path_sysconfdir, opal_install_dirs.sysconfdir);
|
||||
} else if (0 == strcmp(orte_info_path_exec_prefix, scope)) {
|
||||
@ -278,9 +278,9 @@ void orte_info_do_path(bool want_all, opal_cmd_line_t *cmd_line)
|
||||
} else if (0 == strcmp(orte_info_path_infodir, scope)) {
|
||||
orte_info_show_path(orte_info_path_infodir, opal_install_dirs.infodir);
|
||||
} else if (0 == strcmp(orte_info_path_pkgdatadir, scope)) {
|
||||
orte_info_show_path(orte_info_path_pkgdatadir, opal_install_dirs.pkgdatadir);
|
||||
orte_info_show_path(orte_info_path_pkgdatadir, opal_install_dirs.ompidatadir);
|
||||
} else if (0 == strcmp(orte_info_path_pkgincludedir, scope)) {
|
||||
orte_info_show_path(orte_info_path_pkgincludedir, opal_install_dirs.pkgincludedir);
|
||||
orte_info_show_path(orte_info_path_pkgincludedir, opal_install_dirs.ompiincludedir);
|
||||
} else {
|
||||
char *usage = opal_cmd_line_get_usage_msg(cmd_line);
|
||||
orte_show_help("help-orte-info.txt", "usage", true, usage);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user