1
1

Change the names to be slightly more descriptive.

This commit was SVN r25271.
Этот коммит содержится в:
Jeff Squyres 2011-10-12 16:07:09 +00:00
родитель 4e6a6fc146
Коммит ff97b57c90
3 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -128,18 +128,18 @@ OPAL_DECLSPEC extern opal_hwloc_base_map_t opal_hwloc_base_map;
* and fails. BFA = bind failure action.
*/
typedef enum {
OPAL_HWLOC_BASE_BFA_WARN,
OPAL_HWLOC_BASE_BFA_ERROR
} opal_hwloc_base_bfa_t;
OPAL_HWLOC_BASE_MBFA_WARN,
OPAL_HWLOC_BASE_MBFA_ERROR
} opal_hwloc_base_mbfa_t;
/**
* Global reflecting the BFA (set by MCA param).
*/
OPAL_DECLSPEC extern opal_hwloc_base_bfa_t opal_hwloc_base_bfa;
OPAL_DECLSPEC extern opal_hwloc_base_mbfa_t opal_hwloc_base_mbfa;
/**
* This function sets the process-wide memory affinity policy
* according to opal_hwloc_base_map and opal_hwloc_base_bfa. It needs
* according to opal_hwloc_base_map and opal_hwloc_base_mbfa. It needs
* to be a separate, standalone function (as opposed to being done
* during opal_hwloc_base_open()) because opal_hwloc_topology is not
* loaded by opal_hwloc_base_open(). Hence, an upper layer needs to

Просмотреть файл

@ -40,7 +40,7 @@ bool opal_hwloc_base_inited = false;
hwloc_topology_t opal_hwloc_topology=NULL;
#endif
opal_hwloc_base_map_t opal_hwloc_base_map = OPAL_HWLOC_BASE_MAP_NONE;
opal_hwloc_base_bfa_t opal_hwloc_base_bfa = OPAL_HWLOC_BASE_BFA_ERROR;
opal_hwloc_base_mbfa_t opal_hwloc_base_mbfa = OPAL_HWLOC_BASE_MBFA_ERROR;
int opal_hwloc_base_open(void)
@ -76,7 +76,7 @@ int opal_hwloc_base_open(void)
str_value = "local_only";
break;
}
mca_base_param_reg_string_name("hwloc", "base_alloc_policy",
mca_base_param_reg_string_name("hwloc", "base_mem_alloc_policy",
"Policy that determines how general memory allocations are bound after MPI_INIT. A value of \"none\" means that no memory policy is applied. A value of \"local_only\" means that all memory allocations will be restricted to the local NUMA node where each process is placed. Note that operating system paging policies are unaffected by this setting. For example, if \"local_only\" is used and local NUMA node memory is exhausted, a new memory allocation may cause paging.",
false, false, str_value, &str_value);
if (strcasecmp(str_value, "none") == 0) {
@ -93,21 +93,21 @@ int opal_hwloc_base_open(void)
}
/* hwloc_base_bind_failure_action */
switch (opal_hwloc_base_bfa) {
case OPAL_HWLOC_BASE_BFA_WARN:
switch (opal_hwloc_base_mbfa) {
case OPAL_HWLOC_BASE_MBFA_WARN:
str_value = "warn";
break;
case OPAL_HWLOC_BASE_BFA_ERROR:
case OPAL_HWLOC_BASE_MBFA_ERROR:
str_value = "error";
break;
}
mca_base_param_reg_string_name("hwloc", "base_bind_failure_action",
mca_base_param_reg_string_name("hwloc", "base_mem_bind_failure_action",
"What Open MPI will do if it explicitly tries to bind memory to a specific NUMA location, and fails. Note that this is a different case than the general allocation policy described by hwloc_base_alloc_policy. A value of \"warn\" means that Open MPI will warn the first time this happens, but allow the job to continue (possibly with degraded performance). A value of \"error\" means that Open MPI will abort the job if this happens.",
false, false, str_value, &str_value);
if (strcasecmp(str_value, "warn") == 0) {
opal_hwloc_base_bfa = OPAL_HWLOC_BASE_BFA_WARN;
opal_hwloc_base_mbfa = OPAL_HWLOC_BASE_MBFA_WARN;
} else if (strcasecmp(str_value, "error") == 0) {
opal_hwloc_base_bfa = OPAL_HWLOC_BASE_BFA_ERROR;
opal_hwloc_base_mbfa = OPAL_HWLOC_BASE_MBFA_ERROR;
} else {
char hostname[32];
gethostname(hostname, sizeof(hostname));

Просмотреть файл

@ -45,7 +45,7 @@ int opal_hwloc_base_report_bind_failure(const char *file,
opal_show_help("help-opal-hwloc-base.txt", "mbind failure", true,
hostname, getpid(), file, line, msg,
(OPAL_HWLOC_BASE_BFA_WARN == opal_hwloc_base_bfa) ?
(OPAL_HWLOC_BASE_MBFA_WARN == opal_hwloc_base_mbfa) ?
"Warning -- your job will continue, but possibly with degraded performance" :
"ERROR -- your job may abort or behave erraticly");
already_reported = 1;