From fd9901f683fd2f8676dea91a4d792733266c0024 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 20 Sep 2005 08:07:08 +0000 Subject: [PATCH] * shell of a portals PML, properly ompi_ignored for most of the world... This commit was SVN r7437. --- ompi/mca/pml/portals/.ompi_ignore | 0 ompi/mca/pml/portals/.ompi_unignore | 3 + ompi/mca/pml/portals/Makefile.am | 52 +++++ ompi/mca/pml/portals/configure.m4 | 218 +++++++++++++++++++ ompi/mca/pml/portals/configure.params | 20 ++ ompi/mca/pml/portals/pml_portals.c | 63 ++++++ ompi/mca/pml/portals/pml_portals.h | 135 ++++++++++++ ompi/mca/pml/portals/pml_portals_cancel.c | 26 +++ ompi/mca/pml/portals/pml_portals_component.c | 87 ++++++++ ompi/mca/pml/portals/pml_portals_iprobe.c | 27 +++ ompi/mca/pml/portals/pml_portals_irecv.c | 48 ++++ ompi/mca/pml/portals/pml_portals_isend.c | 51 +++++ ompi/mca/pml/portals/pml_portals_progress.c | 17 ++ ompi/mca/pml/portals/pml_portals_ptl.c | 13 ++ ompi/mca/pml/portals/pml_portals_ptl.h | 16 ++ ompi/mca/pml/portals/pml_portals_start.c | 17 ++ 16 files changed, 793 insertions(+) create mode 100644 ompi/mca/pml/portals/.ompi_ignore create mode 100644 ompi/mca/pml/portals/.ompi_unignore create mode 100644 ompi/mca/pml/portals/Makefile.am create mode 100644 ompi/mca/pml/portals/configure.m4 create mode 100644 ompi/mca/pml/portals/configure.params create mode 100644 ompi/mca/pml/portals/pml_portals.c create mode 100644 ompi/mca/pml/portals/pml_portals.h create mode 100644 ompi/mca/pml/portals/pml_portals_cancel.c create mode 100644 ompi/mca/pml/portals/pml_portals_component.c create mode 100644 ompi/mca/pml/portals/pml_portals_iprobe.c create mode 100644 ompi/mca/pml/portals/pml_portals_irecv.c create mode 100644 ompi/mca/pml/portals/pml_portals_isend.c create mode 100644 ompi/mca/pml/portals/pml_portals_progress.c create mode 100644 ompi/mca/pml/portals/pml_portals_ptl.c create mode 100644 ompi/mca/pml/portals/pml_portals_ptl.h create mode 100644 ompi/mca/pml/portals/pml_portals_start.c diff --git a/ompi/mca/pml/portals/.ompi_ignore b/ompi/mca/pml/portals/.ompi_ignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ompi/mca/pml/portals/.ompi_unignore b/ompi/mca/pml/portals/.ompi_unignore new file mode 100644 index 0000000000..9907dee18e --- /dev/null +++ b/ompi/mca/pml/portals/.ompi_unignore @@ -0,0 +1,3 @@ +brbarret +bwbarre +rbbrigh diff --git a/ompi/mca/pml/portals/Makefile.am b/ompi/mca/pml/portals/Makefile.am new file mode 100644 index 0000000000..e6bf8f70a0 --- /dev/null +++ b/ompi/mca/pml/portals/Makefile.am @@ -0,0 +1,52 @@ +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# Make the output library in this directory, and name it either +# mca__.la (for DSO builds) or libmca__.la +# (for static builds). + +AM_CPPFLAGS = $(pml_portals_CPPFLAGS) + +if OMPI_BUILD_pml_portals_DSO +component_noinst = +component_install = mca_pml_portals.la +else +component_noinst = libmca_pml_portals.la +component_install = +endif + +local_sources = \ + pml_portals.c \ + pml_portals.h \ + pml_portals_cancel.c \ + pml_portals_component.c \ + pml_portals_iprobe.c \ + pml_portals_irecv.c \ + pml_portals_isend.c \ + pml_portals_ptl.c \ + pml_portals_ptl.h \ + pml_portals_progress.c \ + pml_portals_start.c + +mcacomponentdir = $(libdir)/openmpi +mcacomponent_LTLIBRARIES = $(component_install) +mca_pml_portals_la_SOURCES = $(local_sources) +mca_pml_portals_la_LIBADD = $(pml_portals_LIBS) +mca_pml_portals_la_LDFLAGS = -module -avoid-version $(pml_portals_LDFLAGS) + +noinst_LTLIBRARIES = $(component_noinst) +libmca_pml_portals_la_SOURCES = $(local_sources) +libmca_pml_portals_la_LIBADD = $(pml_portals_LIBS) +libmca_pml_portals_la_LDFLAGS = -module -avoid-version $(pml_portals_LDFLAGS) + diff --git a/ompi/mca/pml/portals/configure.m4 b/ompi/mca/pml/portals/configure.m4 new file mode 100644 index 0000000000..db88477e8a --- /dev/null +++ b/ompi/mca/pml/portals/configure.m4 @@ -0,0 +1,218 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# 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$ +# + + +# _MCA_pml_portals_config_val(config_name, define_name, +# default_val, descrtiption) +# ----------------------------------------------------- +AC_DEFUN([MCA_pml_portals_CONFIG_VAL], [ + AC_ARG_WITH([portals-$1], AC_HELP_STRING([--with-portals-$1], + [$4 (default: $3)])) + case "[$with_]m4_bpatsubst([portals-$1], -, _)" in + "") + $2=$3 + ;; + "no") + AC_MSG_ERROR([--without-portals-$1 is invalid argument]) + ;; + *) + $2="[$with_]m4_bpatsubst([portals-$1], -, _)" + ;; + esac + AC_DEFINE_UNQUOTED([$2], [[$]$2], [$4]) +]) + + +# _MCA_pml_portals_CONFIG_VALS() +# ------------------------------ +AC_DEFUN([MCA_pml_portals_CONFIG_VALS], [ + # User configuration options + MCA_pml_portals_CONFIG_VAL([debug-level], + [OMPI_PML_PORTALS_DEFAULT_DEBUG_LEVEL], [0], + [debugging level for portals pml]) + + MCA_pml_portals_CONFIG_VAL([eager-limit], + [OMPI_PML_PORTALS_DEFAULT_EAGER_LIMIT], [32768], + [max size for eager sends]) + + MCA_pml_portals_CONFIG_VAL([min-send-size], + [OMPI_PML_PORTALS_DEFAULT_MIN_SEND_SIZE], [32768], + [min size for send fragments]) + MCA_pml_portals_CONFIG_VAL([max-send-size], + [OMPI_PML_PORTALS_DEFAULT_MAX_SEND_SIZE], [65536], + [max size for send fragments]) + + MCA_pml_portals_CONFIG_VAL([md-size], + [OMPI_PML_PORTALS_DEFAULT_RECV_MD_SIZE], [1048576], + [Size of receive memory descriptors]) + MCA_pml_portals_CONFIG_VAL([md-size], + [OMPI_PML_PORTALS_DEFAULT_RECV_MD_NUM], [3], + [Number of receive memory descriptors]) + + MCA_pml_portals_CONFIG_VAL([min-rdma-size], + [OMPI_PML_PORTALS_DEFAULT_MIN_RDMA_SIZE], [65536], + [min size for rdma fragments]) + MCA_pml_portals_CONFIG_VAL([max-rdma-size], + [OMPI_PML_PORTALS_DEFAULT_MAX_RDMA_SIZE], [2147483647], + [max size for rdma fragments]) + + MCA_pml_portals_CONFIG_VAL([max-sends-pending], + [OMPI_PML_PORTALS_MAX_SENDS_PENDING], [128], + [max number of sends pending at any time]) + MCA_pml_portals_CONFIG_VAL([recv-queue-size], + [OMPI_PML_PORTALS_DEFAULT_RECV_QUEUE_SIZE], [512], + [size of event queue for receiving frags]) + + MCA_pml_portals_CONFIG_VAL([free-list-init-num], + [OMPI_PML_PORTALS_DEFAULT_FREE_LIST_INIT_NUM], [8], + [starting size of free lists]) + MCA_pml_portals_CONFIG_VAL([free-list-max-num], + [OMPI_PML_PORTALS_DEFAULT_FREE_LIST_MAX_NUM], [1024], + [maximum size of free lists]) + MCA_pml_portals_CONFIG_VAL([free-list-inc-num], + [OMPI_PML_PORTALS_DEFAULT_FREE_LIST_INC_NUM], [32], + [grow size for freelists]) +]) + + +# _MCA_pml_portals_CONFIG_PLATFORM() +# ---------------------------------- +AC_DEFUN([MCA_pml_portals_CONFIG_PLATFORM], [ + # Configure Portals for our local environment + PML_PORTALS_UTCP=0 + PML_PORTALS_REDSTORM=0 + PML_PORTALS_COMPAT="" + PML_PORTALS_HAVE_EVENT_UNLINK=0 + pml_portals_compat="none" + pml_portals_header_prefix= + pml_portals_starting_table_id=0 + AC_ARG_WITH([portals-config], + AC_HELP_STRING([--with-portals-config], + [configuration to use for Portals support. + One of "utcp", "redstorm". (default: utcp)])) + AC_MSG_CHECKING([for Portals configuration]) + if test "$with_portals_config" = "" ; then + with_portals_config="utcp" + fi + case "$with_portals_config" in + "utcp") + PML_PORTALS_UTCP=1 + PML_PORTALS_HAVE_EVENT_UNLINK=1 + pml_portals_LIBS="-lutcpapi -lutcplib -lp3api -lp3lib -lp3rt" + pml_portals_compat="utcp" + pml_portals_header_prefix= + pml_portals_starting_table_id=0 + AC_MSG_RESULT([utcp]) + ;; + "redstorm") + PML_PORTALS_REDSTORM=1 + PML_PORTALS_HAVE_EVENT_UNLINK=0 + pml_portals_LIBS= + pml_portals_compat="redstorm" + pml_portals_header_prefix="portals/" + pml_portals_starting_table_id=30 + AC_MSG_RESULT([red storm]) + ;; + *) + # ok to call ERROR here - the user specified something invalid. + # that should be brought to his attention + AC_MSG_ERROR([unknown Portals configuration. Can not continue]) + ;; + esac + + # Try to find all the portals libraries (this is not fun!) + AC_ARG_WITH(pml-portals-libs, + AC_HELP_STRING([--with-pml-portals-libs=LIBS], + [Libraries to link with for portals])) + if test -n "$with_portals_libs" ; then + pml_portals_LIBS="" + for lib in $with_portals_libs ; do + pml_portals_LIBS="$pml_portals_LIBS -l$lib" + done + fi + + AC_DEFINE_UNQUOTED([OMPI_PML_PORTALS_HAVE_EVENT_UNLINK], + [$PML_PORTALS_HAVE_EVENT_UNLINK], + [Does Portals send a PML_EVENT_UNLINK event]) + + AC_DEFINE_UNQUOTED([OMPI_PML_PORTALS_UTCP], [$PML_PORTALS_UTCP], + [Use the UTCP reference implementation or Portals]) + AC_DEFINE_UNQUOTED([OMPI_PML_PORTALS_REDSTORM], [$PML_PORTALS_REDSTORM], + [Use the Red Storm implementation or Portals]) + + AC_DEFINE_UNQUOTED([OMPI_PML_PORTALS_STARTING_TABLE_ID], + [$pml_portals_starting_table_id], + [first table id to use for portals pml]) +]) + + +# MCA_pml_portals_CONFIG(action-if-can-compile, +# [action-if-cant-compile]) +# ------------------------------------------------ +AC_DEFUN([MCA_pml_portals_CONFIG],[ + # save compiler flags so that we don't alter them for later + # components. + pml_portals_save_CPPFLAGS="$CPPFLAGS" + pml_portals_save_LDFLAGS="$LDFLAGS" + pml_portals_save_LIBS="$LIBS" + + AC_ARG_ENABLE([pml-portals], + [AC_HELP_STRING([--enable-pml-portals], + [Enable building of experimental Portals PML (default: disabled)])]) + AS_IF([test "$enable_pml_portals" = "yes"], [ + # 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])) + + AS_IF([test -n "$with_portals"], + [AS_IF([test -d "$with_portals/include"], + [pml_portals_CPPFLAGS="-I$with_portals/include" + CPPFLAGS="$CPPFLAGS $pml_portals_CPPFLAGS"], []) + AS_IF([test -d "$with_portals/lib"], + [pml_portals_LDFLAGS="-L$with_portals/lib" + LDFLAGS="$LDFLAGS $pml_portals_LDFLAGS"], [])]) + + # try to get our platform configuration + MCA_pml_portals_CONFIG_PLATFORM() + + # check for portals + LIBS="$LIBS $pml_portals_LIBS" + AC_CHECK_HEADERS([${pml_portals_header_prefix}portals3.h], + [AC_MSG_CHECKING([if possible to link Portals application]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <${pml_portals_header_prefix}portals3.h>], + [int i; PtlInit(&i);])], + [AC_MSG_RESULT([yes]) + MCA_pml_portals_CONFIG_VALS() + pml_portals_WRAPPER_EXTRA_LDFLAGS="$pml_portals_LDFLAGS" + pml_portals_WRAPPER_EXTRA_LIBS="$pml_portals_LIBS" + $1], + [AC_MSG_RESULT([no]) + $2])], + [$2]) + ], [$2]) + + # substitute in the things needed to build Portals + AC_SUBST([pml_portals_CPPFLAGS]) + AC_SUBST([pml_portals_LDFLAGS]) + AC_SUBST([pml_portals_LIBS]) + + # reset the flags for the next test + CPPFLAGS="$pml_portals_save_CPPFLAGS" + LDFLAGS="$pml_portals_save_LDFLAGS" + LIBS="$pml_portals_save_LIBS" +])dnl diff --git a/ompi/mca/pml/portals/configure.params b/ompi/mca/pml/portals/configure.params new file mode 100644 index 0000000000..40b425b73d --- /dev/null +++ b/ompi/mca/pml/portals/configure.params @@ -0,0 +1,20 @@ +# -*- shell-script -*- +# +# Copyright (c) 2004-2005 The Trustees of Indiana University. +# All rights reserved. +# Copyright (c) 2004-2005 The Trustees of the University of Tennessee. +# All rights reserved. +# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, +# University of Stuttgart. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# Specific to this module + +PARAM_INIT_FILE=pml_teg.c +PARAM_CONFIG_HEADER_FILE="portals_config.h" +PARAM_CONFIG_FILES="Makefile" diff --git a/ompi/mca/pml/portals/pml_portals.c b/ompi/mca/pml/portals/pml_portals.c new file mode 100644 index 0000000000..19ac93a1f3 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "pml_portals.h" +#include "ompi/communicator/communicator.h" +#include "opal/class/opal_list.h" + +mca_pml_portals_t mca_pml_portals = { + { + mca_pml_portals_add_procs, + mca_pml_portals_del_procs, + mca_pml_portals_enable, + mca_pml_portals_progress, + mca_pml_portals_add_comm, + mca_pml_portals_del_comm, + mca_pml_portals_irecv_init, + mca_pml_portals_irecv, + mca_pml_portals_recv, + mca_pml_portals_isend_init, + mca_pml_portals_isend, + mca_pml_portals_send, + mca_pml_portals_iprobe, + mca_pml_portals_probe, + mca_pml_portals_start, + 32768, /* max tag value */ + 100 /* max cid - BWB - fix me */ + } +}; + +int mca_pml_portals_add_comm(ompi_communicator_t* comm) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_del_comm(ompi_communicator_t* comm) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_add_ptls(opal_list_t *ptls) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_add_procs(struct ompi_proc_t** procs, size_t nprocs) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_del_procs(struct ompi_proc_t** procs, size_t nprocs) +{ + return OMPI_SUCCESS; +} + diff --git a/ompi/mca/pml/portals/pml_portals.h b/ompi/mca/pml/portals/pml_portals.h new file mode 100644 index 0000000000..0f5449a3a0 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef PML_EXAMPLE_H_HAS_BEEN_INCLUDED +#define PML_EXAMPLE_H_HAS_BEEN_INCLUDED + +#include "opal/threads/threads.h" +#include "opal/threads/condition.h" +#include "ompi/class/ompi_free_list.h" +#include "opal/util/cmd_line.h" +#include "ompi/request/request.h" +#include "ompi/mca/pml/pml.h" +#include "ompi/mca/ptl/ptl.h" +#include "ompi/datatype/datatype.h" + +#if defined(c_plusplus) || defined(__cplusplus) +extern "C" { +#endif + +struct mca_pml_portals_t { + mca_pml_base_module_t super; + + mca_ptl_base_component_t **portals_ptl_components; + size_t portals_num_ptl_components; + + mca_ptl_base_module_t** portals_ptl_modules; + size_t portals_num_ptl_modules; + + opal_list_t portals_procs; + opal_mutex_t portals_lock; + + /* free list of requests */ + ompi_free_list_t portals_send_requests; + ompi_free_list_t portals_recv_requests; + + /* list of pending send requests */ + opal_list_t portals_send_pending; +}; +typedef struct mca_pml_portals_t mca_pml_portals_t; + +extern mca_pml_portals_t mca_pml_portals; + +/* + * PML interface functions. + */ +extern int mca_pml_portals_add_comm( struct ompi_communicator_t* comm ); +extern int mca_pml_portals_del_comm( struct ompi_communicator_t* comm ); + +extern int mca_pml_portals_add_procs( struct ompi_proc_t **procs, size_t nprocs ); +extern int mca_pml_portals_del_procs( struct ompi_proc_t **procs, size_t nprocs ); + +extern int mca_pml_portals_add_ptls( opal_list_t *ptls ); + +extern int mca_pml_portals_enable(bool enable); + +extern int mca_pml_portals_iprobe( int dst, + int tag, + struct ompi_communicator_t* comm, + int *matched, + ompi_status_public_t* status ); + +extern int mca_pml_portals_probe( int dst, + int tag, + struct ompi_communicator_t* comm, + ompi_status_public_t* status ); + +extern int mca_pml_portals_cancel( ompi_request_t* request ); +extern int mca_pml_portals_cancelled( ompi_request_t* request, int *flag ); + +extern int mca_pml_portals_isend_init( void *buf, + size_t count, + ompi_datatype_t *datatype, + int dst, + int tag, + mca_pml_base_send_mode_t mode, + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); + +extern int mca_pml_portals_isend( void *buf, + size_t count, + ompi_datatype_t *datatype, + int dst, + int tag, + mca_pml_base_send_mode_t mode, + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); + +extern int mca_pml_portals_send( void *buf, + size_t count, + ompi_datatype_t *datatype, + int dst, + int tag, + mca_pml_base_send_mode_t mode, + struct ompi_communicator_t* comm ); + +extern int mca_pml_portals_irecv_init( void *buf, + size_t count, + ompi_datatype_t *datatype, + int src, + int tag, + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); + +extern int mca_pml_portals_irecv( void *buf, + size_t count, + ompi_datatype_t *datatype, + int src, + int tag, + struct ompi_communicator_t* comm, + struct ompi_request_t **request ); + +extern int mca_pml_portals_recv( void *buf, + size_t count, + ompi_datatype_t *datatype, + int src, + int tag, + struct ompi_communicator_t* comm, + ompi_status_public_t* status ); + +extern int mca_pml_portals_progress(void); + +extern int mca_pml_portals_start( size_t count, ompi_request_t** requests ); + +#if defined(c_plusplus) || defined(__cplusplus) +} +#endif + +#endif /* PML_EXAMPLE_H_HAS_BEEN_INCLUDED */ diff --git a/ompi/mca/pml/portals/pml_portals_cancel.c b/ompi/mca/pml/portals/pml_portals_cancel.c new file mode 100644 index 0000000000..c82cde550b --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_cancel.c @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "pml_portals.h" + +int mca_pml_portals_cancel(ompi_request_t* request) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_cancelled(ompi_request_t* request, int* flag) +{ + if(NULL != flag) + *flag = 0; + return OMPI_SUCCESS; +} + diff --git a/ompi/mca/pml/portals/pml_portals_component.c b/ompi/mca/pml/portals/pml_portals_component.c new file mode 100644 index 0000000000..47f5852a9d --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_component.c @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "opal/event/event.h" +#include "pml_portals.h" +#include "mca/base/mca_base_param.h" + +static int mca_pml_portals_component_open(void); +static int mca_pml_portals_component_close(void); +static mca_pml_base_module_t* mca_pml_portals_component_init( int* priority, + bool enable_progress_threads, bool enable_mpi_threads); +static int mca_pml_portals_component_fini(void); + +mca_pml_base_component_1_0_0_t mca_pml_portals_component = { + + /* First, the mca_base_component_t struct containing meta + * information about the component itself */ + + { + /* Indicate that we are a pml v1.0.0 component (which also implies + * a specific MCA version) */ + + MCA_PML_BASE_VERSION_1_0_0, + + "portals", /* MCA component name */ + OMPI_MAJOR_VERSION, /* MCA component major version */ + OMPI_MINOR_VERSION, /* MCA component minor version */ + OMPI_RELEASE_VERSION, /* MCA component release version */ + mca_pml_portals_component_open, /* component open */ + mca_pml_portals_component_close /* component close */ + }, + + /* Next the MCA v1.0.0 component meta data */ + + { + /* Whether the component is checkpointable or not */ + false + }, + + mca_pml_portals_component_init, /* component init */ + mca_pml_portals_component_fini /* component finalize */ +}; + + +static int mca_pml_portals_component_open(void) +{ + return OMPI_SUCCESS; +} + +static int mca_pml_portals_component_close(void) +{ + return OMPI_SUCCESS; +} + +static mca_pml_base_module_t* +mca_pml_portals_component_init( int* priority, + bool enable_progress_threads, + bool enable_mpi_threads) +{ + mca_base_param_reg_int(&mca_pml_portals_component.pmlm_version, + "priority", + "Component priority", + false, + false, + 0, + priority); + + /* we don't run with no stinkin' threads */ + if (enable_progress_threads || enable_mpi_threads) return NULL; + + return &mca_pml_portals.super; +} + +static int mca_pml_portals_component_fini(void) +{ + return OMPI_SUCCESS; +} + diff --git a/ompi/mca/pml/portals/pml_portals_iprobe.c b/ompi/mca/pml/portals/pml_portals_iprobe.c new file mode 100644 index 0000000000..1f10930160 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_iprobe.c @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "request/request.h" +#include "pml_portals.h" + +int mca_pml_portals_iprobe( int src, int tag, + struct ompi_communicator_t *comm, + int *matched, ompi_status_public_t * status ) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_probe( int src, int tag, + struct ompi_communicator_t *comm, + ompi_status_public_t * status ) +{ + return OMPI_SUCCESS; +} diff --git a/ompi/mca/pml/portals/pml_portals_irecv.c b/ompi/mca/pml/portals/pml_portals_irecv.c new file mode 100644 index 0000000000..483b24e0e3 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_irecv.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "pml_portals.h" +#include "request/request.h" + +int mca_pml_portals_irecv_init( void *addr, + size_t count, + ompi_datatype_t * datatype, + int src, + int tag, + struct ompi_communicator_t *comm, + struct ompi_request_t **request ) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_irecv( void *addr, + size_t count, + ompi_datatype_t * datatype, + int src, + int tag, + struct ompi_communicator_t *comm, + struct ompi_request_t **request ) +{ + return OMPI_SUCCESS; +} + + +int mca_pml_portals_recv( void *addr, + size_t count, + ompi_datatype_t * datatype, + int src, + int tag, + struct ompi_communicator_t *comm, + ompi_status_public_t * status ) +{ + return OMPI_SUCCESS; +} + diff --git a/ompi/mca/pml/portals/pml_portals_isend.c b/ompi/mca/pml/portals/pml_portals_isend.c new file mode 100644 index 0000000000..568dbd5e01 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_isend.c @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "pml_portals.h" +#include "ompi/datatype/datatype.h" +#include "ompi/communicator/communicator.h" + +int mca_pml_portals_isend_init( void* buf, + size_t count, + ompi_datatype_t* datatype, + int dst, + int tag, + mca_pml_base_send_mode_t sendmode, + ompi_communicator_t* comm, + ompi_request_t** request ) +{ + return OMPI_SUCCESS; +} + + +int mca_pml_portals_isend( void* buf, + size_t count, + ompi_datatype_t* datatype, + int dst, + int tag, + mca_pml_base_send_mode_t sendmode, + ompi_communicator_t* comm, + ompi_request_t** request ) +{ + return OMPI_SUCCESS; +} + +int mca_pml_portals_send( void *buf, + size_t count, + ompi_datatype_t* datatype, + int dst, + int tag, + mca_pml_base_send_mode_t sendmode, + ompi_communicator_t* comm ) +{ + return OMPI_SUCCESS; +} + diff --git a/ompi/mca/pml/portals/pml_portals_progress.c b/ompi/mca/pml/portals/pml_portals_progress.c new file mode 100644 index 0000000000..226a495ffa --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_progress.c @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "pml_portals.h" + +int mca_pml_portals_progress(void) +{ + return 0; +} diff --git a/ompi/mca/pml/portals/pml_portals_ptl.c b/ompi/mca/pml/portals/pml_portals_ptl.c new file mode 100644 index 0000000000..d6b94c3ff6 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_ptl.c @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "pml_portals.h" + diff --git a/ompi/mca/pml/portals/pml_portals_ptl.h b/ompi/mca/pml/portals/pml_portals_ptl.h new file mode 100644 index 0000000000..5b2f6b4c83 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_ptl.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef PML_EXAMPLE_PTL_H_HAS_BEEN_INCLUDED +#define PML_EXAMPLE_PTL_H_HAS_BEEN_INCLUDED + + + +#endif /* PML_EXAMPLE_PTL_H_HAS_BEEN_INCLUDED */ diff --git a/ompi/mca/pml/portals/pml_portals_start.c b/ompi/mca/pml/portals/pml_portals_start.c new file mode 100644 index 0000000000..597b661065 --- /dev/null +++ b/ompi/mca/pml/portals/pml_portals_start.c @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2004-2005 The Trustees of the University of Tennessee. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" +#include "pml_portals.h" + +int mca_pml_portals_start(size_t count, ompi_request_t** requests) +{ + return OMPI_SUCCESS; +}