2005-06-15 19:10:26 +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.
|
2009-04-10 16:44:37 +00:00
|
|
|
* Copyright (c) 2004-2009 The University of Tennessee and The University
|
2005-11-05 19:57:48 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-06-15 19:10:26 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
2005-06-30 05:50:55 +00:00
|
|
|
#ifndef MCA_BTL_SELF_H
|
|
|
|
#define MCA_BTL_SELF_H
|
2005-06-15 19:10:26 +00:00
|
|
|
|
2009-03-04 15:35:54 +00:00
|
|
|
#include "ompi_config.h"
|
|
|
|
|
2005-12-10 22:04:28 +00:00
|
|
|
#ifdef HAVE_STDLIB_H
|
2005-06-15 19:10:26 +00:00
|
|
|
#include <stdlib.h>
|
2005-12-10 22:04:28 +00:00
|
|
|
#endif /* HAVE_STDLIB_H */
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
2005-06-15 19:10:26 +00:00
|
|
|
#include <sys/types.h>
|
2005-12-10 22:04:28 +00:00
|
|
|
#endif /* HAVE_SYS_TYPES_H */
|
2005-07-03 23:09:55 +00:00
|
|
|
#include "opal/event/event.h"
|
2009-03-03 22:25:13 +00:00
|
|
|
#include "ompi/class/ompi_free_list.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/mca/btl/btl.h"
|
|
|
|
#include "ompi/mca/btl/base/base.h"
|
2005-06-15 19:10:26 +00:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2005-06-30 05:50:55 +00:00
|
|
|
* Shared Memory (SELF) BTL module.
|
2005-06-15 19:10:26 +00:00
|
|
|
*/
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_self_component_t {
|
2008-07-28 22:40:57 +00:00
|
|
|
mca_btl_base_component_2_0_0_t super; /**< base BTL component */
|
2005-06-15 19:10:26 +00:00
|
|
|
int free_list_num; /**< initial size of free lists */
|
|
|
|
int free_list_max; /**< maximum size of free lists */
|
|
|
|
int free_list_inc; /**< number of elements to alloc when growing free lists */
|
2005-07-03 22:45:48 +00:00
|
|
|
opal_mutex_t self_lock;
|
2005-06-15 19:10:26 +00:00
|
|
|
ompi_free_list_t self_frags_eager; /**< free list of self first */
|
|
|
|
ompi_free_list_t self_frags_send; /**< free list of self second */
|
|
|
|
ompi_free_list_t self_frags_rdma; /**< free list of self second */
|
|
|
|
};
|
2005-06-30 05:50:55 +00:00
|
|
|
typedef struct mca_btl_self_component_t mca_btl_self_component_t;
|
2006-09-14 22:19:39 +00:00
|
|
|
OMPI_MODULE_DECLSPEC extern mca_btl_self_component_t mca_btl_self_component;
|
2005-06-15 19:10:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register shared memory module parameters with the MCA framework
|
|
|
|
*/
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_component_open(void);
|
2005-06-15 19:10:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Any final cleanup before being unloaded.
|
|
|
|
*/
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_component_close(void);
|
2005-06-15 19:10:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SELF module initialization.
|
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param num_btls (OUT) Number of BTLs returned in BTL array.
|
|
|
|
* @param enable_progress_threads (IN) Flag indicating whether BTL is allowed to have progress threads
|
|
|
|
* @param enable_mpi_threads (IN) Flag indicating whether BTL must support multilple simultaneous invocations from different threads
|
2005-06-15 19:10:26 +00:00
|
|
|
*
|
|
|
|
*/
|
2006-10-26 23:03:12 +00:00
|
|
|
mca_btl_base_module_t** mca_btl_self_component_init(
|
2005-06-30 05:50:55 +00:00
|
|
|
int *num_btls,
|
2005-06-15 19:10:26 +00:00
|
|
|
bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads
|
|
|
|
);
|
|
|
|
|
2005-06-30 05:50:55 +00:00
|
|
|
extern mca_btl_base_module_t mca_btl_self;
|
2005-06-15 19:10:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-06-30 05:50:55 +00:00
|
|
|
* Cleanup any resources held by the BTL.
|
2005-06-15 19:10:26 +00:00
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl BTL instance.
|
2005-06-15 19:10:26 +00:00
|
|
|
* @return OMPI_SUCCESS or error status on failure.
|
|
|
|
*/
|
|
|
|
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_finalize(
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_module_t* btl
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-06-30 05:50:55 +00:00
|
|
|
* PML->BTL notification of change in the process list.
|
|
|
|
* PML->BTL Notification that a receive fragment has been matched.
|
2005-06-15 19:10:26 +00:00
|
|
|
* Called for message that is send from process with the virtual
|
|
|
|
* address of the shared memory segment being different than that of
|
|
|
|
* the receiver.
|
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN)
|
2005-06-15 19:10:26 +00:00
|
|
|
* @param proc (IN)
|
|
|
|
* @param peer (OUT)
|
|
|
|
* @return OMPI_SUCCESS or error status on failure.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_add_procs(
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_module_t* btl,
|
2005-06-15 19:10:26 +00:00
|
|
|
size_t nprocs,
|
|
|
|
struct ompi_proc_t **procs,
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_endpoint_t** peers,
|
2009-03-03 22:25:13 +00:00
|
|
|
struct opal_bitmap_t* reachability
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2005-06-30 05:50:55 +00:00
|
|
|
* PML->BTL notification of change in the process list.
|
2005-06-15 19:10:26 +00:00
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN) BTL instance
|
2005-06-15 19:10:26 +00:00
|
|
|
* @param proc (IN) Peer process
|
|
|
|
* @param peer (IN) Peer addressing information.
|
|
|
|
* @return Status indicating if cleanup was successful
|
|
|
|
*
|
|
|
|
*/
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_del_procs(
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_module_t* btl,
|
2005-06-15 19:10:26 +00:00
|
|
|
size_t nprocs,
|
|
|
|
struct ompi_proc_t **procs,
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_endpoint_t **peers
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allocate a segment.
|
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN) BTL module
|
2005-06-15 19:10:26 +00:00
|
|
|
* @param size (IN) Request segment size.
|
|
|
|
*/
|
2006-10-26 23:03:12 +00:00
|
|
|
mca_btl_base_descriptor_t* mca_btl_self_alloc(
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_module_t* btl,
|
2007-12-09 14:00:42 +00:00
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
2007-05-24 19:51:26 +00:00
|
|
|
uint8_t order,
|
2007-12-09 14:08:01 +00:00
|
|
|
size_t size,
|
|
|
|
uint32_t flags
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2005-06-30 05:50:55 +00:00
|
|
|
* Return a segment allocated by this BTL.
|
2005-06-15 19:10:26 +00:00
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN) BTL module
|
2005-06-15 19:10:26 +00:00
|
|
|
* @param segment (IN) Allocated segment.
|
|
|
|
*/
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_free(
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
mca_btl_base_descriptor_t* segment
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pack data
|
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param peer (IN) BTL peer addressing
|
2005-06-15 19:10:26 +00:00
|
|
|
*/
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_descriptor_t* mca_btl_self_prepare_src(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
2005-06-23 15:53:51 +00:00
|
|
|
struct mca_mpool_base_registration_t* registration,
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 04:56:31 +00:00
|
|
|
struct opal_convertor_t* convertor,
|
2007-05-24 19:51:26 +00:00
|
|
|
uint8_t order,
|
2005-06-15 19:10:26 +00:00
|
|
|
size_t reserve,
|
2007-12-09 14:08:01 +00:00
|
|
|
size_t* size,
|
|
|
|
uint32_t flags
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Prepare data for RDMA
|
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param peer (IN) BTL peer addressing
|
2005-06-15 19:10:26 +00:00
|
|
|
*/
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_descriptor_t* mca_btl_self_prepare_dst(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
2005-06-23 15:53:51 +00:00
|
|
|
struct mca_mpool_base_registration_t* registration,
|
- Split the datatype engine into two parts: an MPI specific part in
OMPI
and a language agnostic part in OPAL. The convertor is completely
moved into OPAL. This offers several benefits as described in RFC
http://www.open-mpi.org/community/lists/devel/2009/07/6387.php
namely:
- Fewer basic types (int* and float* types, boolean and wchar
- Fixing naming scheme to ompi-nomenclature.
- Usability outside of the ompi-layer.
- Due to the fixed nature of simple opal types, their information is
completely
known at compile time and therefore constified
- With fewer datatypes (22), the actual sizes of bit-field types may be
reduced
from 64 to 32 bits, allowing reorganizing the opal_datatype
structure, eliminating holes and keeping data required in convertor
(upon send/recv) in one cacheline...
This has implications to the convertor-datastructure and other parts
of the code.
- Several performance tests have been run, the netpipe latency does not
change with
this patch on Linux/x86-64 on the smoky cluster.
- Extensive tests have been done to verify correctness (no new
regressions) using:
1. mpi_test_suite on linux/x86-64 using clean ompi-trunk and
ompi-ddt:
a. running both trunk and ompi-ddt resulted in no differences
(except for MPI_SHORT_INT and MPI_TYPE_MIX_LB_UB do now run
correctly).
b. with --enable-memchecker and running under valgrind (one buglet
when run with static found in test-suite, commited)
2. ibm testsuite on linux/x86-64 using clean ompi-trunk and ompi-ddt:
all passed (except for the dynamic/ tests failed!! as trunk/MTT)
3. compilation and usage of HDF5 tests on Jaguar using PGI and
PathScale compilers.
4. compilation and usage on Scicortex.
- Please note, that for the heterogeneous case, (-m32 compiled
binaries/ompi), neither
ompi-trunk, nor ompi-ddt branch would successfully launch.
This commit was SVN r21641.
2009-07-13 04:56:31 +00:00
|
|
|
struct opal_convertor_t* convertor,
|
2007-05-24 19:51:26 +00:00
|
|
|
uint8_t order,
|
2005-06-15 19:10:26 +00:00
|
|
|
size_t reserve,
|
2007-12-09 14:08:01 +00:00
|
|
|
size_t* size,
|
|
|
|
uint32_t flags
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate a send to the peer.
|
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param peer (IN) BTL peer addressing
|
2005-06-15 19:10:26 +00:00
|
|
|
*/
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_send(
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
|
|
|
struct mca_btl_base_descriptor_t* descriptor,
|
|
|
|
mca_btl_base_tag_t tag
|
2005-06-15 19:10:26 +00:00
|
|
|
);
|
|
|
|
|
2005-06-20 16:38:19 +00:00
|
|
|
/**
|
|
|
|
* Initiate a put to the peer.
|
|
|
|
*
|
2005-06-30 05:50:55 +00:00
|
|
|
* @param btl (IN) BTL module
|
|
|
|
* @param peer (IN) BTL peer addressing
|
2005-06-20 16:38:19 +00:00
|
|
|
*/
|
|
|
|
|
2006-10-26 23:03:12 +00:00
|
|
|
int mca_btl_self_rdma(
|
2005-06-30 05:50:55 +00:00
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* endpoint,
|
|
|
|
struct mca_btl_base_descriptor_t* descriptor
|
2005-06-20 16:38:19 +00:00
|
|
|
);
|
2007-03-16 23:11:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Fault Tolerance Event Notification Function
|
|
|
|
* @param state Checkpoint Stae
|
|
|
|
* @return OMPI_SUCCESS or failure status
|
|
|
|
*/
|
|
|
|
int mca_btl_self_ft_event(int state);
|
|
|
|
|
2005-06-15 19:10:26 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2006-08-24 16:38:08 +00:00
|
|
|
|
2005-06-15 19:10:26 +00:00
|
|
|
#endif
|
|
|
|
|