Remove the Portals4 SHMEM reference implementation runtime support, as we're
no longer using the runtime provided by the reference implementation. Remove the Catamount support from ORTE, since we're no longer supporting Catamount. Left the Catamount timer component, because I'm not sure whether it's used on the XTs running CNL. This commit was SVN r26677.
Этот коммит содержится в:
родитель
28681deffa
Коммит
b22faedd9d
@ -1,12 +0,0 @@
|
||||
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,btl
|
||||
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
|
@ -1,44 +0,0 @@
|
||||
#
|
||||
# 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
sources = \
|
||||
ess_cnos.h \
|
||||
ess_cnos_component.c \
|
||||
ess_cnos_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_cnos_DSO
|
||||
component_noinst =
|
||||
component_install = mca_ess_cnos.la
|
||||
else
|
||||
component_noinst = libmca_ess_cnos.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_ess_cnos_la_SOURCES = $(sources)
|
||||
mca_ess_cnos_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_ess_cnos_la_SOURCES =$(sources)
|
||||
libmca_ess_cnos_la_LDFLAGS = -module -avoid-version
|
@ -1,34 +0,0 @@
|
||||
# -*- 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
AC_DEFUN([MCA_orte_ess_cnos_PRIORITY], [30])
|
||||
|
||||
# MCA_ess_cnos_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_orte_ess_cnos_CONFIG],[
|
||||
AC_CONFIG_FILES([orte/mca/ess/cnos/Makefile])
|
||||
|
||||
# check for cnos functions
|
||||
# a bit of a hack,,, we don't want ess_cnos if alps
|
||||
# was requested, and we can't rely on build priority because
|
||||
# ess_alps uses priorty 10 so that ess_hnp is built as well.
|
||||
AC_CHECK_FUNC([cnos_get_rank],
|
||||
[ORTE_CHECK_ALPS([ess_cnos], [$2], [$1])],
|
||||
[$2])
|
||||
])dnl
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef ORTE_ESS_CNOS_H
|
||||
#define ORTE_ESS_CNOS_H
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/*
|
||||
* Module open / close
|
||||
*/
|
||||
int orte_ess_cnos_component_open(void);
|
||||
int orte_ess_cnos_component_close(void);
|
||||
int orte_ess_cnos_component_query(mca_base_module_t **module, int *priority);
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* ORTE_ESS_CNOS_H */
|
@ -1,87 +0,0 @@
|
||||
/*
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* These symbols are in a file by themselves to provide nice linker
|
||||
* semantics. Since linkers generally pull in symbols by object
|
||||
* files, keeping these symbols as the only symbols in this file
|
||||
* prevents utility programs such as "ompi_info" from having to import
|
||||
* entire components just to query their version and parameters.
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
#include "orte/mca/ess/ess.h"
|
||||
#include "orte/mca/ess/cnos/ess_cnos.h"
|
||||
|
||||
extern orte_ess_base_module_t orte_ess_cnos_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_cnos_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 */
|
||||
"cnos",
|
||||
ORTE_MAJOR_VERSION,
|
||||
ORTE_MINOR_VERSION,
|
||||
ORTE_RELEASE_VERSION,
|
||||
|
||||
/* Component open and close functions */
|
||||
orte_ess_cnos_component_open,
|
||||
orte_ess_cnos_component_close,
|
||||
orte_ess_cnos_component_query
|
||||
},
|
||||
{
|
||||
/* The component is not checkpoint ready */
|
||||
MCA_BASE_METADATA_PARAM_NONE
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
orte_ess_cnos_component_open(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int orte_ess_cnos_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_cnos_module;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
orte_ess_cnos_component_close(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -1,165 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2011 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) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
#if defined(HAVE_CNOS_MPI_OS_H)
|
||||
# include "cnos_mpi_os.h"
|
||||
#elif defined(HAVE_CATAMOUNT_CNOS_MPI_OS_H)
|
||||
# include "catamount/cnos_mpi_os.h"
|
||||
#endif
|
||||
|
||||
#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/cnos/ess_cnos.h"
|
||||
|
||||
static int rte_init(void);
|
||||
static int rte_finalize(void);
|
||||
static void rte_abort(int status, bool report) __opal_attribute_noreturn__;
|
||||
static opal_hwloc_locality_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);
|
||||
|
||||
orte_ess_base_module_t orte_ess_cnos_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 */
|
||||
NULL /* ft_event */
|
||||
};
|
||||
|
||||
static cnos_nidpid_map_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 cnos */
|
||||
ORTE_PROC_MY_NAME->vpid = (orte_vpid_t) cnos_get_rank();
|
||||
|
||||
/* Get the number of procs in the job from cnos */
|
||||
orte_process_info.num_procs = (orte_std_cntr_t) cnos_get_size();
|
||||
|
||||
if (orte_process_info.max_procs < orte_process_info.num_procs) {
|
||||
orte_process_info.max_procs = orte_process_info.num_procs;
|
||||
}
|
||||
|
||||
/* Get the nid map */
|
||||
nprocs = cnos_get_nidpid_map(&map);
|
||||
if (nprocs <= 0) {
|
||||
opal_output(0, "%5d: cnos_get_nidpid_map() returned %d",
|
||||
cnos_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 opal_hwloc_locality_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_NON_LOCAL;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
/* RHC: someone more familiar with CNOS needs to
|
||||
* fix this to return the correct value
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
static orte_node_rank_t proc_get_node_rank(orte_process_name_t *proc)
|
||||
{
|
||||
/* RHC: someone more familiar with CNOS needs to
|
||||
* fix this to return the correct value
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,49 +0,0 @@
|
||||
#
|
||||
# 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_LIBADD = $(ess_portals4_shmem_LIBS)
|
||||
mca_ess_portals4_shmem_la_LDFLAGS = -module -avoid-version $(ess_portals4_shmem_LDFLAGS)
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_ess_portals4_shmem_la_SOURCES =$(sources)
|
||||
libmca_ess_portals4_shmem_la_LIBADD = $(ess_portals4_shmem_LIBS)
|
||||
libmca_ess_portals4_shmem_la_LDFLAGS = -module -avoid-version $(ess_portals4_shmem_LDFLAGS)
|
@ -1,52 +0,0 @@
|
||||
# -*- 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
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
ORTE_MODULE_DECLSPEC extern orte_ess_base_component_t mca_ess_portals4_shmem_component;
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /* ORTE_ESS_PORTALS4_SHMEM_H */
|
@ -1,88 +0,0 @@
|
||||
/*
|
||||
* 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 <portals4.h>
|
||||
#include <portals4_runtime.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)
|
||||
{
|
||||
if (PTL_OK != PtlInit()) return ORTE_ERROR;
|
||||
|
||||
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)
|
||||
{
|
||||
PtlFini();
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -1,156 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2011 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 (c) 2011-2012 Cisco Systems, Inc. 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 opal_hwloc_locality_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);
|
||||
|
||||
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 */
|
||||
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();
|
||||
|
||||
if (orte_process_info.max_procs < orte_process_info.num_procs) {
|
||||
orte_process_info.max_procs = orte_process_info.num_procs;
|
||||
}
|
||||
|
||||
/* 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 opal_hwloc_locality_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;
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
#
|
||||
# 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
sources = \
|
||||
grpcomm_cnos.h \
|
||||
grpcomm_cnos_module.c \
|
||||
grpcomm_cnos_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_cnos_DSO
|
||||
component_noinst =
|
||||
component_install = mca_grpcomm_cnos.la
|
||||
else
|
||||
component_noinst = libmca_grpcomm_cnos.la
|
||||
component_install =
|
||||
endif
|
||||
|
||||
mcacomponentdir = $(pkglibdir)
|
||||
mcacomponent_LTLIBRARIES = $(component_install)
|
||||
mca_grpcomm_cnos_la_SOURCES = $(sources)
|
||||
mca_grpcomm_cnos_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_grpcomm_cnos_la_SOURCES =$(sources)
|
||||
libmca_grpcomm_cnos_la_LDFLAGS = -module -avoid-version
|
@ -1,44 +0,0 @@
|
||||
# -*- 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$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
AC_DEFUN([MCA_orte_grpcomm_cnos_PRIORITY], [30])
|
||||
|
||||
# MCA_grpcomm_cnos_CONFIG([action-if-found], [action-if-not-found])
|
||||
# -----------------------------------------------------------
|
||||
AC_DEFUN([MCA_orte_grpcomm_cnos_CONFIG],[
|
||||
AC_CONFIG_FILES([orte/mca/grpcomm/cnos/Makefile])
|
||||
|
||||
grpcomm_cnos_happy="no"
|
||||
# see if we should enable super secret utcp support
|
||||
if test "$with_grpcomm_cnos" = "utcp" ; then
|
||||
grpcomm_cnos_happy="yes"
|
||||
grpcomm_cnos_barrier=0
|
||||
else
|
||||
# check for cnos functions
|
||||
AC_CHECK_FUNC([cnos_barrier],
|
||||
[grpcomm_cnos_happy="yes"
|
||||
grpcomm_cnos_barrier=1],
|
||||
[grpcomm_cnos_happy="no"
|
||||
grpcomm_cnos_barrier=0])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([OMPI_GRPCOMM_CNOS_HAVE_BARRIER], [$grpcomm_cnos_barrier],
|
||||
[whether to use cnos_barrier or not])
|
||||
AS_IF([test "$grpcomm_cnos_happy" = "yes"], [$1], [$2])
|
||||
])dnl
|
@ -1,48 +0,0 @@
|
||||
/* -*- 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
*/
|
||||
#ifndef GRPCOMM_CNOS_H
|
||||
#define GRPCOMM_CNOS_H
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
|
||||
#include "orte/mca/grpcomm/grpcomm.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/*
|
||||
* Module open / close
|
||||
*/
|
||||
int orte_grpcomm_cnos_open(void);
|
||||
int orte_grpcomm_cnos_close(void);
|
||||
int orte_grpcomm_cnos_query(mca_base_module_t **module, int *priority);
|
||||
|
||||
|
||||
/*
|
||||
* Grpcomm interfaces
|
||||
*/
|
||||
|
||||
ORTE_MODULE_DECLSPEC extern orte_grpcomm_base_component_t mca_grpcomm_cnos_component;
|
||||
extern orte_grpcomm_base_module_t orte_grpcomm_cnos_module;
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif
|
@ -1,86 +0,0 @@
|
||||
/* -*- 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
/** @file:
|
||||
*
|
||||
* The Open MPI Name Server
|
||||
*
|
||||
* The Open MPI Name Server provides unique name ranges for processes
|
||||
* within the universe. Each universe will have one name server
|
||||
* running within the seed daemon. This is done to prevent the
|
||||
* inadvertent duplication of names.
|
||||
*/
|
||||
|
||||
/*
|
||||
* includes
|
||||
*/
|
||||
#include "orte_config.h"
|
||||
#include "orte/constants.h"
|
||||
|
||||
#include "opal/mca/mca.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
|
||||
#include "grpcomm_cnos.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Struct of function pointers that need to be initialized
|
||||
*/
|
||||
orte_grpcomm_base_component_t mca_grpcomm_cnos_component = {
|
||||
{
|
||||
ORTE_GRPCOMM_BASE_VERSION_2_0_0,
|
||||
|
||||
"cnos", /* 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_cnos_open, /* module open */
|
||||
orte_grpcomm_cnos_close, /* module close */
|
||||
orte_grpcomm_cnos_query /* module query */
|
||||
},
|
||||
{
|
||||
/* The component is checkpoint ready */
|
||||
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* instantiate globals needed within cnos component
|
||||
*/
|
||||
|
||||
/* Open the component */
|
||||
int orte_grpcomm_cnos_open(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
/* Close the component */
|
||||
int orte_grpcomm_cnos_close(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
int orte_grpcomm_cnos_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_cnos_module;
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -1,176 +0,0 @@
|
||||
/*
|
||||
* 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$
|
||||
*
|
||||
* 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 "orte/mca/grpcomm/grpcomm_types.h"
|
||||
#include "grpcomm_cnos.h"
|
||||
|
||||
#if OMPI_GRPCOMM_CNOS_HAVE_BARRIER
|
||||
# if defined(HAVE_CNOS_MPI_OS_H)
|
||||
# include "cnos_mpi_os.h"
|
||||
# elif defined(HAVE_CATAMOUNT_CNOS_MPI_OS_H)
|
||||
# include "catamount/cnos_mpi_os.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* 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_cnos_barrier(orte_grpcomm_collective_t *coll);
|
||||
|
||||
static int allgather(orte_grpcomm_collective_t *coll);
|
||||
|
||||
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(orte_grpcomm_collective_t *coll);
|
||||
|
||||
static int purge_proc_attrs(void);
|
||||
|
||||
orte_grpcomm_base_module_t orte_grpcomm_cnos_module = {
|
||||
init,
|
||||
finalize,
|
||||
xcast,
|
||||
allgather,
|
||||
orte_grpcomm_cnos_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_cnos_barrier(orte_grpcomm_collective_t *coll)
|
||||
{
|
||||
#if OMPI_GRPCOMM_CNOS_HAVE_BARRIER
|
||||
cnos_barrier();
|
||||
#endif
|
||||
coll->active = false;
|
||||
if (NULL != coll->cbfunc) {
|
||||
coll->cbfunc(NULL, coll->cbdata);
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int allgather(orte_grpcomm_collective_t *coll)
|
||||
{
|
||||
int rc;
|
||||
orte_std_cntr_t zero=0;
|
||||
opal_buffer_t rbuf;
|
||||
|
||||
coll->active = false;
|
||||
if (NULL != coll->cbfunc) {
|
||||
/* seed the outgoing buffer with num_procs=0 so it won't be unpacked */
|
||||
OBJ_CONSTRUCT(&rbuf, opal_buffer_t);
|
||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(&rbuf, &zero, 1, ORTE_STD_CNTR))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_DESTRUCT(&rbuf);
|
||||
return rc;
|
||||
}
|
||||
coll->cbfunc(&rbuf, coll->cbdata);
|
||||
OBJ_DESTRUCT(&rbuf);
|
||||
}
|
||||
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(orte_grpcomm_collective_t *coll)
|
||||
{
|
||||
modex->active = false;
|
||||
if (NULL != coll->cbfunc) {
|
||||
coll->cbfunc(NULL, coll->cbdata);
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int purge_proc_attrs(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
@ -1,51 +0,0 @@
|
||||
#
|
||||
# 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_LIBADD = $(grpcomm_portals4_shmem_LIBS)
|
||||
mca_grpcomm_portals4_shmem_la_LDFLAGS = -module -avoid-version $(grpcomm_portals4_shmem_LDFLAGS)
|
||||
|
||||
|
||||
noinst_LTLIBRARIES = $(component_noinst)
|
||||
libmca_grpcomm_portals4_shmem_la_SOURCES =$(sources)
|
||||
libmca_grpcomm_portals4_shmem_la_LIBADD = $(grpcomm_portals4_shmem_LIBS)
|
||||
libmca_grpcomm_portals4_shmem_la_LDFLAGS = -module -avoid-version $(grpcomm_portals4_shmem_LDFLAGS)
|
||||
|
@ -1,52 +0,0 @@
|
||||
# -*- 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
|
@ -1,49 +0,0 @@
|
||||
/* -*- 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
|
@ -1,77 +0,0 @@
|
||||
/* -*- 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;
|
||||
}
|
||||
|
@ -1,195 +0,0 @@
|
||||
/*
|
||||
* 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 (c) 2012 Los Alamos National Security, LLC. 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(orte_grpcomm_collective_t *coll);
|
||||
|
||||
static int allgather(orte_grpcomm_collective_t *coll);
|
||||
|
||||
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(orte_grpcomm_collective_t *coll);
|
||||
|
||||
static int purge_proc_attrs(void);
|
||||
|
||||
orte_grpcomm_base_module_t orte_grpcomm_portals4_shmem_module = {
|
||||
init,
|
||||
finalize,
|
||||
xcast,
|
||||
allgather,
|
||||
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(orte_grpcomm_collective_t *coll)
|
||||
{
|
||||
runtime_barrier();
|
||||
coll->active = false;
|
||||
if (NULL != coll->cbfunc) {
|
||||
coll->cbfunc(NULL, coll->cbdata);
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int allgather(orte_grpcomm_collective_t *coll)
|
||||
{
|
||||
int rc;
|
||||
orte_std_cntr_t zero=0;
|
||||
opal_buffer_t rbuf;
|
||||
|
||||
coll->active = false;
|
||||
if (NULL != coll->cbfunc) {
|
||||
/* seed the outgoing buffer with num_procs=0 so it won't be unpacked */
|
||||
OBJ_CONSTRUCT(&rbuf, opal_buffer_t);
|
||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(&rbuf, &zero, 1, ORTE_STD_CNTR))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
OBJ_DESTRUCT(&rbuf);
|
||||
return rc;
|
||||
}
|
||||
coll->cbfunc(&rbuf, coll->cbdata);
|
||||
OBJ_DESTRUCT(&rbuf);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int purge_proc_attrs(void);
|
||||
|
||||
static int set_proc_attr(const char *attr_name,
|
||||
const void *data,
|
||||
size_t size)
|
||||
{
|
||||
/* special case for Portals MTL modex */
|
||||
if (0 == strncmp(attr_name, "mtl.portals4", strlen("mtl.portals4"))) {
|
||||
if (size != sizeof(ptl_process_t)) {
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
}
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int get_proc_attr(const orte_process_name_t proc,
|
||||
const char * attribute_name, void **val,
|
||||
size_t *size)
|
||||
{
|
||||
ptl_process_t *id;
|
||||
|
||||
/* special case for Portals MTL modex */
|
||||
if (0 == strncmp(attribute_name, "mtl.portals4", strlen("mtl.portals4"))) {
|
||||
id = malloc(sizeof(ptl_process_t));
|
||||
|
||||
/* proc name and nid / pid match somewhat in shmem code */
|
||||
id->phys.nid = 0;
|
||||
id->phys.pid = proc.vpid;
|
||||
|
||||
*val = id;
|
||||
*size = sizeof(ptl_process_t);
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
return ORTE_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static int modex(orte_grpcomm_collective_t *coll)
|
||||
{
|
||||
coll->active = false;
|
||||
if (NULL != coll->cbfunc) {
|
||||
coll->cbfunc(NULL, coll->cbdata);
|
||||
}
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
static int purge_proc_attrs(void)
|
||||
{
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user