diff --git a/contrib/platform/snl/portals-ref-rte b/contrib/platform/snl/portals-ref-rte deleted file mode 100644 index 77fe55b144..0000000000 --- a/contrib/platform/snl/portals-ref-rte +++ /dev/null @@ -1,21 +0,0 @@ -# NOTE: This is not for use with MPIRUN, but for testing with the portals utcp -# RTE, to closely match the real machine's setup. You need a number of env -# variables set for each process before you even *think* of starting to use -# the results of this configure script. -enable_static=yes -enable_shared=no -with_threads=posix -enable_pretty_print_stacktrace=yes -enable_dlopen=no -with_portals_config=utcp -with_grpcomm_cnos=utcp -with_memory_manager=no -enable_mca_no_build=carto-file,maffinity,paffinity,timer,btl-sm,mpool-sm,btl-self,coll-hierarch,coll-sm,pml-dr,btl-tcp,common-sm,mtl-portals -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 diff --git a/orte/mca/ess/portals_utcp/Makefile.am b/orte/mca/ess/portals_utcp/Makefile.am deleted file mode 100644 index b0eeaef97f..0000000000 --- a/orte/mca/ess/portals_utcp/Makefile.am +++ /dev/null @@ -1,47 +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$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AM_CPPFLAGS = $(ess_portals_utcp_CPPFLAGS) - -sources = \ - ess_portals_utcp.h \ - ess_portals_utcp_component.c \ - ess_portals_utcp_module.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_orte_ess_portals_utcp_DSO -component_noinst = -component_install = mca_ess_portals_utcp.la -else -component_noinst = libmca_ess_portals_utcp.la -component_install = -endif - -mcacomponentdir = $(pkglibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_ess_portals_utcp_la_SOURCES = $(sources) -mca_ess_portals_utcp_la_LDFLAGS = -module -avoid-version $(ess_portals_utcp_LDFLAGS) -mca_ess_portals_utcp_la_LIBADD = $(ess_portals_utcp_LIBS) - -noinst_LTLIBRARIES = $(component_noinst) -libmca_ess_portals_utcp_la_SOURCES =$(sources) -libmca_ess_portals_utcp_la_LDFLAGS = -module -avoid-version $(ess_portals_utcp_LDFLAGS) -libmca_ess_portals_utcp_la_LIBADD = $(ess_portals_utcp_LIBS) diff --git a/orte/mca/ess/portals_utcp/configure.m4 b/orte/mca/ess/portals_utcp/configure.m4 deleted file mode 100644 index d7682c2437..0000000000 --- a/orte/mca/ess/portals_utcp/configure.m4 +++ /dev/null @@ -1,96 +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_portals_utcp_PRIORITY], [50]) - -# MCA_ess_portals_utcp_CONFIG(action-if-can-compile, -# [action-if-cant-compile]) -# ------------------------------------------------ -AC_DEFUN([MCA_orte_ess_portals_utcp_CONFIG],[ - AC_CONFIG_FILES([orte/mca/ess/portals_utcp/Makefile]) - - # save compiler flags so that we don't alter them for later - # components. - ess_portals_utcp_save_CPPFLAGS="$CPPFLAGS" - ess_portals_utcp_save_LDFLAGS="$LDFLAGS" - ess_portals_utcp_save_LIBS="$LIBS" - - # allow user a way to say where the Portals installation is - AC_ARG_WITH(portals, - AC_HELP_STRING([--with-portals=DIR], - [Specify the installation directory of PORTALS])) - OMPI_CHECK_WITHDIR([portals], [$with_portals], [include/portals3.h]) - - AS_IF([test -n "$with_portals"], - [AS_IF([test -d "$with_portals/include"], - [ess_portals_utcp_CPPFLAGS="-I$with_portals/include" - CPPFLAGS="$CPPFLAGS $ess_portals_utcp_CPPFLAGS"], []) - AS_IF([test -d "$with_portals/lib"], - [ess_portals_utcp_LDFLAGS="-L$with_portals/lib" - LDFLAGS="$LDFLAGS $ess_portals_utcp_LDFLAGS"], [])]) - - # Try to find all the portals libraries (this is not fun!) - AC_ARG_WITH(portals-libs, - AC_HELP_STRING([--with-portals-libs=LIBS], - [Libraries to link with for portals])) - if test -n "$with_portals_libs" ; then - ess_portals_utcp_LIBS="" - for lib in $with_portals_libs ; do - ess_portals_utcp_LIBS="$ess_portals_utcp_LIBS -l$lib" - done - fi - - ess_portals_utcp_LIBS="-lp3utcp -lp3api -lp3lib -lp3rt -lp3utcp" - - # check for portals - LIBS="$LIBS $ess_portals_utcp_LIBS" - AC_MSG_CHECKING([for PtlGetRank]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include -#include -#include -#include -#include -FILE *utcp_api_out; -FILE *utcp_lib_out;], - [unsigned int nprocs, rank; -int dummy; -PtlInit(&dummy); -PtlNIInit(PTL_IFACE_DEFAULT, PTL_PID_ANY, NULL, NULL, NULL); -PtlGetRank(PTL_INVALID_HANDLE, &rank, &nprocs);])], - [AC_MSG_RESULT([yes]) - $1], - [AC_MSG_RESULT([no]) - $2]) - - # we don't actually need the Portals code for this component, - # so don't link against them... - ess_portals_utcp_CPPFLAGS= - ess_portals_utcp_LDFLAGS= - ess_portals_utcp_LIBS= - - # substitute in the things needed to build Portals - AC_SUBST([ess_portals_utcp_CPPFLAGS]) - AC_SUBST([ess_portals_utcp_LDFLAGS]) - AC_SUBST([ess_portals_utcp_LIBS]) - - # reset the flags for the next test - CPPFLAGS="$ess_portals_utcp_save_CPPFLAGS" - LDFLAGS="$ess_portals_utcp_save_LDFLAGS" - LIBS="$ess_portals_utcp_save_LIBS" -])dnl diff --git a/orte/mca/ess/portals_utcp/ess_portals_utcp.h b/orte/mca/ess/portals_utcp/ess_portals_utcp.h deleted file mode 100644 index 783cb2d184..0000000000 --- a/orte/mca/ess/portals_utcp/ess_portals_utcp.h +++ /dev/null @@ -1,30 +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_PORTALS_UTCP_H -#define ORTE_ESS_PORTALS_UTCP_H - -BEGIN_C_DECLS - -int orte_ess_portals_utcp_component_open(void); -int orte_ess_portals_utcp_component_close(void); -int orte_ess_portals_utcp_component_query(mca_base_module_t **module, int *priority); - -END_C_DECLS - -#endif /* ORTE_ESS_PORTALS_UTCP_H */ diff --git a/orte/mca/ess/portals_utcp/ess_portals_utcp_component.c b/orte/mca/ess/portals_utcp/ess_portals_utcp_component.c deleted file mode 100644 index 309c46ef2f..0000000000 --- a/orte/mca/ess/portals_utcp/ess_portals_utcp_component.c +++ /dev/null @@ -1,95 +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 "opal/mca/base/mca_base_param.h" - -#include "orte/mca/ess/ess.h" -#include "orte/mca/ess/portals_utcp/ess_portals_utcp.h" - -extern orte_ess_base_module_t orte_ess_portals_utcp_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_portals_utcp_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 */ - "portals_utcp", - ORTE_MAJOR_VERSION, - ORTE_MINOR_VERSION, - ORTE_RELEASE_VERSION, - - /* Component open and close functions */ - orte_ess_portals_utcp_component_open, - orte_ess_portals_utcp_component_close, - orte_ess_portals_utcp_component_query - }, - { - /* The component is not checkpoint ready */ - MCA_BASE_METADATA_PARAM_NONE - } -}; - - -int -orte_ess_portals_utcp_component_open(void) -{ - return ORTE_SUCCESS; -} - - -int orte_ess_portals_utcp_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 - */ - if (NULL == getenv("PTL_MY_RID")) { - *priority = -1; - *module = NULL; - return ORTE_ERROR; - } - - *priority = 60; - *module = (mca_base_module_t *)&orte_ess_portals_utcp_module; - return ORTE_SUCCESS; -} - - -int -orte_ess_portals_utcp_component_close(void) -{ - return ORTE_SUCCESS; -} - diff --git a/orte/mca/ess/portals_utcp/ess_portals_utcp_module.c b/orte/mca/ess/portals_utcp/ess_portals_utcp_module.c deleted file mode 100644 index 1fbba57609..0000000000 --- a/orte/mca/ess/portals_utcp/ess_portals_utcp_module.c +++ /dev/null @@ -1,181 +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$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include - -#include "opal/util/argv.h" -#include "opal/mca/paffinity/paffinity.h" -#include "opal/class/opal_list.h" - -#include "orte/mca/errmgr/base/base.h" -#include "orte/util/name_fns.h" -#include "orte/util/proc_info.h" -#include "orte/runtime/orte_globals.h" -#include "orte/mca/grpcomm/base/base.h" - -#include "orte/mca/ess/ess.h" -#include "orte/mca/ess/base/base.h" -#include "orte/mca/ess/portals_utcp/ess_portals_utcp.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_portals_utcp_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, - orte_ess_base_proc_get_epoch, /* proc_get_epoch */ - NULL, /* add_pidmap is only used in ORTE */ - NULL, /* update_nidmap is only used in ORTE */ - query_sys_info, - NULL /* ft_event */ -}; - -static char **nidmap=NULL; - -static int rte_init(void) -{ - int rc; - orte_vpid_t vpid; - char *vpid_string; - char *nidmap_string; - - vpid_string = getenv("PTL_MY_RID"); - nidmap_string = getenv("PTL_NIDMAP"); - if (NULL == vpid_string || NULL == nidmap_string || - NULL == getenv("PTL_PIDMAP") || NULL == getenv("PTL_IFACE")) { - return ORTE_ERR_NOT_FOUND; - } - - /* 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; /* not 0, since it has special meaning */ - - /* find our vpid assuming range starts at 0 */ - if (ORTE_SUCCESS != (rc = orte_util_convert_string_to_vpid(&vpid, vpid_string))) { - ORTE_ERROR_LOG(rc); - return(rc); - } - ORTE_PROC_MY_NAME->vpid = vpid; - ORTE_PROC_MY_NAME->epoch = ORTE_MIN_EPOCH; - - /* - * Get the number of procs in the job. We assume vpids start at 0. We - * assume that there are procs, since the nidmap is a - * : seperated list of nids, and the utcp reference implementation - * assumes all will be present - */ - /* split the nidmap string */ - nidmap = opal_argv_split(nidmap_string, ':'); - orte_process_info.num_procs = (orte_std_cntr_t) opal_argv_count(nidmap); - - if (orte_process_info.max_procs < orte_process_info.num_procs) { - orte_process_info.max_procs = orte_process_info.num_procs; - } - - /* 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) -{ - /* destruct the nidmap */ - opal_argv_free(nidmap); - - /* 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 (NULL != nidmap[proc->vpid] && - NULL != nidmap[ORTE_PROC_MY_NAME->vpid] && - 0 == strcmp(nidmap[proc->vpid], - nidmap[ORTE_PROC_MY_NAME->vpid])) { - 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) -{ - return nidmap[proc->vpid]; -} - -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; -} - -static int query_sys_info(char *node, char **keys, opal_list_t *values) -{ - return ORTE_SUCCESS; -}