From 4c101c639488f75bb3bbedda93ebbc49f4ad974a Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Wed, 19 Jul 2006 20:55:29 +0000 Subject: [PATCH] * rename the collectives sm bootstrap area to be consistent with other shared memory segments * make sure to properly unlink the collectives sm bootstrap area at shutdown * Add missing / in the path for the mpool shared memory segment * make sure to release the common_mmap structure in the SM btl after unlinking the file during shutdown This commit was SVN r10886. --- ompi/mca/btl/sm/btl_sm_component.c | 1 + ompi/mca/coll/sm/coll_sm_component.c | 2 +- ompi/mca/coll/sm/coll_sm_module.c | 5 ++++- ompi/mca/mpool/sm/mpool_sm_component.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ompi/mca/btl/sm/btl_sm_component.c b/ompi/mca/btl/sm/btl_sm_component.c index 51f1533c36..57f69ca960 100644 --- a/ompi/mca/btl/sm/btl_sm_component.c +++ b/ompi/mca/btl/sm/btl_sm_component.c @@ -203,6 +203,7 @@ int mca_btl_sm_component_close(void) * to call this, so that in an abnormal termination scenario, * this file will still get cleaned up */ unlink(mca_btl_sm_component.mmap_file->map_path); + OBJ_RELEASE(mca_btl_sm_component.mmap_file); } #if OMPI_ENABLE_PROGRESS_THREADS == 1 diff --git a/ompi/mca/coll/sm/coll_sm_component.c b/ompi/mca/coll/sm/coll_sm_component.c index 89b7c385bd..290cf3a785 100644 --- a/ompi/mca/coll/sm/coll_sm_component.c +++ b/ompi/mca/coll/sm/coll_sm_component.c @@ -103,7 +103,7 @@ mca_coll_sm_component_t mca_coll_sm_component = { 4096, /* (default) bootstrap filename */ - "coll-sm-bootstrap", + "shared_mem_sm_bootstrap", /* (default) number of segments in bootstrap file */ 8, diff --git a/ompi/mca/coll/sm/coll_sm_module.c b/ompi/mca/coll/sm/coll_sm_module.c index 88a0332102..a70c8ebc49 100644 --- a/ompi/mca/coll/sm/coll_sm_module.c +++ b/ompi/mca/coll/sm/coll_sm_module.c @@ -785,7 +785,10 @@ int mca_coll_sm_bootstrap_finalize(void) anything in here -- all data structures are referencing within the bootstrap area, so the one top-level unmap does it all) */ - mca_common_sm_mmap_fini( meta ); + if (OMPI_SUCCESS == mca_common_sm_mmap_fini( meta )) { + unlink(meta->map_path); + } + OBJ_RELEASE(meta); } return OMPI_SUCCESS; diff --git a/ompi/mca/mpool/sm/mpool_sm_component.c b/ompi/mca/mpool/sm/mpool_sm_component.c index f2e44494a5..b3d3553f72 100644 --- a/ompi/mca/mpool/sm/mpool_sm_component.c +++ b/ompi/mca/mpool/sm/mpool_sm_component.c @@ -142,7 +142,7 @@ static mca_mpool_base_module_t* mca_mpool_sm_init( mca_mpool_sm_module_init(mpool_module); /* create initial shared memory mapping */ - len = asprintf( &file_name, "%sshared_mem_pool.%s", + len = asprintf( &file_name, "%s/shared_mem_pool.%s", orte_process_info.job_session_dir, orte_system_info.nodename ); if ( 0 > len ) {