2004-08-02 00:24:22 +00:00
|
|
|
/*
|
2007-03-16 23:11:45 +00:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 19:57:48 +00:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
Fixes trac:1988. The little bug that turned out to be huge. Yoinks.
* Various cosmetic/style updates in the btl sm
* Clean up concept of mpool module (I think that code was written way
back when the concept of "modules" was fuzzy)
* Bring over some old fixes from the /tmp/timattox-sm-coll/ tree to
fix potential segv's when mmap'ed regions were at different
addresses in different processes (thanks Tim!).
* Change sm coll to no longer use mpool as its main source of shmem;
rather, just mmap its own segment (because it's fixed size --
there was nothing to be gained by using mpool; shedding the use of
mpool saved a lot of complexity in the sm coll setup). This
effectively made Tim's fixes moot (because now everything is an
offset into the mmap that is computed locally; there are no global
pointers). :-)
* Slightly updated common/sm to allow making mmap's for a specific
set of procs (vs. ''all'' procs in the process). This potentially
allows for same-host-inter-proc mmaps -- yay!
* Fixed many, many things in the coll sm (particularly in reduce):
* Fixed handling of MPI_IN_PLACE in reduce and allreduce
* Fixed handling of non-contiguous datatypes in reduce
* Changed the order of reductions to go from process (n-1)'s data
to process 0's data, because that's how all other OMPI coll
components work
* Fixed lots of usage of ddt functions
* When using a non-contiguous datatype, if the root process is not
(n-1), now we used a 2nd convertor to copy from shmem to the rbuf
(saves a memory copy vs. what was done before)
* Lots and lots of little cleanups, clarifications, and minor
optimizations (although still more could be done -- e.g., I think
the use of write memory barriers is fairly sub-optimal; they
could be ganged together at the root, for example)
I'm marking this as "fixes trac:1988" and closing the ticket; if something
is still broken, we can re-open the ticket.
This commit was SVN r21967.
The following Trac tickets were found above:
Ticket 1988 --> https://svn.open-mpi.org/trac/ompi/ticket/1988
2009-09-15 00:25:21 +00:00
|
|
|
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-02 00:24:22 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-10-20 01:03:09 +00:00
|
|
|
#include "ompi_config.h"
|
2004-08-02 00:24:22 +00:00
|
|
|
#include <string.h>
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/mca/mpool/sm/mpool_sm.h"
|
|
|
|
#include "ompi/mca/common/sm/common_sm_mmap.h"
|
2008-06-27 16:25:31 +00:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2008-06-15 13:43:28 +00:00
|
|
|
#include <unistd.h>
|
2008-06-27 16:25:31 +00:00
|
|
|
#endif
|
2008-06-15 13:43:28 +00:00
|
|
|
#include "opal/mca/maffinity/maffinity.h"
|
|
|
|
#include "opal/mca/maffinity/maffinity_types.h"
|
|
|
|
#include "opal/mca/maffinity/base/base.h"
|
2008-10-16 15:09:00 +00:00
|
|
|
#include "orte/util/proc_info.h"
|
2004-08-02 00:24:22 +00:00
|
|
|
|
2008-10-16 15:09:00 +00:00
|
|
|
#if OPAL_ENABLE_FT == 1
|
|
|
|
#include "ompi/mca/mpool/base/base.h"
|
|
|
|
#include "ompi/runtime/ompi_cr.h"
|
|
|
|
#endif
|
2004-08-02 00:24:22 +00:00
|
|
|
|
Fixes trac:1988. The little bug that turned out to be huge. Yoinks.
* Various cosmetic/style updates in the btl sm
* Clean up concept of mpool module (I think that code was written way
back when the concept of "modules" was fuzzy)
* Bring over some old fixes from the /tmp/timattox-sm-coll/ tree to
fix potential segv's when mmap'ed regions were at different
addresses in different processes (thanks Tim!).
* Change sm coll to no longer use mpool as its main source of shmem;
rather, just mmap its own segment (because it's fixed size --
there was nothing to be gained by using mpool; shedding the use of
mpool saved a lot of complexity in the sm coll setup). This
effectively made Tim's fixes moot (because now everything is an
offset into the mmap that is computed locally; there are no global
pointers). :-)
* Slightly updated common/sm to allow making mmap's for a specific
set of procs (vs. ''all'' procs in the process). This potentially
allows for same-host-inter-proc mmaps -- yay!
* Fixed many, many things in the coll sm (particularly in reduce):
* Fixed handling of MPI_IN_PLACE in reduce and allreduce
* Fixed handling of non-contiguous datatypes in reduce
* Changed the order of reductions to go from process (n-1)'s data
to process 0's data, because that's how all other OMPI coll
components work
* Fixed lots of usage of ddt functions
* When using a non-contiguous datatype, if the root process is not
(n-1), now we used a 2nd convertor to copy from shmem to the rbuf
(saves a memory copy vs. what was done before)
* Lots and lots of little cleanups, clarifications, and minor
optimizations (although still more could be done -- e.g., I think
the use of write memory barriers is fairly sub-optimal; they
could be ganged together at the root, for example)
I'm marking this as "fixes trac:1988" and closing the ticket; if something
is still broken, we can re-open the ticket.
This commit was SVN r21967.
The following Trac tickets were found above:
Ticket 1988 --> https://svn.open-mpi.org/trac/ompi/ticket/1988
2009-09-15 00:25:21 +00:00
|
|
|
static void sm_module_finalize(mca_mpool_base_module_t* module);
|
|
|
|
|
2005-05-31 17:06:55 +00:00
|
|
|
/*
|
|
|
|
* Initializes the mpool module.
|
|
|
|
*/
|
|
|
|
void mca_mpool_sm_module_init(mca_mpool_sm_module_t* mpool)
|
|
|
|
{
|
2008-08-12 16:58:32 +00:00
|
|
|
mpool->super.mpool_component = &mca_mpool_sm_component.super;
|
|
|
|
mpool->super.mpool_base = mca_mpool_sm_base;
|
|
|
|
mpool->super.mpool_alloc = mca_mpool_sm_alloc;
|
|
|
|
mpool->super.mpool_realloc = mca_mpool_sm_realloc;
|
|
|
|
mpool->super.mpool_free = mca_mpool_sm_free;
|
|
|
|
mpool->super.mpool_find = NULL;
|
|
|
|
mpool->super.mpool_register = NULL;
|
|
|
|
mpool->super.mpool_deregister = NULL;
|
|
|
|
mpool->super.mpool_release_memory = NULL;
|
Fixes trac:1988. The little bug that turned out to be huge. Yoinks.
* Various cosmetic/style updates in the btl sm
* Clean up concept of mpool module (I think that code was written way
back when the concept of "modules" was fuzzy)
* Bring over some old fixes from the /tmp/timattox-sm-coll/ tree to
fix potential segv's when mmap'ed regions were at different
addresses in different processes (thanks Tim!).
* Change sm coll to no longer use mpool as its main source of shmem;
rather, just mmap its own segment (because it's fixed size --
there was nothing to be gained by using mpool; shedding the use of
mpool saved a lot of complexity in the sm coll setup). This
effectively made Tim's fixes moot (because now everything is an
offset into the mmap that is computed locally; there are no global
pointers). :-)
* Slightly updated common/sm to allow making mmap's for a specific
set of procs (vs. ''all'' procs in the process). This potentially
allows for same-host-inter-proc mmaps -- yay!
* Fixed many, many things in the coll sm (particularly in reduce):
* Fixed handling of MPI_IN_PLACE in reduce and allreduce
* Fixed handling of non-contiguous datatypes in reduce
* Changed the order of reductions to go from process (n-1)'s data
to process 0's data, because that's how all other OMPI coll
components work
* Fixed lots of usage of ddt functions
* When using a non-contiguous datatype, if the root process is not
(n-1), now we used a 2nd convertor to copy from shmem to the rbuf
(saves a memory copy vs. what was done before)
* Lots and lots of little cleanups, clarifications, and minor
optimizations (although still more could be done -- e.g., I think
the use of write memory barriers is fairly sub-optimal; they
could be ganged together at the root, for example)
I'm marking this as "fixes trac:1988" and closing the ticket; if something
is still broken, we can re-open the ticket.
This commit was SVN r21967.
The following Trac tickets were found above:
Ticket 1988 --> https://svn.open-mpi.org/trac/ompi/ticket/1988
2009-09-15 00:25:21 +00:00
|
|
|
mpool->super.mpool_finalize = sm_module_finalize;
|
2008-08-12 16:58:32 +00:00
|
|
|
mpool->super.mpool_ft_event = mca_mpool_sm_ft_event;
|
|
|
|
mpool->super.flags = 0;
|
Fixes trac:1988. The little bug that turned out to be huge. Yoinks.
* Various cosmetic/style updates in the btl sm
* Clean up concept of mpool module (I think that code was written way
back when the concept of "modules" was fuzzy)
* Bring over some old fixes from the /tmp/timattox-sm-coll/ tree to
fix potential segv's when mmap'ed regions were at different
addresses in different processes (thanks Tim!).
* Change sm coll to no longer use mpool as its main source of shmem;
rather, just mmap its own segment (because it's fixed size --
there was nothing to be gained by using mpool; shedding the use of
mpool saved a lot of complexity in the sm coll setup). This
effectively made Tim's fixes moot (because now everything is an
offset into the mmap that is computed locally; there are no global
pointers). :-)
* Slightly updated common/sm to allow making mmap's for a specific
set of procs (vs. ''all'' procs in the process). This potentially
allows for same-host-inter-proc mmaps -- yay!
* Fixed many, many things in the coll sm (particularly in reduce):
* Fixed handling of MPI_IN_PLACE in reduce and allreduce
* Fixed handling of non-contiguous datatypes in reduce
* Changed the order of reductions to go from process (n-1)'s data
to process 0's data, because that's how all other OMPI coll
components work
* Fixed lots of usage of ddt functions
* When using a non-contiguous datatype, if the root process is not
(n-1), now we used a 2nd convertor to copy from shmem to the rbuf
(saves a memory copy vs. what was done before)
* Lots and lots of little cleanups, clarifications, and minor
optimizations (although still more could be done -- e.g., I think
the use of write memory barriers is fairly sub-optimal; they
could be ganged together at the root, for example)
I'm marking this as "fixes trac:1988" and closing the ticket; if something
is still broken, we can re-open the ticket.
This commit was SVN r21967.
The following Trac tickets were found above:
Ticket 1988 --> https://svn.open-mpi.org/trac/ompi/ticket/1988
2009-09-15 00:25:21 +00:00
|
|
|
|
|
|
|
mpool->sm_size = 0;
|
|
|
|
mpool->sm_allocator = NULL;
|
|
|
|
mpool->sm_mmap = NULL;
|
|
|
|
mpool->sm_common_mmap = NULL;
|
|
|
|
mpool->mem_node = -1;
|
2005-05-31 17:06:55 +00:00
|
|
|
}
|
2004-08-02 00:24:22 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* base address of shared memory mapping
|
|
|
|
*/
|
2005-05-31 17:06:55 +00:00
|
|
|
void* mca_mpool_sm_base(mca_mpool_base_module_t* mpool)
|
2004-08-02 00:24:22 +00:00
|
|
|
{
|
Fixes trac:1988. The little bug that turned out to be huge. Yoinks.
* Various cosmetic/style updates in the btl sm
* Clean up concept of mpool module (I think that code was written way
back when the concept of "modules" was fuzzy)
* Bring over some old fixes from the /tmp/timattox-sm-coll/ tree to
fix potential segv's when mmap'ed regions were at different
addresses in different processes (thanks Tim!).
* Change sm coll to no longer use mpool as its main source of shmem;
rather, just mmap its own segment (because it's fixed size --
there was nothing to be gained by using mpool; shedding the use of
mpool saved a lot of complexity in the sm coll setup). This
effectively made Tim's fixes moot (because now everything is an
offset into the mmap that is computed locally; there are no global
pointers). :-)
* Slightly updated common/sm to allow making mmap's for a specific
set of procs (vs. ''all'' procs in the process). This potentially
allows for same-host-inter-proc mmaps -- yay!
* Fixed many, many things in the coll sm (particularly in reduce):
* Fixed handling of MPI_IN_PLACE in reduce and allreduce
* Fixed handling of non-contiguous datatypes in reduce
* Changed the order of reductions to go from process (n-1)'s data
to process 0's data, because that's how all other OMPI coll
components work
* Fixed lots of usage of ddt functions
* When using a non-contiguous datatype, if the root process is not
(n-1), now we used a 2nd convertor to copy from shmem to the rbuf
(saves a memory copy vs. what was done before)
* Lots and lots of little cleanups, clarifications, and minor
optimizations (although still more could be done -- e.g., I think
the use of write memory barriers is fairly sub-optimal; they
could be ganged together at the root, for example)
I'm marking this as "fixes trac:1988" and closing the ticket; if something
is still broken, we can re-open the ticket.
This commit was SVN r21967.
The following Trac tickets were found above:
Ticket 1988 --> https://svn.open-mpi.org/trac/ompi/ticket/1988
2009-09-15 00:25:21 +00:00
|
|
|
mca_mpool_sm_module_t *sm_mpool = (mca_mpool_sm_module_t*) mpool;
|
|
|
|
return (NULL != sm_mpool->sm_common_mmap) ?
|
|
|
|
sm_mpool->sm_common_mmap->map_addr : NULL;
|
2004-08-02 00:24:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2008-06-15 13:43:28 +00:00
|
|
|
* allocate function
|
2004-08-02 00:24:22 +00:00
|
|
|
*/
|
2005-06-21 17:10:28 +00:00
|
|
|
void* mca_mpool_sm_alloc(
|
2008-06-15 13:43:28 +00:00
|
|
|
mca_mpool_base_module_t* mpool,
|
|
|
|
size_t size,
|
|
|
|
size_t align,
|
2005-09-12 22:28:23 +00:00
|
|
|
uint32_t flags,
|
2005-06-24 21:12:38 +00:00
|
|
|
mca_mpool_base_registration_t** registration)
|
2004-08-02 00:24:22 +00:00
|
|
|
{
|
2008-06-15 13:43:28 +00:00
|
|
|
mca_mpool_sm_module_t* mpool_sm = (mca_mpool_sm_module_t*)mpool;
|
|
|
|
opal_maffinity_base_segment_t mseg;
|
|
|
|
|
|
|
|
mseg.mbs_start_addr =
|
2009-02-20 19:51:57 +00:00
|
|
|
mpool_sm->sm_allocator->alc_alloc(mpool_sm->sm_allocator, size, align, registration);
|
2008-06-15 13:43:28 +00:00
|
|
|
|
|
|
|
if(mpool_sm->mem_node >= 0) {
|
|
|
|
mseg.mbs_len = size;
|
|
|
|
opal_maffinity_base_bind(&mseg, 1, mpool_sm->mem_node);
|
|
|
|
}
|
|
|
|
|
|
|
|
return mseg.mbs_start_addr;
|
2004-08-02 00:24:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2008-06-15 13:43:28 +00:00
|
|
|
* realloc function
|
2004-08-02 00:24:22 +00:00
|
|
|
*/
|
2005-06-21 17:10:28 +00:00
|
|
|
void* mca_mpool_sm_realloc(
|
2008-06-15 13:43:28 +00:00
|
|
|
mca_mpool_base_module_t* mpool,
|
|
|
|
void* addr,
|
|
|
|
size_t size,
|
2005-06-24 21:12:38 +00:00
|
|
|
mca_mpool_base_registration_t** registration)
|
2004-08-02 00:24:22 +00:00
|
|
|
{
|
2008-06-15 13:43:28 +00:00
|
|
|
mca_mpool_sm_module_t* mpool_sm = (mca_mpool_sm_module_t*)mpool;
|
|
|
|
opal_maffinity_base_segment_t mseg;
|
|
|
|
|
|
|
|
mseg.mbs_start_addr =
|
|
|
|
mpool_sm->sm_allocator->alc_realloc(mpool_sm->sm_allocator, addr, size,
|
|
|
|
registration);
|
|
|
|
if(mpool_sm->mem_node >= 0) {
|
|
|
|
mseg.mbs_len = size;
|
|
|
|
opal_maffinity_base_bind(&mseg, 1, mpool_sm->mem_node);
|
|
|
|
}
|
|
|
|
|
|
|
|
return mseg.mbs_start_addr;
|
2004-08-02 00:24:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2008-06-15 13:43:28 +00:00
|
|
|
* free function
|
2004-08-02 00:24:22 +00:00
|
|
|
*/
|
2008-06-15 13:43:28 +00:00
|
|
|
void mca_mpool_sm_free(mca_mpool_base_module_t* mpool, void * addr,
|
2005-06-24 21:12:38 +00:00
|
|
|
mca_mpool_base_registration_t* registration)
|
2004-08-02 00:24:22 +00:00
|
|
|
{
|
2008-06-15 13:43:28 +00:00
|
|
|
mca_mpool_sm_module_t* mpool_sm = (mca_mpool_sm_module_t*)mpool;
|
2005-06-21 17:10:28 +00:00
|
|
|
mpool_sm->sm_allocator->alc_free(mpool_sm->sm_allocator, addr);
|
2004-08-02 00:24:22 +00:00
|
|
|
}
|
2007-03-16 23:11:45 +00:00
|
|
|
|
Fixes trac:1988. The little bug that turned out to be huge. Yoinks.
* Various cosmetic/style updates in the btl sm
* Clean up concept of mpool module (I think that code was written way
back when the concept of "modules" was fuzzy)
* Bring over some old fixes from the /tmp/timattox-sm-coll/ tree to
fix potential segv's when mmap'ed regions were at different
addresses in different processes (thanks Tim!).
* Change sm coll to no longer use mpool as its main source of shmem;
rather, just mmap its own segment (because it's fixed size --
there was nothing to be gained by using mpool; shedding the use of
mpool saved a lot of complexity in the sm coll setup). This
effectively made Tim's fixes moot (because now everything is an
offset into the mmap that is computed locally; there are no global
pointers). :-)
* Slightly updated common/sm to allow making mmap's for a specific
set of procs (vs. ''all'' procs in the process). This potentially
allows for same-host-inter-proc mmaps -- yay!
* Fixed many, many things in the coll sm (particularly in reduce):
* Fixed handling of MPI_IN_PLACE in reduce and allreduce
* Fixed handling of non-contiguous datatypes in reduce
* Changed the order of reductions to go from process (n-1)'s data
to process 0's data, because that's how all other OMPI coll
components work
* Fixed lots of usage of ddt functions
* When using a non-contiguous datatype, if the root process is not
(n-1), now we used a 2nd convertor to copy from shmem to the rbuf
(saves a memory copy vs. what was done before)
* Lots and lots of little cleanups, clarifications, and minor
optimizations (although still more could be done -- e.g., I think
the use of write memory barriers is fairly sub-optimal; they
could be ganged together at the root, for example)
I'm marking this as "fixes trac:1988" and closing the ticket; if something
is still broken, we can re-open the ticket.
This commit was SVN r21967.
The following Trac tickets were found above:
Ticket 1988 --> https://svn.open-mpi.org/trac/ompi/ticket/1988
2009-09-15 00:25:21 +00:00
|
|
|
static void sm_module_finalize(mca_mpool_base_module_t* module)
|
|
|
|
{
|
|
|
|
mca_mpool_sm_module_t *sm_module = (mca_mpool_sm_module_t*) module;
|
|
|
|
|
|
|
|
if (NULL != sm_module->sm_common_mmap) {
|
|
|
|
if (OMPI_SUCCESS ==
|
|
|
|
mca_common_sm_mmap_fini(sm_module->sm_common_mmap)) {
|
|
|
|
#if OPAL_ENABLE_FT == 1
|
|
|
|
/* Only unlink the file if we are *not* restarting. If we
|
|
|
|
are restarting the file will be unlinked at a later
|
|
|
|
time. */
|
|
|
|
if (OPAL_CR_STATUS_RESTART_PRE != opal_cr_checkpointing_state &&
|
|
|
|
OPAL_CR_STATUS_RESTART_POST != opal_cr_checkpointing_state ) {
|
|
|
|
unlink(sm_module->sm_common_mmap->map_path);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
unlink(sm_module->sm_common_mmap->map_path);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
OBJ_RELEASE(sm_module->sm_common_mmap);
|
|
|
|
sm_module->sm_common_mmap = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-10-16 15:09:00 +00:00
|
|
|
#if OPAL_ENABLE_FT == 0
|
2007-03-16 23:11:45 +00:00
|
|
|
int mca_mpool_sm_ft_event(int state) {
|
2008-10-16 15:09:00 +00:00
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
int mca_mpool_sm_ft_event(int state) {
|
|
|
|
mca_mpool_base_module_t *self_module = NULL;
|
2009-09-17 14:45:17 +00:00
|
|
|
mca_mpool_sm_module_t *self_sm_module = NULL;
|
2008-10-16 15:09:00 +00:00
|
|
|
char * file_name = NULL;
|
|
|
|
|
2007-03-16 23:11:45 +00:00
|
|
|
if(OPAL_CRS_CHECKPOINT == state) {
|
2008-10-16 15:09:00 +00:00
|
|
|
/* Record the shared memory filename */
|
|
|
|
asprintf( &file_name, "%s"OPAL_PATH_SEP"shared_mem_pool.%s",
|
2009-03-05 21:56:03 +00:00
|
|
|
orte_process_info.job_session_dir,
|
|
|
|
orte_process_info.nodename );
|
2008-10-16 15:09:00 +00:00
|
|
|
opal_crs_base_metadata_write_token(NULL, CRS_METADATA_TOUCH, file_name);
|
|
|
|
free(file_name);
|
|
|
|
file_name = NULL;
|
2007-03-16 23:11:45 +00:00
|
|
|
}
|
|
|
|
else if(OPAL_CRS_CONTINUE == state) {
|
2008-10-16 15:09:00 +00:00
|
|
|
if(ompi_cr_continue_like_restart) {
|
2009-09-17 14:45:17 +00:00
|
|
|
/* Find the sm module */
|
2008-10-16 15:09:00 +00:00
|
|
|
self_module = mca_mpool_base_module_lookup("sm");
|
2009-09-17 14:45:17 +00:00
|
|
|
self_sm_module = (mca_mpool_sm_module_t*) self_module;
|
2008-10-16 15:09:00 +00:00
|
|
|
|
2009-09-17 14:45:17 +00:00
|
|
|
/* Mark the old sm file for eventual removal via CRS */
|
|
|
|
if (NULL != self_sm_module->sm_common_mmap) {
|
|
|
|
opal_crs_base_cleanup_append(self_sm_module->sm_common_mmap->map_path, false);
|
2008-10-16 15:09:00 +00:00
|
|
|
}
|
2009-09-17 14:45:17 +00:00
|
|
|
|
|
|
|
/* Remove self from the list of all modules */
|
|
|
|
mca_mpool_base_module_destroy(self_module);
|
2008-10-16 15:09:00 +00:00
|
|
|
}
|
2007-03-16 23:11:45 +00:00
|
|
|
}
|
2008-10-16 15:09:00 +00:00
|
|
|
else if(OPAL_CRS_RESTART == state ||
|
|
|
|
OPAL_CRS_RESTART_PRE == state) {
|
2009-09-17 14:45:17 +00:00
|
|
|
/* Find the sm module */
|
2008-10-16 15:09:00 +00:00
|
|
|
self_module = mca_mpool_base_module_lookup("sm");
|
2009-09-17 14:45:17 +00:00
|
|
|
self_sm_module = (mca_mpool_sm_module_t*) self_module;
|
2008-10-16 15:09:00 +00:00
|
|
|
|
2009-09-17 14:45:17 +00:00
|
|
|
/* Mark the old sm file for eventual removal via CRS */
|
|
|
|
if (NULL != self_sm_module->sm_common_mmap) {
|
|
|
|
opal_crs_base_cleanup_append(self_sm_module->sm_common_mmap->map_path, false);
|
2008-10-16 15:09:00 +00:00
|
|
|
}
|
2009-09-17 14:45:17 +00:00
|
|
|
|
|
|
|
/* Remove self from the list of all modules */
|
|
|
|
mca_mpool_base_module_destroy(self_module);
|
2007-03-16 23:11:45 +00:00
|
|
|
}
|
|
|
|
else if(OPAL_CRS_TERM == state ) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
2008-10-16 15:09:00 +00:00
|
|
|
#endif /* OPAL_ENABLE_FT */
|