* Add shell of functionality required for supporting Portals4
* Update places where orte-free builds have failed This commit was SVN r23891.
Этот коммит содержится в:
родитель
e09bbb49a9
Коммит
9febaa475e
68
config/ompi_check_portals4.m4
Обычный файл
68
config/ompi_check_portals4.m4
Обычный файл
@ -0,0 +1,68 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# 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.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006 QLogic Corp. All rights reserved.
|
||||
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# OMPI_CHECK_PORTALS4(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if PORTALS4 support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_PORTALS4],[
|
||||
AC_ARG_WITH([portals4],
|
||||
[AC_HELP_STRING([--with-portals4(=DIR)],
|
||||
[Build Portals4 support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OMPI_CHECK_WITHDIR([portals4], [$with_portals4], [include/portals4.h])
|
||||
AC_ARG_WITH([portals4-libdir],
|
||||
[AC_HELP_STRING([--with-portals4-libdir=DIR],
|
||||
[Search for Portals4 libraries in DIR])])
|
||||
OMPI_CHECK_WITHDIR([portals4-libdir], [$with_portals4_libdir], [libportals.*])
|
||||
|
||||
ompi_check_portals4_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_portals4_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_portals4_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_portals4" != "no"],
|
||||
[AS_IF([test ! -z "$with_portals4" -a "$with_portals4" != "yes"],
|
||||
[ompi_check_portals4_dir="$with_portals4"])
|
||||
AS_IF([test ! -z "$with_portals4_libdir" -a "$with_portals4_libdir" != "yes"],
|
||||
[ompi_check_portals4_libdir="$with_portals4_libdir"])
|
||||
|
||||
OMPI_CHECK_PACKAGE([$1],
|
||||
[portals4.h],
|
||||
[portals],
|
||||
[PtlLEAppend],
|
||||
[],
|
||||
[$ompi_check_portals4_dir],
|
||||
[$ompi_check_portals4_libdir],
|
||||
[ompi_check_portals4_happy="yes"],
|
||||
[ompi_check_portals4_happy="no"])],
|
||||
[ompi_check_portals4_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_portals4_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_portals4_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_portals4_$1_save_LIBS"
|
||||
|
||||
AS_IF([test "$ompi_check_portals4_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test ! -z "$with_portals4" -a "$with_portals4" != "no"],
|
||||
[AC_MSG_ERROR([Portals4 support requested but not found. Aborting])])
|
||||
$3])
|
||||
])
|
||||
|
17
contrib/platform/portals4-shmem
Обычный файл
17
contrib/platform/portals4-shmem
Обычный файл
@ -0,0 +1,17 @@
|
||||
enable_static=no
|
||||
enable_shared=yes
|
||||
with_threads=posix
|
||||
enable_pretty_print_stacktrace=yes
|
||||
enable_dlopen=yes
|
||||
with_memory_manager=no
|
||||
enable_mca_no_build=carto,compress,crs,maffinity,paffinity,debugger,notifier,bml,btl,coll-hierarch,coll-sm,common-sm,mpool,pml-bfo,pml-csum,pml-dr,pml-ob1,osc-rdma,rcache,vprotocol
|
||||
enable_contrib_no_build=libnbc,vt
|
||||
with_rte_support=no
|
||||
enable_heterogeneous=no
|
||||
enable_mem_debug=no
|
||||
enable_mem_profile=no
|
||||
with_openib=no
|
||||
with_gm=no
|
||||
with_mx=no
|
||||
enable_binaries=no
|
||||
enable_script_wrapper_compilers=yes
|
55
ompi/mca/mtl/portals4/Makefile.am
Обычный файл
55
ompi/mca/mtl/portals4/Makefile.am
Обычный файл
@ -0,0 +1,55 @@
|
||||
#
|
||||
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
# 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.
|
||||
# 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
AM_CPPFLAGS = $(mtl_portals4_CPPFLAGS)
|
||||
|
||||
if MCA_BUILD_ompi_mtl_portals4_DSO
|
||||
component_noinst =
|
||||
component_install = mca_mtl_portals4.la
|
||||
else
|
||||
component_noinst = libmca_mtl_portals4.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
local_sources = \
|
||||
mtl_portals4_component.c \
|
||||
mtl_portals4.c \
|
||||
mtl_portals4.h \
|
||||
mtl_portals4_endpoint.h \
|
||||
mtl_portals4_recv.c \
|
||||
mtl_portals4_request.h \
|
||||
mtl_portals4_send.c \
|
||||
mtl_portals4_probe.c
|
||||
|
||||
mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_mtl_portals4_la_SOURCES = $(local_sources)
|
||||
mca_mtl_portals4_la_LIBADD = \
|
||||
$(mtl_portals4_LIBS)
|
||||
mca_mtl_portals4_la_LDFLAGS = -module -avoid-version $(mtl_portals4_LDFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_mtl_portals4_la_SOURCES = $(local_sources)
|
||||
libmca_mtl_portals4_la_LIBADD = $(mtl_portals4_LIBS)
|
||||
libmca_mtl_portals4_la_LDFLAGS = -module -avoid-version $(mtl_portals4_LDFLAGS)
|
||||
|
41
ompi/mca/mtl/portals4/configure.m4
Обычный файл
41
ompi/mca/mtl/portals4/configure.m4
Обычный файл
@ -0,0 +1,41 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
# 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.
|
||||
# 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# MCA_mtl_portals4_CONFIG(action-if-can-compile,
|
||||
# [action-if-cant-compile])
|
||||
# ------------------------------------------------
|
||||
AC_DEFUN([MCA_ompi_mtl_portals4_CONFIG],[
|
||||
AC_CONFIG_FILES([ompi/mca/mtl/portals4/Makefile])
|
||||
|
||||
OMPI_CHECK_PORTALS4([mtl_portals4],
|
||||
[mtl_portals4_happy="yes"],
|
||||
[mtl_portals4_happy="no"])
|
||||
|
||||
AS_IF([test "$mtl_portals4_happy" = "yes"],
|
||||
[mtl_portals4_WRAPPER_EXTRA_LDFLAGS="$mtl_portals4_LDFLAGS"
|
||||
mtl_portals4_WRAPPER_EXTRA_LIBS="$mtl_portals4_LIBS"
|
||||
$1],
|
||||
[$2])
|
||||
|
||||
# substitute in the things needed to build portals4
|
||||
AC_SUBST([mtl_portals4_CPPFLAGS])
|
||||
AC_SUBST([mtl_portals4_LDFLAGS])
|
||||
AC_SUBST([mtl_portals4_LIBS])
|
||||
])dnl
|
88
ompi/mca/mtl/portals4/mtl_portals4.c
Обычный файл
88
ompi/mca/mtl/portals4/mtl_portals4.c
Обычный файл
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include <portals4.h>
|
||||
#include <portals4_runtime.h>
|
||||
|
||||
#include "ompi/mca/mtl/mtl.h"
|
||||
|
||||
#include "mtl_portals4.h"
|
||||
#include "mtl_portals4_endpoint.h"
|
||||
#include "mtl_portals4_request.h"
|
||||
|
||||
mca_mtl_portals4_module_t ompi_mtl_portals4 = {
|
||||
{
|
||||
8191, /* max cid - 2^13 - 1 */
|
||||
(1UL << 30), /* max tag value - must allow negatives */
|
||||
0, /* request reserve space */
|
||||
0, /* flags */
|
||||
|
||||
ompi_mtl_portals4_add_procs,
|
||||
ompi_mtl_portals4_del_procs,
|
||||
ompi_mtl_portals4_finalize,
|
||||
|
||||
ompi_mtl_portals4_send,
|
||||
ompi_mtl_portals4_isend,
|
||||
ompi_mtl_portals4_irecv,
|
||||
ompi_mtl_portals4_iprobe,
|
||||
|
||||
NULL /* cancel */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t *mtl,
|
||||
size_t nprocs,
|
||||
struct ompi_proc_t** procs,
|
||||
struct mca_mtl_base_endpoint_t **mtl_peer_data)
|
||||
{
|
||||
mca_mtl_portals4_module_t *mtl_portals4 = (mca_mtl_portals4_module_t*) mtl;
|
||||
int i;
|
||||
struct runtime_proc_t *world_procs;
|
||||
int world_size = runtime_get_size();
|
||||
runtime_get_nidpid_map(&world_procs);
|
||||
|
||||
if (world_size != (int) nprocs) return OMPI_ERROR;
|
||||
|
||||
mtl_portals4->endpoints = malloc(sizeof(struct mca_mtl_base_endpoint_t) * nprocs);
|
||||
if (NULL == mtl_portals4->endpoints) {
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < (int) nprocs ; ++i) {
|
||||
mtl_peer_data[i] = &(mtl_portals4->endpoints[i]);
|
||||
mtl_peer_data[i]->ptl_proc.phys.nid = world_procs[i].nid;
|
||||
mtl_peer_data[i]->ptl_proc.phys.pid = world_procs[i].pid;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ompi_mtl_portals4_del_procs(struct mca_mtl_base_module_t *mtl,
|
||||
size_t nprocs,
|
||||
struct ompi_proc_t** procs,
|
||||
struct mca_mtl_base_endpoint_t **mtl_peer_data)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ompi_mtl_portals4_finalize(struct mca_mtl_base_module_t *mtl)
|
||||
{
|
||||
PtlNIFini(ompi_mtl_portals4.ptl_ni_h);
|
||||
PtlFini();
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
149
ompi/mca/mtl/portals4/mtl_portals4.h
Обычный файл
149
ompi/mca/mtl/portals4/mtl_portals4.h
Обычный файл
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef MTL_PORTALS4_H
|
||||
#define MTL_PORTALS4_H
|
||||
|
||||
#include "ompi/mca/mtl/mtl.h"
|
||||
|
||||
#include "mtl_portals4_endpoint.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
struct mca_mtl_portals4_module_t {
|
||||
mca_mtl_base_module_t base;
|
||||
|
||||
ptl_handle_ni_t ptl_ni_h;
|
||||
mca_mtl_base_endpoint_t *endpoints;
|
||||
};
|
||||
typedef struct mca_mtl_portals4_module_t mca_mtl_portals4_module_t;
|
||||
|
||||
extern mca_mtl_portals4_module_t ompi_mtl_portals4;
|
||||
|
||||
OMPI_DECLSPEC extern mca_mtl_base_component_2_0_0_t mca_mtl_portals4_component;
|
||||
|
||||
|
||||
/* match/ignore bit manipulation
|
||||
*
|
||||
* 0123 4567 01234567 01234567 01234567 01234567 01234567 01234567 01234567
|
||||
* | | |
|
||||
* ^ | context id | source | message tag
|
||||
* | | | |
|
||||
* +---- protocol
|
||||
*/
|
||||
#define PTL_PROTOCOL_MASK 0xF000000000000000ULL
|
||||
#define PTL_CONTEXT_MASK 0x0FFF000000000000ULL
|
||||
#define PTL_SOURCE_MASK 0x0000FFFF00000000ULL
|
||||
#define PTL_TAG_MASK 0x00000000FFFFFFFFULL
|
||||
|
||||
#define PTL_PROTOCOL_IGNR PTL_PROTOCOL_MASK
|
||||
#define PTL_CONTEXT_IGNR PTL_CONTEXT_MASK
|
||||
#define PTL_SOURCE_IGNR PTL_SOURCE_MASK
|
||||
#define PTL_TAG_IGNR 0x000000007FFFFFFFULL
|
||||
|
||||
#define PTL_SHORT_MSG 0x1000000000000000ULL
|
||||
#define PTL_LONG_MSG 0x2000000000000000ULL
|
||||
#define PTL_READY_MSG 0x4000000000000000ULL
|
||||
|
||||
/* send posting */
|
||||
#define PTL_SET_SEND_BITS(match_bits, contextid, source, tag, type) \
|
||||
{ \
|
||||
match_bits = contextid; \
|
||||
match_bits = (match_bits << 16); \
|
||||
match_bits |= source; \
|
||||
match_bits = (match_bits << 32); \
|
||||
match_bits |= (PTL_TAG_MASK & tag) | type; \
|
||||
}
|
||||
|
||||
/* receive posting */
|
||||
#define PTL_SET_RECV_BITS(match_bits, ignore_bits, contextid, source, tag) \
|
||||
{ \
|
||||
match_bits = 0; \
|
||||
ignore_bits = PTL_PROTOCOL_IGNR; \
|
||||
\
|
||||
match_bits = contextid; \
|
||||
match_bits = (match_bits << 16); \
|
||||
\
|
||||
if (MPI_ANY_SOURCE == source) { \
|
||||
match_bits = (match_bits << 32); \
|
||||
ignore_bits |= PTL_SOURCE_IGNR; \
|
||||
} else { \
|
||||
match_bits |= source; \
|
||||
match_bits = (match_bits << 32); \
|
||||
} \
|
||||
\
|
||||
if (MPI_ANY_TAG == tag) { \
|
||||
ignore_bits |= PTL_TAG_IGNR; \
|
||||
} else { \
|
||||
match_bits |= (PTL_TAG_MASK & tag); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define PTL_IS_SHORT_MSG(match_bits) \
|
||||
(0 != (PTL_SHORT_MSG & match_bits))
|
||||
#define PTL_IS_LONG_MSG(match_bits) \
|
||||
(0 != (PTL_LONG_MSG & match_bits))
|
||||
#define PTL_IS_READY_MSG(match_bits) \
|
||||
(0 != (PTL_READY_MSG & match_bits))
|
||||
#define PTL_IS_SYNC_MSG(event) \
|
||||
(0 != event.hdr_data)
|
||||
|
||||
#define PTL_GET_TAG(match_bits) ((int)(match_bits & PTL_TAG_MASK))
|
||||
#define PTL_GET_SOURCE(match_bits) ((int)((match_bits & PTL_SOURCE_MASK) >> 32))
|
||||
|
||||
/* MTL interface functions */
|
||||
extern int ompi_mtl_portals4_finalize(struct mca_mtl_base_module_t *mtl);
|
||||
|
||||
extern int ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t* mtl,
|
||||
size_t nprocs,
|
||||
struct ompi_proc_t** procs,
|
||||
struct mca_mtl_base_endpoint_t **mtl_peer_data);
|
||||
|
||||
extern int ompi_mtl_portals4_del_procs(struct mca_mtl_base_module_t* mtl,
|
||||
size_t nprocs,
|
||||
struct ompi_proc_t** procs,
|
||||
struct mca_mtl_base_endpoint_t **mtl_peer_data);
|
||||
|
||||
extern int ompi_mtl_portals4_send(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t* comm,
|
||||
int dest,
|
||||
int tag,
|
||||
struct opal_convertor_t *convertor,
|
||||
mca_pml_base_send_mode_t mode);
|
||||
|
||||
extern int ompi_mtl_portals4_isend(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t* comm,
|
||||
int dest,
|
||||
int tag,
|
||||
struct opal_convertor_t *convertor,
|
||||
mca_pml_base_send_mode_t mode,
|
||||
bool blocking,
|
||||
mca_mtl_request_t *mtl_request);
|
||||
|
||||
extern int ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t *comm,
|
||||
int src,
|
||||
int tag,
|
||||
struct opal_convertor_t *convertor,
|
||||
mca_mtl_request_t *mtl_request);
|
||||
|
||||
extern int ompi_mtl_portals4_iprobe(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t *comm,
|
||||
int src,
|
||||
int tag,
|
||||
int *flag,
|
||||
struct ompi_status_public_t *status);
|
||||
|
||||
extern int ompi_mtl_portals4_cancel(struct mca_mtl_base_module_t* mtl,
|
||||
mca_mtl_request_t *mtl_request,
|
||||
int flag);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* MTL_PORTALS4_H_HAS_BEEN_INCLUDED */
|
77
ompi/mca/mtl/portals4/mtl_portals4_component.c
Обычный файл
77
ompi/mca/mtl/portals4/mtl_portals4_component.c
Обычный файл
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
|
||||
#include "mtl_portals4.h"
|
||||
#include "mtl_portals4_request.h"
|
||||
|
||||
static int ompi_mtl_portals4_component_open(void);
|
||||
static int ompi_mtl_portals4_component_close(void);
|
||||
static mca_mtl_base_module_t* ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
bool enable_mpi_threads);
|
||||
|
||||
mca_mtl_base_component_2_0_0_t mca_mtl_portals4_component = {
|
||||
{
|
||||
MCA_MTL_BASE_VERSION_2_0_0,
|
||||
"portals4", /* MCA component name */
|
||||
OMPI_MAJOR_VERSION, /* MCA component major version */
|
||||
OMPI_MINOR_VERSION, /* MCA component minor version */
|
||||
OMPI_RELEASE_VERSION, /* MCA component release version */
|
||||
ompi_mtl_portals4_component_open, /* component open */
|
||||
ompi_mtl_portals4_component_close /* component close */
|
||||
},
|
||||
{
|
||||
/* The component is not checkpoint ready */
|
||||
MCA_BASE_METADATA_PARAM_NONE
|
||||
},
|
||||
|
||||
ompi_mtl_portals4_component_init, /* component init */
|
||||
};
|
||||
|
||||
static int
|
||||
ompi_mtl_portals4_component_open(void)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
ompi_mtl_portals4.base.mtl_request_size =
|
||||
sizeof(ompi_mtl_portals4_request_t) -
|
||||
sizeof(struct mca_mtl_request_t);
|
||||
|
||||
ompi_mtl_portals4.ptl_ni_h = PTL_INVALID_HANDLE;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ompi_mtl_portals4_component_close(void)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static mca_mtl_base_module_t*
|
||||
ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
bool enable_mpi_threads)
|
||||
{
|
||||
if (PTL_OK != PtlInit()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (PTL_OK != PtlNIInit(PTL_IFACE_DEFAULT, PTL_NI_MATCHING|PTL_NI_PHYSICAL,
|
||||
PTL_PID_ANY, NULL, NULL, 0, NULL, NULL,
|
||||
&ompi_mtl_portals4.ptl_ni_h)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &ompi_mtl_portals4.base;
|
||||
}
|
20
ompi/mca/mtl/portals4/mtl_portals4_endpoint.h
Обычный файл
20
ompi/mca/mtl/portals4/mtl_portals4_endpoint.h
Обычный файл
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef OMPI_MTL_PORTALS4_ENDPOINT_H
|
||||
#define OMPI_MTL_PORTALS4_ENDPOINT_H
|
||||
|
||||
#include <portals4.h>
|
||||
|
||||
struct mca_mtl_base_endpoint_t {
|
||||
ptl_process_t ptl_proc;
|
||||
};
|
||||
typedef struct mca_mtl_base_endpoint_t mca_mtl_base_endpoint_t;
|
||||
|
||||
#endif
|
23
ompi/mca/mtl/portals4/mtl_portals4_probe.c
Обычный файл
23
ompi/mca/mtl/portals4/mtl_portals4_probe.c
Обычный файл
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mtl_portals4.h"
|
||||
|
||||
int
|
||||
ompi_mtl_portals4_iprobe(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t *comm,
|
||||
int src,
|
||||
int tag,
|
||||
int *flag,
|
||||
struct ompi_status_public_t *status)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
24
ompi/mca/mtl/portals4/mtl_portals4_recv.c
Обычный файл
24
ompi/mca/mtl/portals4/mtl_portals4_recv.c
Обычный файл
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mtl_portals4.h"
|
||||
|
||||
int
|
||||
ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t *comm,
|
||||
int src,
|
||||
int tag,
|
||||
struct opal_convertor_t *convertor,
|
||||
mca_mtl_request_t *mtl_request)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
21
ompi/mca/mtl/portals4/mtl_portals4_request.h
Обычный файл
21
ompi/mca/mtl/portals4/mtl_portals4_request.h
Обычный файл
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef OMPI_MTL_PORTALS4_REQUEST_H
|
||||
#define OMPI_MTL_PORTALS4_REQUEST_H
|
||||
|
||||
#include "ompi/mca/mtl/mtl.h"
|
||||
|
||||
struct ompi_mtl_portals4_request_t {
|
||||
struct mca_mtl_request_t super;
|
||||
};
|
||||
typedef struct ompi_mtl_portals4_request_t ompi_mtl_portals4_request_t;
|
||||
|
||||
|
||||
#endif
|
39
ompi/mca/mtl/portals4/mtl_portals4_send.c
Обычный файл
39
ompi/mca/mtl/portals4/mtl_portals4_send.c
Обычный файл
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "mtl_portals4.h"
|
||||
#include "mtl_portals4_request.h"
|
||||
|
||||
int
|
||||
ompi_mtl_portals4_send(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t* comm,
|
||||
int dest,
|
||||
int tag,
|
||||
struct opal_convertor_t *convertor,
|
||||
mca_pml_base_send_mode_t mode)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ompi_mtl_portals4_isend(struct mca_mtl_base_module_t* mtl,
|
||||
struct ompi_communicator_t* comm,
|
||||
int dest,
|
||||
int tag,
|
||||
struct opal_convertor_t *convertor,
|
||||
mca_pml_base_send_mode_t mode,
|
||||
bool blocking,
|
||||
mca_mtl_request_t *mtl_request)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
115
ompi/mca/mtl/portals4/mtl_portals4_send_short.c
Обычный файл
115
ompi/mca/mtl/portals4/mtl_portals4_send_short.c
Обычный файл
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
* 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.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "opal/util/output.h"
|
||||
|
||||
|
||||
#include "mtl_portals.h"
|
||||
#include "mtl_portals_request.h"
|
||||
#include "mtl_portals_send_short.h"
|
||||
|
||||
static ompi_mtl_portals_request_t ptl_short_request;
|
||||
|
||||
/* short send callback */
|
||||
static int
|
||||
ompi_mtl_portals_short_callback(ptl_event_t *ev, ompi_mtl_portals_request_t *ptl_request)
|
||||
{
|
||||
|
||||
switch (ev->type) {
|
||||
|
||||
case PTL_EVENT_SEND_END:
|
||||
|
||||
ompi_mtl_portals_free_short_buf(ev->offset);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
opal_output(fileno(stderr)," Unexpected event type %d in ompi_mtl_portals_short_callback()\n",ev->type);
|
||||
abort();
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
/* initialize short copy blocks */
|
||||
void
|
||||
ompi_mtl_portals_short_setup()
|
||||
{
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
if ((ompi_mtl_portals.ptl_num_copy_blocks > 0) && (ompi_mtl_portals.ptl_copy_block_len > 0)) {
|
||||
|
||||
ompi_mtl_portals.ptl_short_md.length = ompi_mtl_portals.ptl_num_copy_blocks *
|
||||
ompi_mtl_portals.ptl_copy_block_len;
|
||||
|
||||
ompi_mtl_portals.ptl_short_md.start = malloc(ompi_mtl_portals.ptl_short_md.length);
|
||||
if (NULL == ompi_mtl_portals.ptl_short_md.start ) {
|
||||
ompi_mtl_portals.ptl_num_copy_blocks = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
ompi_mtl_portals.ptl_short_md.threshold = PTL_MD_THRESH_INF;
|
||||
ompi_mtl_portals.ptl_short_md.max_size = 0;
|
||||
ompi_mtl_portals.ptl_short_md.options = PTL_MD_EVENT_START_DISABLE;
|
||||
ompi_mtl_portals.ptl_short_md.user_ptr = &ptl_short_request;
|
||||
ompi_mtl_portals.ptl_short_md.eq_handle = ompi_mtl_portals.ptl_eq_h;
|
||||
|
||||
ret = PtlMDBind(ompi_mtl_portals.ptl_ni_h,
|
||||
ompi_mtl_portals.ptl_short_md,
|
||||
PTL_RETAIN,
|
||||
&ompi_mtl_portals.ptl_short_md_h);
|
||||
if (PTL_OK != ret) {
|
||||
free(ompi_mtl_portals.ptl_short_md.start);
|
||||
ompi_mtl_portals.ptl_num_copy_blocks = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
ptl_short_request.event_callback = ompi_mtl_portals_short_callback;
|
||||
|
||||
ompi_mtl_portals.ptl_copy_block_free_list = malloc(ompi_mtl_portals.ptl_num_copy_blocks * sizeof(int));
|
||||
if (NULL == ompi_mtl_portals.ptl_copy_block_free_list) {
|
||||
free(ompi_mtl_portals.ptl_short_md.start);
|
||||
ompi_mtl_portals.ptl_num_copy_blocks = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i=0; i<ompi_mtl_portals.ptl_num_copy_blocks; i++) {
|
||||
ompi_mtl_portals.ptl_copy_block_free_list[i] = i;
|
||||
}
|
||||
|
||||
ompi_mtl_portals.ptl_copy_block_first_free = 0;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* free short resources */
|
||||
void
|
||||
ompi_mtl_portals_short_cleanup()
|
||||
{
|
||||
if (ompi_mtl_portals.ptl_num_copy_blocks > 0) {
|
||||
free(ompi_mtl_portals.ptl_short_md.start);
|
||||
free(ompi_mtl_portals.ptl_copy_block_free_list);
|
||||
ompi_mtl_portals.ptl_num_copy_blocks = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
59
ompi/mca/mtl/portals4/mtl_portals4_send_short.h
Обычный файл
59
ompi/mca/mtl/portals4/mtl_portals4_send_short.h
Обычный файл
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#ifndef OMPI_MTL_PORTALS_SEND_SHORT_H
|
||||
#define OMPI_MTL_PORTALS_SEND_SHORT_H
|
||||
|
||||
extern void ompi_mtl_portals_short_setup(void);
|
||||
extern void ompi_mtl_portals_short_cleanup(void);
|
||||
|
||||
static inline int
|
||||
ompi_mtl_portals_alloc_short_buf(void)
|
||||
{
|
||||
int buf_num;
|
||||
|
||||
while ( ompi_mtl_portals.ptl_copy_block_first_free == ompi_mtl_portals.ptl_num_copy_blocks ) {
|
||||
ompi_mtl_portals_progress();
|
||||
}
|
||||
|
||||
buf_num = ompi_mtl_portals.ptl_copy_block_free_list[ompi_mtl_portals.ptl_copy_block_first_free++];
|
||||
|
||||
assert((buf_num >= 0) && (buf_num < ompi_mtl_portals.ptl_num_copy_blocks));
|
||||
|
||||
return buf_num;
|
||||
}
|
||||
|
||||
static inline void
|
||||
ompi_mtl_portals_free_short_buf( int offset )
|
||||
{
|
||||
int buf_num;
|
||||
|
||||
buf_num = offset / ompi_mtl_portals.ptl_copy_block_len;
|
||||
|
||||
assert((buf_num >= 0) && (buf_num < ompi_mtl_portals.ptl_num_copy_blocks));
|
||||
|
||||
ompi_mtl_portals.ptl_copy_block_first_free--;
|
||||
|
||||
assert(ompi_mtl_portals.ptl_copy_block_first_free >= 0);
|
||||
|
||||
ompi_mtl_portals.ptl_copy_block_free_list[ompi_mtl_portals.ptl_copy_block_first_free] = buf_num;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif /* OMPI_MTL_PORTALS_SEND_SHORT_H */
|
@ -393,6 +393,7 @@ static int ompi_cr_coord_pre_restart(void) {
|
||||
}
|
||||
|
||||
static int ompi_cr_coord_pre_continue(void) {
|
||||
#if !ORTE_DISABLE_FULL_SUPPORT
|
||||
int ret, exit_status = OMPI_SUCCESS;
|
||||
|
||||
/*
|
||||
@ -422,6 +423,9 @@ static int ompi_cr_coord_pre_continue(void) {
|
||||
|
||||
cleanup:
|
||||
return exit_status;
|
||||
#else
|
||||
return OMPI_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************
|
||||
|
@ -26,7 +26,9 @@
|
||||
#define OMPI_CR_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
#if !ORTE_DISABLE_FULL_SUPPORT
|
||||
#include "orte/runtime/orte_cr.h"
|
||||
#endif
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
|
@ -38,7 +38,7 @@ AC_ARG_WITH([rte-support],
|
||||
if test "$with_rte_support" = "no"; then
|
||||
AC_MSG_RESULT([no])
|
||||
orte_without_full_support=1
|
||||
list_of_frameworks="errmgr,ess-singleton,ess-hnp,ess-tool,ess-env,filem,grpcomm-basic,grpcomm-bad,iof,odls,oob,plm,ras,rmaps,rml,routed,snapc,btl-sm,coll-sm,common-sm,mpool-sm,dpm-orte,pubsub-orte,rmcast,routed"
|
||||
list_of_frameworks="db,errmgr,ess-singleton,ess-hnp,ess-tool,ess-env,filem,grpcomm-basic,grpcomm-bad,iof,odls,oob,plm,ras,rmaps,rml,routed,snapc,btl-sm,coll-sm,common-sm,mpool-sm,dpm-orte,pubsub-orte,rmcast,routed"
|
||||
if test -z $enable_mca_no_build ; then
|
||||
enable_mca_no_build="$list_of_frameworks"
|
||||
else
|
||||
|
47
orte/mca/ess/portals4_shmem/Makefile.am
Обычный файл
47
orte/mca/ess/portals4_shmem/Makefile.am
Обычный файл
@ -0,0 +1,47 @@
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# 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.
|
||||
# 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
AM_CPPFLAGS = $(ess_portals4_shmem_CPPFLAGS)
|
||||
|
||||
sources = \
|
||||
ess_portals4_shmem.h \
|
||||
ess_portals4_shmem_component.c \
|
||||
ess_portals4_shmem_module.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
if MCA_BUILD_orte_ess_portals4_shmem_DSO
|
||||
component_noinst =
|
||||
component_install = mca_ess_portals4_shmem.la
|
||||
else
|
||||
component_noinst = libmca_ess_portals4_shmem.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_ess_portals4_shmem_la_SOURCES = $(sources)
|
||||
mca_ess_portals4_shmem_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_ess_portals4_shmem_la_SOURCES =$(sources)
|
||||
libmca_ess_portals4_shmem_la_LDFLAGS = -module -avoid-version
|
52
orte/mca/ess/portals4_shmem/configure.m4
Обычный файл
52
orte/mca/ess/portals4_shmem/configure.m4
Обычный файл
@ -0,0 +1,52 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# 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.
|
||||
# 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 (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
AC_DEFUN([MCA_orte_ess_portals4_shmem_PRIORITY], [30])
|
||||
|
||||
# MCA_ess_portals4_shmem_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_orte_ess_portals4_shmem_CONFIG],[
|
||||
AC_CONFIG_FILES([orte/mca/ess/portals4_shmem/Makefile])
|
||||
|
||||
OMPI_CHECK_PORTALS4([ess_portals4_shmem],
|
||||
[ess_portals4_shmem_happy="yes"],
|
||||
[ess_portals4_shmem_happy="no"])
|
||||
|
||||
AS_IF([test "$ess_portals4_shmem_happy" = "yes"],
|
||||
[ess_portals4_shmem_WRAPPER_EXTRA_LDFLAGS="$ess_portals4_shmem_LDFLAGS"
|
||||
ess_portals4_shmem_WRAPPER_EXTRA_LIBS="$ess_portals4_shmem_LIBS"
|
||||
$1],
|
||||
[$2])
|
||||
|
||||
ess_portals4_shmem_LDFLAGS_SAVE="$LDFLAGS"
|
||||
ess_portals4_shmem_LIBS_SAVE="$LIBS"
|
||||
LDFLAGS="$LDFLAGS $ess_portals4_shmem_LDFLAGS"
|
||||
LIBS="$LIBS $ess_portals4_shmem_LIBS"
|
||||
|
||||
AC_CHECK_FUNC([runtime_get_size], [$1], [$2])
|
||||
|
||||
LDFLAGS="$ess_portals4_shmem_LDFLAGS_SAVE"
|
||||
LIBS="$ess_portals4_shmem_LIBS_SAVE"
|
||||
|
||||
# substitute in the things needed to build portals4_shmem
|
||||
AC_SUBST([ess_portals4_shmem_CPPFLAGS])
|
||||
AC_SUBST([ess_portals4_shmem_LDFLAGS])
|
||||
AC_SUBST([ess_portals4_shmem_LIBS])
|
||||
])dnl
|
35
orte/mca/ess/portals4_shmem/ess_portals4_shmem.h
Обычный файл
35
orte/mca/ess/portals4_shmem/ess_portals4_shmem.h
Обычный файл
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||
* 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.
|
||||
* 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 (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef ORTE_ESS_PORTALS4_SHMEM_H
|
||||
#define ORTE_ESS_PORTALS4_SHMEM_H
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/*
|
||||
* Module open / close
|
||||
*/
|
||||
int orte_ess_portals4_shmem_component_open(void);
|
||||
int orte_ess_portals4_shmem_component_close(void);
|
||||
int orte_ess_portals4_shmem_component_query(mca_base_module_t **module, int *priority);
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* ORTE_ESS_PORTALS4_SHMEM_H */
|
82
orte/mca/ess/portals4_shmem/ess_portals4_shmem_component.c
Обычный файл
82
orte/mca/ess/portals4_shmem/ess_portals4_shmem_component.c
Обычный файл
@ -0,0 +1,82 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||
* 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.
|
||||
* 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 (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
#include "orte/mca/ess/ess.h"
|
||||
#include "orte/mca/ess/portals4_shmem/ess_portals4_shmem.h"
|
||||
|
||||
extern orte_ess_base_module_t orte_ess_portals4_shmem_module;
|
||||
|
||||
/*
|
||||
* Instantiate the public struct with all of our public information
|
||||
* and pointers to our public functions in it
|
||||
*/
|
||||
orte_ess_base_component_t mca_ess_portals4_shmem_component = {
|
||||
/* First, the mca_component_t struct containing meta information
|
||||
about the component itself */
|
||||
{
|
||||
ORTE_ESS_BASE_VERSION_2_0_0,
|
||||
|
||||
/* Component name and version */
|
||||
"portals4_shmem",
|
||||
ORTE_MAJOR_VERSION,
|
||||
ORTE_MINOR_VERSION,
|
||||
ORTE_RELEASE_VERSION,
|
||||
|
||||
/* Component open and close functions */
|
||||
orte_ess_portals4_shmem_component_open,
|
||||
orte_ess_portals4_shmem_component_close,
|
||||
orte_ess_portals4_shmem_component_query
|
||||
},
|
||||
{
|
||||
/* The component is not checkpoint ready */
|
||||
MCA_BASE_METADATA_PARAM_NONE
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
orte_ess_portals4_shmem_component_open(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int orte_ess_portals4_shmem_component_query(mca_base_module_t **module, int *priority)
|
||||
{
|
||||
/* since we are not launched by an ORTE launcher,
|
||||
* we want to be selected ahead of the singleton
|
||||
* component if we detect our supported environment.
|
||||
* So ensure that our priority is higher than
|
||||
* the singleton's
|
||||
*/
|
||||
*priority = 60;
|
||||
*module = (mca_base_module_t *)&orte_ess_portals4_shmem_module;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
orte_ess_portals4_shmem_component_close(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
158
orte/mca/ess/portals4_shmem/ess_portals4_shmem_module.c
Обычный файл
158
orte/mca/ess/portals4_shmem/ess_portals4_shmem_module.c
Обычный файл
@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* 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.
|
||||
* 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 (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
#include <portals4.h>
|
||||
#include <portals4_runtime.h>
|
||||
|
||||
#include "opal/mca/paffinity/paffinity.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
|
||||
#include "orte/mca/errmgr/base/base.h"
|
||||
#include "orte/util/proc_info.h"
|
||||
#include "orte/runtime/orte_globals.h"
|
||||
#include "orte/mca/grpcomm/base/base.h"
|
||||
#include "orte/runtime/runtime_internals.h"
|
||||
|
||||
#include "orte/mca/ess/ess.h"
|
||||
#include "orte/mca/ess/base/base.h"
|
||||
#include "orte/mca/ess/portals4_shmem/ess_portals4_shmem.h"
|
||||
|
||||
static int rte_init(void);
|
||||
static int rte_finalize(void);
|
||||
static void rte_abort(int status, bool report) __opal_attribute_noreturn__;
|
||||
static uint8_t proc_get_locality(orte_process_name_t *proc);
|
||||
static char* proc_get_hostname(orte_process_name_t *proc);
|
||||
static orte_local_rank_t proc_get_local_rank(orte_process_name_t *proc);
|
||||
static orte_node_rank_t proc_get_node_rank(orte_process_name_t *proc);
|
||||
static int query_sys_info(char *node, char **keys, opal_list_t *values);
|
||||
|
||||
orte_ess_base_module_t orte_ess_portals4_shmem_module = {
|
||||
rte_init,
|
||||
rte_finalize,
|
||||
rte_abort,
|
||||
proc_get_locality,
|
||||
NULL, /* proc_get_daemon is only used in ORTE */
|
||||
proc_get_hostname,
|
||||
proc_get_local_rank,
|
||||
proc_get_node_rank,
|
||||
NULL, /* add_pidmap is only used in ORTE */
|
||||
NULL, /* update_nidmap is only used in ORTE */
|
||||
query_sys_info,
|
||||
NULL /* ft_event */
|
||||
};
|
||||
|
||||
static struct runtime_proc_t *map;
|
||||
|
||||
static int rte_init(void)
|
||||
{
|
||||
int rc;
|
||||
int nprocs;
|
||||
|
||||
orte_dt_init();
|
||||
|
||||
/* Get our process information */
|
||||
|
||||
/* Procs in this environment are directly launched. Hence, there
|
||||
* was no mpirun to create a jobid for us, and each app proc is
|
||||
* going to have to fend for itself. For now, we assume that the
|
||||
* jobid is some arbitrary number (say, 1).
|
||||
*/
|
||||
ORTE_PROC_MY_NAME->jobid = 1;
|
||||
|
||||
/* find our vpid from portals4_shmem */
|
||||
ORTE_PROC_MY_NAME->vpid = (orte_vpid_t) runtime_get_rank();
|
||||
|
||||
/* Get the number of procs in the job from portals4_shmem */
|
||||
orte_process_info.num_procs = (orte_std_cntr_t) runtime_get_size();
|
||||
|
||||
/* Get the nid map */
|
||||
nprocs = runtime_get_nidpid_map(&map);
|
||||
if (nprocs <= 0) {
|
||||
opal_output(0, "%5d: runtime_get_nidpid_map() returned %d",
|
||||
runtime_get_rank(), nprocs);
|
||||
return ORTE_ERR_FATAL;
|
||||
}
|
||||
|
||||
/* MPI_Init needs the grpcomm framework, so we have to init it */
|
||||
if (ORTE_SUCCESS != (rc = orte_grpcomm_base_open())) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
if (ORTE_SUCCESS != (rc = orte_grpcomm_base_select())) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* that's all we need here */
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static int rte_finalize(void)
|
||||
{
|
||||
/* just cleanup the things we used */
|
||||
orte_grpcomm_base_close();
|
||||
|
||||
/* clean out the global structures */
|
||||
orte_proc_info_finalize();
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static void rte_abort(int status, bool report)
|
||||
{
|
||||
exit(status);
|
||||
}
|
||||
|
||||
static uint8_t proc_get_locality(orte_process_name_t *proc)
|
||||
{
|
||||
if (map[ORTE_PROC_MY_NAME->vpid].nid ==
|
||||
map[proc->vpid].nid) {
|
||||
return (OPAL_PROC_ON_NODE | OPAL_PROC_ON_CU | OPAL_PROC_ON_CLUSTER);
|
||||
}
|
||||
|
||||
return OPAL_PROC_ON_CU | OPAL_PROC_ON_CLUSTER;
|
||||
}
|
||||
|
||||
static char* proc_get_hostname(orte_process_name_t *proc)
|
||||
{
|
||||
static char hostname[128];
|
||||
snprintf(hostname, 128, "n%d", map[proc->vpid].nid);
|
||||
return hostname;
|
||||
}
|
||||
|
||||
static orte_local_rank_t proc_get_local_rank(orte_process_name_t *proc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static orte_node_rank_t proc_get_node_rank(orte_process_name_t *proc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int query_sys_info(char *node, char **keys, opal_list_t *values)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
47
orte/mca/grpcomm/portals4_shmem/Makefile.am
Обычный файл
47
orte/mca/grpcomm/portals4_shmem/Makefile.am
Обычный файл
@ -0,0 +1,47 @@
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# 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.
|
||||
# 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
AM_CPPFLAGS = $(grpcomm_portals4_shmem_CPPFLAGS)
|
||||
|
||||
sources = \
|
||||
grpcomm_portals4_shmem.h \
|
||||
grpcomm_portals4_shmem_module.c \
|
||||
grpcomm_portals4_shmem_component.c
|
||||
|
||||
# Make the output library in this directory, and name it either
|
||||
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
|
||||
# (for static builds).
|
||||
|
||||
if MCA_BUILD_orte_grpcomm_portals4_shmem_DSO
|
||||
component_noinst =
|
||||
component_install = mca_grpcomm_portals4_shmem.la
|
||||
else
|
||||
component_noinst = libmca_grpcomm_portals4_shmem.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_grpcomm_portals4_shmem_la_SOURCES = $(sources)
|
||||
mca_grpcomm_portals4_shmem_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_grpcomm_portals4_shmem_la_SOURCES =$(sources)
|
||||
libmca_grpcomm_portals4_shmem_la_LDFLAGS = -module -avoid-version
|
52
orte/mca/grpcomm/portals4_shmem/configure.m4
Обычный файл
52
orte/mca/grpcomm/portals4_shmem/configure.m4
Обычный файл
@ -0,0 +1,52 @@
|
||||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# 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.
|
||||
# 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
AC_DEFUN([MCA_orte_grpcomm_portals4_shmem_PRIORITY], [30])
|
||||
|
||||
# MCA_grpcomm_portals4_shmem_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_orte_grpcomm_portals4_shmem_CONFIG],[
|
||||
AC_CONFIG_FILES([orte/mca/grpcomm/portals4_shmem/Makefile])
|
||||
|
||||
OMPI_CHECK_PORTALS4([grpcomm_portals4_shmem],
|
||||
[grpcomm_portals4_shmem_happy="yes"],
|
||||
[grpcomm_portals4_shmem_happy="no"])
|
||||
|
||||
AS_IF([test "$grpcomm_portals4_shmem_happy" = "yes"],
|
||||
[grpcomm_portals4_shmem_WRAPPER_EXTRA_LDFLAGS="$grpcomm_portals4_shmem_LDFLAGS"
|
||||
grpcomm_portals4_shmem_WRAPPER_EXTRA_LIBS="$grpcomm_portals4_shmem_LIBS"
|
||||
$1],
|
||||
[$2])
|
||||
|
||||
grpcomm_portals4_shmem_LDFLAGS_SAVE="$LDFLAGS"
|
||||
grpcomm_portals4_shmem_LIBS_SAVE="$LIBS"
|
||||
LDFLAGS="$LDFLAGS $grpcomm_portals4_shmem_LDFLAGS"
|
||||
LIBS="$LIBS $grpcomm_portals4_shmem_LIBS"
|
||||
|
||||
AC_CHECK_FUNC([runtime_get_size], [$1], [$2])
|
||||
|
||||
LDFLAGS="$grpcomm_portals4_shmem_LDFLAGS_SAVE"
|
||||
LIBS="$grpcomm_portals4_shmem_LIBS_SAVE"
|
||||
|
||||
# substitute in the things needed to build portals4_shmem
|
||||
AC_SUBST([grpcomm_portals4_shmem_CPPFLAGS])
|
||||
AC_SUBST([grpcomm_portals4_shmem_LDFLAGS])
|
||||
AC_SUBST([grpcomm_portals4_shmem_LIBS])
|
||||
])dnl
|
49
orte/mca/grpcomm/portals4_shmem/grpcomm_portals4_shmem.h
Обычный файл
49
orte/mca/grpcomm/portals4_shmem/grpcomm_portals4_shmem.h
Обычный файл
@ -0,0 +1,49 @@
|
||||
/* -*- C -*-
|
||||
*
|
||||
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* 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 (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
*/
|
||||
#ifndef GRPCOMM_PORTALS4_SHMEM_H
|
||||
#define GRPCOMM_PORTALS4_SHMEM_H
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
|
||||
#include "orte/mca/grpcomm/grpcomm.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/*
|
||||
* Module open / close
|
||||
*/
|
||||
int orte_grpcomm_portals4_shmem_open(void);
|
||||
int orte_grpcomm_portals4_shmem_close(void);
|
||||
int orte_grpcomm_portals4_shmem_query(mca_base_module_t **module, int *priority);
|
||||
|
||||
|
||||
/*
|
||||
* Grpcomm interfaces
|
||||
*/
|
||||
|
||||
ORTE_MODULE_DECLSPEC extern orte_grpcomm_base_component_t mca_grpcomm_portals4_shmem_component;
|
||||
extern orte_grpcomm_base_module_t orte_grpcomm_portals4_shmem_module;
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif
|
@ -0,0 +1,77 @@
|
||||
/* -*- C -*-
|
||||
*
|
||||
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
||||
* 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.
|
||||
* 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 (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
/*
|
||||
* includes
|
||||
*/
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
#include "opal/mca/mca.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
|
||||
#include "grpcomm_portals4_shmem.h"
|
||||
|
||||
|
||||
/*
|
||||
* Struct of function pointers that need to be initialized
|
||||
*/
|
||||
orte_grpcomm_base_component_t mca_grpcomm_portals4_shmem_component = {
|
||||
{
|
||||
ORTE_GRPCOMM_BASE_VERSION_2_0_0,
|
||||
|
||||
"portals4_shmem", /* MCA module name */
|
||||
ORTE_MAJOR_VERSION, /* MCA module major version */
|
||||
ORTE_MINOR_VERSION, /* MCA module minor version */
|
||||
ORTE_RELEASE_VERSION, /* MCA module release version */
|
||||
orte_grpcomm_portals4_shmem_open, /* module open */
|
||||
orte_grpcomm_portals4_shmem_close, /* module close */
|
||||
orte_grpcomm_portals4_shmem_query /* module query */
|
||||
},
|
||||
{
|
||||
/* The component is checkpoint ready */
|
||||
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* instantiate globals needed within portals4_shmem component
|
||||
*/
|
||||
|
||||
/* Open the component */
|
||||
int orte_grpcomm_portals4_shmem_open(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* Close the component */
|
||||
int orte_grpcomm_portals4_shmem_close(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
int orte_grpcomm_portals4_shmem_query(mca_base_module_t **module, int *priority)
|
||||
{
|
||||
/* we are the default, so set a low priority so we can be overridden */
|
||||
*priority = 50;
|
||||
*module = (mca_base_module_t *)&orte_grpcomm_portals4_shmem_module;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
170
orte/mca/grpcomm/portals4_shmem/grpcomm_portals4_shmem_module.c
Обычный файл
170
orte/mca/grpcomm/portals4_shmem/grpcomm_portals4_shmem_module.c
Обычный файл
@ -0,0 +1,170 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* 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.
|
||||
* 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 (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Sandia National Laboratories. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
#include "orte/types.h"
|
||||
|
||||
#include <string.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif /* HAVE_SYS_TIME_H */
|
||||
|
||||
#include "opal/dss/dss.h"
|
||||
#include "opal/class/opal_list.h"
|
||||
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "orte/mca/rml/rml_types.h"
|
||||
|
||||
#include "grpcomm_portals4_shmem.h"
|
||||
|
||||
#include <portals4.h>
|
||||
#include <portals4_runtime.h>
|
||||
|
||||
/* API functions */
|
||||
static int init(void);
|
||||
static void finalize(void);
|
||||
|
||||
static int xcast(orte_jobid_t job,
|
||||
opal_buffer_t *buffer,
|
||||
orte_rml_tag_t tag);
|
||||
|
||||
static int orte_grpcomm_portals4_shmem_barrier(void);
|
||||
|
||||
static int allgather(opal_buffer_t *sbuf, opal_buffer_t *rbuf);
|
||||
|
||||
static int allgather_list(opal_list_t *names, opal_buffer_t *sbuf, opal_buffer_t *rbuf);
|
||||
|
||||
static int set_proc_attr(const char *attr_name,
|
||||
const void *data,
|
||||
size_t size);
|
||||
|
||||
static int get_proc_attr(const orte_process_name_t proc,
|
||||
const char * attribute_name, void **val,
|
||||
size_t *size);
|
||||
|
||||
static int modex(opal_list_t *procs);
|
||||
|
||||
static int purge_proc_attrs(void);
|
||||
|
||||
orte_grpcomm_base_module_t orte_grpcomm_portals4_shmem_module = {
|
||||
init,
|
||||
finalize,
|
||||
xcast,
|
||||
allgather,
|
||||
allgather_list,
|
||||
orte_grpcomm_portals4_shmem_barrier,
|
||||
set_proc_attr,
|
||||
get_proc_attr,
|
||||
modex,
|
||||
purge_proc_attrs
|
||||
};
|
||||
|
||||
/**
|
||||
* Init the module
|
||||
*/
|
||||
static int init(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalize module
|
||||
*/
|
||||
static void finalize(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A "broadcast-like" function to a job's processes.
|
||||
* @param jobid The job whose processes are to receive the message
|
||||
* @param buffer The data to broadcast
|
||||
*/
|
||||
|
||||
/* Blocking version */
|
||||
static int xcast(orte_jobid_t job,
|
||||
opal_buffer_t *buffer,
|
||||
orte_rml_tag_t tag)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int
|
||||
orte_grpcomm_portals4_shmem_barrier(void)
|
||||
{
|
||||
runtime_barrier();
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int allgather(opal_buffer_t *sbuf, opal_buffer_t *rbuf)
|
||||
{
|
||||
int rc;
|
||||
orte_std_cntr_t zero=0;
|
||||
|
||||
/* seed the outgoing buffer with num_procs=0 so it won't be unpacked */
|
||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(rbuf, &zero, 1, ORTE_STD_CNTR))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int allgather_list(opal_list_t *names, opal_buffer_t *sbuf, opal_buffer_t *rbuf)
|
||||
{
|
||||
int rc;
|
||||
orte_std_cntr_t zero=0;
|
||||
|
||||
/* seed the outgoing buffer with num_procs=0 so it won't be unpacked */
|
||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(rbuf, &zero, 1, ORTE_STD_CNTR))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int purge_proc_attrs(void);
|
||||
|
||||
static int set_proc_attr(const char *attr_name,
|
||||
const void *data,
|
||||
size_t size)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int get_proc_attr(const orte_process_name_t proc,
|
||||
const char * attribute_name, void **val,
|
||||
size_t *size)
|
||||
{
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static int modex(opal_list_t *procs)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int purge_proc_attrs(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -156,12 +156,14 @@ void orte_quit(void)
|
||||
if (NULL != orte_basename) {
|
||||
free(orte_basename);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (orte_debug_flag) {
|
||||
fprintf(stderr, "orterun: exiting with status %d\n", orte_exit_status);
|
||||
}
|
||||
exit(orte_exit_status);
|
||||
#else
|
||||
exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user