1
1

Remove my patch (r23238) and push Scott Atchley patch. Thanks Scott.

This commit was SVN r23435.

The following SVN revision numbers were found above:
  r23238 --> open-mpi/ompi@c8ee150c95
Этот коммит содержится в:
George Bosilca 2010-07-19 20:46:12 +00:00
родитель a8f69c9e3b
Коммит 519bbf6b6b

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

@ -37,6 +37,7 @@
int mx__regcache_clean(void *ptr, size_t size); int mx__regcache_clean(void *ptr, size_t size);
static int ompi_common_mx_initialize_ref_cnt = 0; static int ompi_common_mx_initialize_ref_cnt = 0;
static int ompi_common_mx_available = 0;
static mca_mpool_base_module_t *ompi_common_mx_fake_mpool = 0; static mca_mpool_base_module_t *ompi_common_mx_fake_mpool = 0;
int int
@ -44,7 +45,7 @@ ompi_common_mx_initialize(void)
{ {
mx_return_t mx_return; mx_return_t mx_return;
struct mca_mpool_base_resources_t mpool_resources; struct mca_mpool_base_resources_t mpool_resources;
int index, value; int index, value, ret = OMPI_SUCCESS;
ompi_common_mx_initialize_ref_cnt++; ompi_common_mx_initialize_ref_cnt++;
@ -72,7 +73,6 @@ ompi_common_mx_initialize(void)
ompi_mpi_leave_pinned = 1; ompi_mpi_leave_pinned = 1;
setenv("MX_RCACHE", "2", 1); setenv("MX_RCACHE", "2", 1);
mpool_resources.regcache_clean = mx__regcache_clean;
ompi_common_mx_fake_mpool = ompi_common_mx_fake_mpool =
mca_mpool_base_module_create("fake", NULL, &mpool_resources); mca_mpool_base_module_create("fake", NULL, &mpool_resources);
if (!ompi_common_mx_fake_mpool) { if (!ompi_common_mx_fake_mpool) {
@ -88,6 +88,10 @@ ompi_common_mx_initialize(void)
mx_return = mx_init(); mx_return = mx_init();
if(MX_SUCCESS != mx_return) { if(MX_SUCCESS != mx_return) {
ompi_common_mx_available = -1;
if (ompi_common_mx_fake_mpool) {
mca_mpool_base_module_destroy(ompi_common_mx_fake_mpool);
}
opal_output(0, opal_output(0,
"Error in mx_init (error %s)\n", "Error in mx_init (error %s)\n",
mx_strerror(mx_return)); mx_strerror(mx_return));
@ -95,11 +99,14 @@ ompi_common_mx_initialize(void)
ompi_common_mx_initialize_ref_cnt = 0; ompi_common_mx_initialize_ref_cnt = 0;
return OMPI_ERR_NOT_AVAILABLE; return OMPI_ERR_NOT_AVAILABLE;
} }
ompi_common_mx_available = 1;
} mpool_resources.regcache_clean = mx__regcache_clean;
return OMPI_SUCCESS; } else if (ompi_common_mx_available < 0) {
} ret = OMPI_ERR_NOT_AVAILABLE;
}
return ret;
}
int int
ompi_common_mx_finalize(void) ompi_common_mx_finalize(void)